Skip to content

fix(ui): abort stale mobile-handoff modal fetches#3463

Merged
BunsDev merged 2 commits into
OpenCoven:mainfrom
tynamite:fix/mobile-handoff-modal-abort
Jul 19, 2026
Merged

fix(ui): abort stale mobile-handoff modal fetches#3463
BunsDev merged 2 commits into
OpenCoven:mainfrom
tynamite:fix/mobile-handoff-modal-abort

Conversation

@tynamite

Copy link
Copy Markdown
Contributor

Summary

Abort in-flight mobile handoff app-start / reset requests when the modal closes or Refresh races, so older responses cannot overwrite a newer QR or error state.

Why

Rapid open/close/Refresh could apply a stale handoff response after a newer request had already started.

Changes

  • AbortController mutex for start/reset fetches in mobile-handoff-modal.tsx
  • Ignore aborted requests / AbortError; clear loading on close
  • Abort checks before JSON parse and after auto-copy; only advance auto-copy id after success
  • Source-contract asserts in mobile-handoff.test.ts

Verification

node --experimental-strip-types src/components/mobile-handoff.test.ts

Codex review on the fork PR: no major issues (chatgpt-codex-connector[bot] on f2e59aa54f).

Risk + rollout notes

UI-only. Successful handoff flow unchanged; aborted requests no longer surface as failures. No migration.

Tyler Thompson added 2 commits July 19, 2026 03:32
Abort in-flight app-start/reset when the modal closes or Refresh races so older responses cannot overwrite a newer QR or error state.

Signed-off-by: Tyler Thompson <eijastnt@TNT-3.local>
Check abort before parsing start responses, only mark auto-copy done after success, and treat any Error named AbortError as cancel.

Signed-off-by: Tyler Thompson <eijastnt@TNT-3.local>
@BunsDev
BunsDev merged commit db80d8b into OpenCoven:main Jul 19, 2026
14 checks passed
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.

2 participants