Skip to content

fix(bridge): pass owner Peer to DSH 0.2.1 Gateway streams - #124

Open
zzalancelot wants to merge 4 commits into
omdsh-dev:mainfrom
zzalancelot:fix/bridge-required-peer
Open

zzalancelot wants to merge 4 commits into
omdsh-dev:mainfrom
zzalancelot:fix/bridge-required-peer

Conversation

@zzalancelot

Copy link
Copy Markdown
Contributor

Summary

  • DSH 0.2.1-rc.2 requires a live Connection Peer on wireStream.open, invoke, and shared-fetch ($events needs interactions: answer).
  • The Host adapter previously passed undefined as peer, so $events threw on peer.signal right after hello.ok and closed the extension WebSocket with 1011 / stream-failed.
  • Mint an in-process owner Peer via connection.createPeer({ principal: { kind: "owner" }, interactions: "answer" }) and pass it through stream / invoke / shared-fetch paths.

Test plan

  • On DSH 0.2.1-rc.2, open the extension side panel and confirm Connected stays up (no reconnect loop)
  • Open a bridge WebSocket hello and confirm no immediate stream-failed
  • pnpm --filter @yuxianglin/dsh-bridge-browser test

DSH 0.2.1-rc.2 requires a live Peer on wireStream.open, invoke, and shared-fetch. Passing undefined made $events throw on peer.signal after hello.ok, closing the extension WebSocket with 1011 stream-failed.
HostConnectionLike now requires createPeer for DSH 0.2.1; update the extension typecheck fixture so CI passes.
Pending SelectionWatcher debounce callbacks were surviving afterEach vi.useRealTimers() and throwing document is not defined after jsdom teardown, which Vitest reported as unhandled errors.
Smoke and dsh 0.2.0-rc.2 Connection lack createPeer. Use it when present (0.2.1+), otherwise fall back to a local owner Peer stand-in so the plugin still activates.
zzalancelot added a commit to zzalancelot/dsh-browser that referenced this pull request Oct 18, 2026
Bring DSH 0.2.1 Peer/stream fixes onto maintain alongside open-window.
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