Skip to content

Connect: a link naming a book ends on it, and skips the exchange when already signed in - #108

Merged
KodeStar merged 3 commits into
mainfrom
feat/listen-in-player
Oct 16, 2026
Merged

KodeStar merged 3 commits into
mainfrom
feat/listen-in-player

Conversation

@KodeStar

Copy link
Copy Markdown
Owner

Pairs with KodeStar/audiosilo-server#144 (server#137, Listen in player).

/web/connect (and a pasted link) may carry book (a library id), path and uid, now on PairingScan. The destination is rebuilt with bookHref, never followed as a URL.

  • Signed in as uid on sid (signedInAs): GET /me on the connection's own address; OK -> open the book, no exchange (no second session, no new-device notice). 401 -> exchange as usual. Add someone never skips.
  • Otherwise the pairing runs and finishConnect ends on the book. Both end through endConnect, so kids mode still wins.
  • A link without a valid book behaves exactly as before; native never receives these links.

Gates: tsc, lint, prettier, jest (407 suites, 4868 tests). Verified in a real browser against the paired server branch (see the server PR).

The link's book and user ride on PairingScan (route params and a pasted link alike), useLinkPairing.pair takes one argument and skips the exchange when already signed in (reading the connections again after a failed session read), endConnect is the flow's one ending, and signedInAs is built on priorConnection.
The skip asks GET /me on the connection's own address first, so a stored
token the server has revoked falls through to the exchange (an unreachable
server still opens the book); a screen left while the session is read again
spends nothing; Add someone keeps the exchange, which switches to that
person; the paste path shows progress and clears the last error.
@KodeStar
KodeStar merged commit 0b33aa8 into main Oct 16, 2026
1 check passed
@KodeStar
KodeStar deleted the feat/listen-in-player branch October 16, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant