fix(desktop): explain missing pairing endpoint
Summary
- Preserve whether the pairing URL came from the legacy
/pairfallback. - 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 passedpnpm --dir desktop build:e2e && pnpm --dir desktop exec playwright test --project=smoke --grep "legacy pairing 404 explains how to configure the relay"— 1 passedjust ci— passed
Before/after screenshots are included in a follow-up comment.
Screenshots
| Before | After |
|---|---|
![]() |
![]() |
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
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.
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.
Re-checked this after porting it over current main. The conflict in pairing.rs is resolved in 3be34ba415fa99276ceb9a38f201b4125955f195, and the branch is mergeable again. I kept the earlier legacy /pair 404 vs configured pairing_relay_url split while moving the coverage onto the current pairing_relay_tests.rs shape.
Proof before the push: cargo test --manifest-path desktop/src-tauri/Cargo.toml pairing_relay_tests -- --nocapture passed 10 tests, the focused legacy-404 Playwright case passed, and just ci passed. DCO, Semgrep, and zizmor are green on the new head; the Buzz Actions runs for this head are still fork-approval action_required, so there is no failing hosted log for me to fix.
The configured-relay path remains separate, as requested. #5340 now overlaps the legacy 404 handling; this branch also strips query and fragment data before showing either endpoint and includes the QR-panel e2e regression. I'm leaving it open for those differences, but I can close it if maintainers prefer #5340's smaller shape.
🔐 Codex Security Review
Status: review required for the current range.
The current range is
bbcbd7ce139ccd24b39eb13df85bd294346a609c...517f4c8fb7aa3cbfd837d9855302d17e5caf687a. A new review must complete for this exact range. When manual authorization is required, a user with write access must comment exactly@buzz-security-review 517f4c8fb7aa3cbfd837d9855302d17e5caf687ato authorize a new review. Any previous review applies only to its recorded range.
I updated the branch to current main and resolved the pairing-flow conflicts while preserving both the readiness/code-entry changes and this PR’s distinction between legacy /pair 404s and configured relay failures. The PR is mergeable again, the final diff is clean, and DCO passes on 517f4c8fb.

