Skip to content

Switch default signaling to reachable public relays - #10

Merged
lsegal merged 3 commits into
mainfrom
fix/issue-7-public-signaling
Oct 3, 2026
Merged

lsegal merged 3 commits into
mainfrom
fix/issue-7-public-signaling

Conversation

@lsegal

@lsegal lsegal commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Root cause

Write's default signaling relay, wss://y-webrtc-eu.fly.dev, is offline (hostname resolves, connections time out). The hosted embed on write.subscript.to sets no signaling-url, so browsers opening a Share Draft link never find each other.

Change

Per the instruction on #7 ("find another public signaling server"), I probed public y-webrtc relays with a live two-client subscribe/publish relay test (2026-10-03):

Relay Result
wss://y-webrtc-signaling.fly.dev ✅ relays messages
wss://y-webrtc.fly.dev ✅ relays messages
wss://y-webrtc-eu.fly.dev (old default) ❌ connect error
wss://signaling.yjs.dev, y-webrtc-signaling-{eu,us}.herokuapp.com, y-webrtc-signaling-{eu,us}.fly.dev, y-webrtc-us.fly.dev ❌ connect error
  • app/src/lib/config.ts: default signalingUrl is now wss://y-webrtc-signaling.fly.dev,wss://y-webrtc.fly.dev. Write already accepts a comma-separated list and y-webrtc connects to every relay concurrently, so either one being down doesn't break sharing.
  • Extracted the existing comma-splitting into an exported signalingUrls() helper so it can be tested.
  • app/.env.example, signaling/README.md, and the root README no longer describe wss://y-webrtc-eu.fly.dev; they document the new defaults (the root README's config table previously listed the wrong default too). signaling/README.md now notes these are community relays with no uptime guarantee.

User impact

Share Draft links connect peers again without any self-hosted signaling. The hosted write.subscript.to page picks this up once it's rebuilt with this version of the embed bundle (it currently bakes in the old default).

Tests

  • New app/src/lib/config.test.ts: default relays, old relay absent, comma-separated override parsing.
  • pnpm run lint and pnpm run test (16 files, 47 tests) pass locally.
  • End-to-end: ran pnpm dev with no .env.local (so only the new defaults), opened /#room=<random> in two isolated headless Chrome contexts. Both showed 2 in room, and edits synced A→B and B→A.

Changelog

No changelog entry: the project has no changelog.

Screenshots

Not applicable: no UI code changed.

Closes #7

Agents: claude-code (claude-opus-5-5)

@lsegal
lsegal marked this pull request as ready for review October 3, 2026 22:25
@lsegal
lsegal merged commit 09d4eb6 into main Oct 3, 2026
1 check passed
@lsegal
lsegal deleted the fix/issue-7-public-signaling branch October 3, 2026 22:25
@lsegal

lsegal commented Oct 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged. The new default relays are verified locally (two isolated Chrome contexts showed 2 in room and synced edits both ways), but write.subscript.to serves a prebuilt embed bundle that still has wss://y-webrtc-eu.fly.dev baked in. CI can't cover the remaining checks.

Manual verification

  • Rebuild and redeploy the hosted embed on write.subscript.to from main (pnpm build:embed, then publish the bundle). Alternatively, set signaling-url="wss://y-webrtc-signaling.fly.dev,wss://y-webrtc.fly.dev" on the hosted <subscript-write> element.
  • Check that the served /assets/subscript-write-*.js no longer contains y-webrtc-eu.fly.dev.
  • Open the same Share Draft link in two browsers on write.subscript.to. Both should show "2 in room" and sync edits both ways.
  • Optional, for long-term reliability: the new defaults are community-run relays with no uptime guarantee. Deploying signaling/ (pnpm deploy:signaling) on the account that serves write.subscript.to and setting the hosted signaling-url to it would remove that dependency.

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.

Hosted sharing still fails: default signaling server wss://y-webrtc-eu.fly.dev is offline

1 participant