Skip to content

Polish recovery alert guidance and compact account flow - #60

Merged
sidhujag merged 2 commits into
masterfrom
codex/recovery-alert-ux
Oct 22, 2026
Merged

sidhujag merged 2 commits into
masterfrom
codex/recovery-alert-ux

Conversation

@sidhujag

@sidhujag sidhujag commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Polish recovery alerts within the existing Sysnode account-card design:

  • Put enrollment and opt-out errors beside the relevant form, reveal a collapsed enrollment form only for an explicit action failure, and focus without smooth scrolling or background-refresh jumps.
  • Explain the verified-email prerequisite locally and offer a read-only verification-status refresh.
  • Remove redundant selectors when there is one wallet or account, while retaining visible identity and multi-choice controls.
  • Keep pending, executed, unknown and noncanonical recovery observations visible. Collapse only expired, canceled and invalidated past activity.
  • Provide accurate Pali review instructions and the official recovery guide, without inventing an extension deep link or implying that disabling emails cancels on-chain recovery.

Enrollment/signature payloads, enrollment/opt-out service requests, CSRF checks, password/TOTP step-up, and recovery authority are unchanged. The new read-only verification check opts in to retaining an established session on network, 408, 429 and 5xx read failures. Actual authentication failures still clear it; default bootstrap/refresh behavior is unchanged, and stale or logout-overtaken results cannot update or return an old user.

Validation

Exact reviewed head: 789cab251e97202646a49e4b12b95822e42a9e1c (tree 7c5429cbf04367c588411e29fb581224e0cdba3e).

  • Full unit suite: 69 suites / 1,160 tests passed and exited naturally with open-handle diagnostics.
  • Focused recovery/authentication tests: 67 passed, including an independent source/security review and run.
  • Actual rendered browser cases: 12 passed at 320px and 390px, including local visible errors, a collapsed-form rejection, transient verification failures with real AuthProvider/PrivateRoute, successful retry, expired-session redirect and opt-out confirmation.
  • Production build, production-runtime tests, deployment tests and production dependency audit passed.

Browser cases use controlled public fixture data. No live wallet signatures, transactions, emails or recovery changes were performed for this UI patch.

The shared recovery-docs screenshot and explicit Sysnode links are being updated separately after this UI is frozen. Deployment follows review and CI; no Pali release publication is part of this PR.

@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T04:11:34.666477Z 789cab2 Manual request
🔒 Security Review ✅ Completed 2026-10-22T04:06:13.666873Z 6491de3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6491de3011

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/components/RecoveryAlertsCard.js Outdated
setNotice(null);
const id = userId;
try {
const updated = await refresh();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the session when verification checks fail transiently

If an unverified user clicks “Check verification status” and /auth/me encounters a network error or HTTP 5xx, this call signs them out locally instead of displaying a retryable verification error. AuthContext.refresh() clears the user and sets the status to anonymous on every failure (src/context/AuthContext.js:148–155), so the /account route's PrivateRoute redirects to login and unmounts this card before its local error can remain visible. Use a refresh mode that preserves authenticated state on non-authentication failures, while still handling an actual expired session.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed at 789cab2. The verification action now explicitly opts in to preserving an established session only for network/408/429/5xx errors; authentication failures still clear it. Default bootstrap/refresh semantics remain unchanged. Stale, unmounted and logout-overtaken results cannot update or return old user data. Added real AuthProvider and PrivateRoute regressions for transient failures, successful retry, expired authentication and overlapping login/logout. Final local suite: 69/1160; 67 focused cases; 12 actual browser cases; independent security review passed.

@sidhujag

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 789cab251e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidhujag

Copy link
Copy Markdown
Member Author

@codex security review

Review current head 789cab2, including the narrowly opted-in verification refresh and its unchanged default/401 behavior. Independent exact-diff security review and 67 focused tests passed; full Node 20/22 PR CI is green.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 789cab251e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sidhujag

Copy link
Copy Markdown
Member Author

Qualification at 789cab2 / tree 7c5429cbf04367c588411e29fb581224e0cdba3e: both push and PR Node 20/22 gates passed. CI confirms 69 suites / 1,160 tests and 21 combined recovery/dashboard browser cases. The actual PR checkout d5fca44 has the same qualified tree. Independent security review covered the exact new refresh-mode diff and passed 67 focused cases; the earlier automated security summary remains tied to 6491de3 and is not being represented as a review of the follow-up. Current-head automated code review is clean. No live wallet signing or on-chain action was used in this UI qualification.

@sidhujag
sidhujag merged commit cbab27f into master Oct 22, 2026
6 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.

1 participant