Skip to content

fix(desktop): explain missing pairing endpoint - #3846

Open
kiranmagic7 wants to merge 2 commits into
block:mainfrom
kiranmagic7:fix/pairing-legacy-404
Open

fix(desktop): explain missing pairing endpoint#3846
kiranmagic7 wants to merge 2 commits into
block:mainfrom
kiranmagic7:fix/pairing-legacy-404

Conversation

@kiranmagic7

Copy link
Copy Markdown
Contributor

Summary

  • Preserve whether the pairing URL came from the legacy /pair fallback.
  • Replace only that fallback's HTTP 404 with an actionable error naming the endpoint and the two supported remedies.
  • Strip query parameters and fragments before showing the endpoint; keep every other WebSocket error unchanged.

Related issue

Fixes #3779.

Deployment-side gaps are covered separately by #3627 for Compose and #3424 for chart-managed routing.

Testing

  • cargo test --manifest-path desktop/src-tauri/Cargo.toml pairing_relay_tests -- --nocapture — 9 passed
  • pnpm --dir desktop build:e2e && pnpm --dir desktop exec playwright test --project=smoke --grep "legacy pairing 404 explains how to configure the relay" — 1 passed
  • just ci — passed

Before/after screenshots are included in a follow-up comment.

Signed-off-by: kiranmagic7 <262980978+kiranmagic7@users.noreply.github.com>
@kiranmagic7
kiranmagic7 requested a review from a team as a code owner July 31, 2026 03:13
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Screenshots

Before After
pairing-legacy-404-before pairing-legacy-404-after

@Chessing234

Copy link
Copy Markdown
Contributor

helpful error. one tweak — if pairing_relay_url is set but unreachable, keep that distinct from the legacy /pair 404 so people dont chase the wrong fix

Signed-off-by: Kiran Magic <kiran@Alices-Laptop.local>
@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Good catch, thank you. The legacy path was already tracked separately, but configured relay failures still fell back to the generic WebSocket error. I have now made the distinction explicit and added regression coverage, so an unreachable pairing_relay_url points users to the configured endpoint rather than the /pair remedy.

@kiranmagic7

Copy link
Copy Markdown
Contributor Author

Re-checked this after the configured-relay split landed. Head e07384c3b3f0602927330113bd8298c75ea58b0c is still mergeable; DCO, Semgrep, and zizmor are green. The remaining Buzz Actions run is https://github.com/block/buzz/actions/runs/30633199987, still action_required with 0 jobs, so there is no failing CI log for me to fix. Review focus is just the two error paths in desktop/src-tauri/src/commands/pairing.rs and the e2e coverage in desktop/tests/e2e/mobile-pairing-qr.spec.ts.

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.

fix(desktop): pairing shows a bare 404 when the legacy /pair fallback hits a relay with no pairing endpoint

2 participants