Repository navigation
Add identity restore UI - #1101
Conversation
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: jm <jm@squareup.com> Co-authored-by: Codex <noreply@openai.com>
7f43e8f to
7017a58
Compare
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
…e-ui Signed-off-by: Jordan Mecom <jm@squareup.com>
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Jordan Mecom <jm@squareup.com>
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Carl, an automated reviewer, commenting via Wes’s GitHub account.
Verdict: no blockers. One minor test-quality finding and one optional nit (inline). Every restore transition was traced against the native commands and holds: begin, wait, choose and install, cancel at each stage, retry after an error or empty result, unmount, and dispose. Previous identities need an explicit pick, and the installed viewer is checked against the selection.
Other optional items: focus lands on <body> after each step, the Field nativeLabel={false} plus duplicate aria-label differs from the other RadioGroup callers, and the ?recovery= fixture modes aren't listed in docs/identity.md.
Stack reviewed at #1137 9bac2d1 → #1106 417b30a → #1107 b3109cf → #1101 f3a5728 (base main 1ede3e3), with independent native, recovery and frontend lanes plus a cross-layer pass.
Not verified: live browser sign-in, KMS, installed-app secure-store behavior and runtime race ordering. Reviewers relied on existing CI and did not rerun suites locally. Rendered checks in both themes and widths were not performed.
| ["nsec_restore_wait", "Backup recovery is unavailable. Try again later."], | ||
| [ | ||
| "nsec_restore_wait", | ||
| "Couldn’t check the identity linked to your account. Try again.", |
There was a problem hiding this comment.
Minor (test quality): these failure cases reject with strings native never produces. Native only sends RETRY, CANCELED or UNAVAILABLE (nsec_backup.rs:27-29), so the tests show pass-through, not the user-visible contract. Four service.ts branches have no test: the cancel-failure alert ("Couldn’t cancel recovery. Try Back again."), a rejected nsec_restore_begin, Try again after an error (cancel, then begin), and the installed viewer not matching the selection.
Fix: use the real native messages and add those four cases.
| <> | ||
| {candidate.pubkey === current?.pubkey | ||
| ? "Current identity" | ||
| : "Previous identity"} |
There was a problem hiding this comment.
Nit (optional): when currentPubkey is null (the account has no linked identity), every candidate is labelled "Previous identity", which the data doesn't support. Use a neutral label such as "Backed-up identity" in that case.
Co-authored-by: OpenAI Codex <codex@openai.com> * jm/nsec-backup-recovery: Isolate restore lifetime and release its recovery credential Keep consented backups live across recipient and session changes Make saved backup consent changes crash-durable Signed-off-by: jm <jm@squareup.com>
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: jm <jm@squareup.com> Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com> * jm/nsec-backup-recovery: Make source retention coverage independent of optional build origin Signed-off-by: jm <jm@squareup.com>
| ) : recovery.status === "error" || | ||
| (recovery.status === "choosing" && candidates.length === 0) ? ( | ||
| <Button | ||
| variant="primary" |
There was a problem hiding this comment.
🤖 [P3] Preserve focus while recovery changes views.
Try recovery again invokes cancellation, changes the phase to canceling, and unmounts the focused primary button. Entering restore and going Back similarly replace focused controls. Browser checks confirmed focus falls to body on entry and Back, although Tab still reaches useful controls and no keyboard trap was reproduced. Keep the focused control mounted and disabled during transitions, or explicitly move focus into the restore section and back to the entry control, consistent with DESIGN.md's focused-control guidance.
There was a problem hiding this comment.
🤖 Non-blocking P3 follow-up. Focus loss was reproduced again at d031907 on entry, Back and cancellation-gated retry. Useful Tab navigation still works; no keyboard trap was demonstrated. Please preserve or restore focus; this does not block approval.
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord automated source review via Wes’s account.
No new changes requested in this follow-up (9/10 for the reviewed repairs). The prior test-quality finding is addressed: the mounted UI tests use native recovery errors and cover begin failure, cancellation failure, cancellation-gated retry, and installed-viewer mismatch. I also checked the merged native session/restore-lifetime and persisted-backup repairs against cancellation and consent boundaries; no new actionable defect found. Earlier optional UI observations remain optional.
Head d031907712cd61a717d8cb5d04a26ca67fc16038; base 5b25a70f379f8fd9444d3a3ca8b9577e3aee9d7f. Source-only follow-up and fresh-frame self-review; public description and commit messages inspected (no attached images). No tests, builds, app execution, or current CI assessment. Native sign-in/secure storage, live error/retry focus, themes, widths, enlarged text, and human acceptance remain unverified. COMMENT only; not approval.
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 Approved. Remaining P3 follow-ups are non-blocking; native acceptance and local test-failure attribution remain outstanding.
* origin/main: Add native Huddles with call controls and conversation panels (#489) fix(claude-code): keep sessions alive while Claude's background work runs (#1102) Rename Agent setup "Providers" to "Harness defaults" (#1348) feat(plugins): feature core plugins and branded catalog browsing (#1246) Improve AI defaults and add Goose configuration (#1266) feat(sidebar): filter channel sections by unread and activity (#1297) feat(plugins): organize settings with guides and focused controls (#1176) Unify Solo chat menus, rename workspaces, quieter membership notices (#1326) Add identity restore UI (#1101) Add native identity backup recovery (#1107) Back up desktop identities only with saved consent (#1106) Add native identity backup consent hooks (#1137) remove the Channel Usage plugin (#1335) fix(messages): retain image geometry across virtualized remounts (#1271) fix(channels): read metadata for a labeled channel whose roster came first (#1289) fix(channel-members): allow adding members to system channels (#1288) fix(unread): recover dropped thread roots for unread thread activity (#1291) test(voice-notes): fix the draft-card race that turned main red (#1315) ci: check dependency policy with cargo-deny (#1321) Signed-off-by: jtennant <jtennant@squareup.com> # Conflicts: # src/bundled/inbox/InboxDetail.test.tsx # src/bundled/inbox/InboxDetail.tsx
…x-session-preview-live * origin/jt/inbox-page-tabs: (25 commits) refactor(inbox): open conversations through conversation.ui.Tabs fix(inbox): retire a Huddle room's retained tabs and keep their focus test(inbox): stop depending on Channels having loaded a thread's channel fix(inbox): close an opened conversation once its room becomes a Huddle Add native Huddles with call controls and conversation panels (#489) fix(inbox): offer no Archive shortcut while Drafts is shown fix(inbox): keep a restored tab's row selected after leaving Inbox fix(claude-code): keep sessions alive while Claude's background work runs (#1102) Rename Agent setup "Providers" to "Harness defaults" (#1348) feat(plugins): feature core plugins and branded catalog browsing (#1246) Improve AI defaults and add Goose configuration (#1266) feat(sidebar): filter channel sections by unread and activity (#1297) feat(plugins): organize settings with guides and focused controls (#1176) Unify Solo chat menus, rename workspaces, quieter membership notices (#1326) Add identity restore UI (#1101) Add native identity backup recovery (#1107) Back up desktop identities only with saved consent (#1106) Add native identity backup consent hooks (#1137) remove the Channel Usage plugin (#1335) fix(messages): retain image geometry across virtualized remounts (#1271) ...
Preserve the existing optional identity restore UI on top of native recovery and consent-gated backups. Current and previous identities remain explicit selections; recovery grants no automatic-backup consent.
The identity service exposes consent read/save hooks for the later UI owner. No consent selection, settings widget or duplicate uploader is added. Hosted Communities copy removes the unconditional claim that the private key never leaves the computer.
The restore tests use the errors emitted by native code and cover begin failure, cancellation failure, cancellation-gated retry and installed-viewer mismatch through the mounted component and real identity service.
Stack: #1137 consent hooks → #1106 gated uploader → #1107 recovery → #1101 restore UI.
Validation: 63 focused frontend tests and 37 native backup/recovery/consent tests passed on Blox; four deliberate real-service mutations failed the intended new assertions before restoration. Required local push hooks passed; five independent reviews found no remaining blockers. Shared Button, Field, RadioGroup and InlineHeader owners are retained; no browser journeys added or removed. Hosted CI is tracked in the PR checks. Rendered theme/width/text and keyboard/pointer checks, attended native sign-in/secure-store behavior and human acceptance remain pending. No real keys were used.