Skip to content

fix(connect): fail closed on lost approval context - #214

Merged
LiranCohen merged 1 commit into
fix/connect-override-endpoint-timeoutfrom
fix/connect-approval-preconditions
Sep 18, 2026
Merged

LiranCohen merged 1 commit into
fix/connect-override-endpoint-timeoutfrom
fix/connect-approval-preconditions

Conversation

@LiranCohen

@LiranCohen LiranCohen commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • replace relay and popup approval handlers silent nullable-state returns with one shared live-context guard
  • move lost wallet, request, or profile state through the existing terminal error paths instead of leaving Authorizing or Connecting active
  • best-effort deny popup requests when approval cannot begin, while tolerating an already-closed transport

Why

Inline onboarding enters a progress phase before handing off to the approval handler. If the wallet locks or approval context changes in that narrow async window, the old guards returned without changing phase. The user then saw a permanent loader and a second fresh attempt could work.

Stack

Depends on #213. Merge #213 first, then this PR; its diff contains only the approval-context change.

Verification

  • CI: lint, typecheck, unit coverage, build, and E2E pass
  • combined local suite: 833 passed, 10 skipped
  • lint: 0 errors; 134 pre-existing warnings

@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from 115a603 to 6214282 Compare September 18, 2026 14:51
@LiranCohen
LiranCohen changed the base branch from fix/connect-override-endpoint-timeout to main September 18, 2026 14:57
@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from 6214282 to e2b5c70 Compare September 18, 2026 14:58
@LiranCohen
LiranCohen changed the base branch from main to fix/connect-override-endpoint-timeout September 18, 2026 14:58
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 75.45% (🎯 25%) 3436 / 4554
🟢 Statements 73.83% (🎯 25%) 3657 / 4953
🟢 Functions 74.37% (🎯 30%) 1094 / 1471
🟢 Branches 69.4% (🎯 29%) 2352 / 3389
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/features/connect/AppConnectPage.tsx 61.51% 73.79% 56.14% 63% 254-255, 277-278, 287-288, 304, 310-337, 344-394, 454, 485, 532, 540, 551, 559-565, 572-592, 597, 620-636, 647-650, 672-919, 931-981
src/features/connect/DWebConnectPage.tsx 68.24% 71.5% 56.41% 68.55% 232, 244, 248, 289, 295, 323-391, 396, 399-400, 409, 420, 445-448, 510-640, 652-690
src/features/connect/connect-decision.ts 100% 100% 100% 100%
Generated in workflow #551 for commit 28ecb43 by the Vitest Coverage Report Action

@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from e2b5c70 to 1c0038b Compare September 18, 2026 15:20
@LiranCohen
LiranCohen changed the base branch from fix/connect-override-endpoint-timeout to main September 18, 2026 15:25
@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from 1c0038b to 82409f8 Compare September 18, 2026 15:25
@LiranCohen
LiranCohen changed the base branch from main to fix/connect-override-endpoint-timeout September 18, 2026 15:26
@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from 82409f8 to cc3712a Compare September 18, 2026 20:19
@LiranCohen
LiranCohen added this pull request to stack #219 September 18, 2026 20:31
@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from cc3712a to 6f6a5f4 Compare September 18, 2026 20:38
@LiranCohen
LiranCohen force-pushed the fix/connect-approval-preconditions branch from 6f6a5f4 to 28ecb43 Compare September 18, 2026 20:53
@LiranCohen
LiranCohen merged commit 893a67b into main Sep 18, 2026
4 of 8 checks passed
@LiranCohen
LiranCohen deleted the fix/connect-approval-preconditions branch September 18, 2026 21:13
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