Repository navigation
fix: prompt unexpectedly signed-out Cloud users once per version - #19966
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughAdds unexpected sign-out detection for cloud-linked profiles. Adds version-aware dismissal state with RPC validation, hydration, persistence, and synchronization. Adds a lazy-loaded recovery card with sign-in, dismissal, feature details, and development preview support. Adds notification stacking, localization, and tests for authentication, visibility, recovery, persistence, and remount behavior. Priority: ➖ Normal Merge Risk: 🔵 Low · up to During background update checks, the recovery card can be displaced even though no update card is visible. This is a bounded presentation issue and should be addressed before release if the notification layout is user-facing. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the change, rationale, implementation, and automated testing. However, it does not provide the required linked issue, and the required visual proof is incomplete for this UI change. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/UnexpectedSignoutCard.tsx (1)
150-150: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse intent-named localization IDs and named interpolation.
These new strings use hash-based
auto.components...IDs. The email interpolation also usesvalue0. Replace the new card IDs with intent-named IDs, use anBased on learnings: “For newly added user-facing strings in stablyai/orca TypeScript and TSX files, follow config/i18n-translation-source.md: use intent-named localization IDs with named interpolation placeholders. Treat existing hash-based IDs as grandfathered.”
Also applies to: 169-171
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: f4d0afec-f92b-4b00-ba21-3fa2b579d56e
📒 Files selected for processing (16)
src/main/orca-profiles/profile-cloud-auth-status.test.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/main/runtime/rpc/methods/client-ui.test.tssrc/renderer/src/app-shell/AppRootSurfaces.tsxsrc/renderer/src/components/UnexpectedSignoutCard.tsxsrc/renderer/src/components/unexpected-signout/unexpected-signout-card.test.tsxsrc/renderer/src/components/unexpected-signout/unexpected-signout-visibility.test.tssrc/renderer/src/components/unexpected-signout/unexpected-signout-visibility.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/store/slices/ui-notice-dismissals.test.tssrc/renderer/src/store/slices/ui/ui-slice-contract-preferences.tssrc/renderer/src/store/slices/ui/ui-slice-hydration-actions.tssrc/renderer/src/store/slices/ui/ui-slice-hydration-sanitizers.tssrc/renderer/src/store/slices/ui/ui-slice-update-actions.tssrc/shared/constants.tssrc/shared/persisted-ui-state-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.
|
|
||
| const email = authStatus?.cloud?.email?.trim() || null | ||
| const canConnect = authStatus?.configured === true | ||
| const updateCardVisible = updateStatus.state !== 'idle' && updateStatus.state !== 'not-available' |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Align the card position with the update-card mount rule.
When updateStatus.state is checking and userInitiated is false, src/renderer/src/app-shell/AppRootSurfaces.tsx lines 113-120 do not mount UpdateCard. Line 122 still moves this card to bottom-[220px]. This leaves an empty gap above the bottom edge. Use the same checking and userInitiated condition here.
There was a problem hiding this comment.
ℹ️ Minor suggestions only — one copy divergence and one positioning nit inline.
Reviewed changes
UnexpectedSignoutCardcomponent — a bottom-right card that prompts users inreconnect-requiredstate to sign back in, with a collapsible feature list, a dev-only preview flag, and sign-in/dismiss actions.- Visibility gate (
shouldShowUnexpectedSignoutCard) — requires hydrated UI state, a resolved app version, configured auth,reconnect-required, and a retained cloud link, correctly excluding explicit sign-out, unconfigured, and connected profiles. - Dismissal persistence — a new
dismissedUnexpectedSignoutVersionfield wired through the RPC schema,getDefaultUIState, hydration sanitizers, and update actions; a session-levelunexpectedSignoutDismissedVersionshistory prevents stale UI sync from re-arming the card. - Recovery observation — an effect stamps dismissal on a genuine reconnect independently of visibility and without repeated writes.
- Tests — adversarial coverage of auth-status derivation, visibility gating, dismissal persistence, and component lifecycle across 13 suites.
The auth/recovery/dismissal logic is correct and the gating is tight; the "once per version" semantics, stale-hydration protection, and preview isolation are all sound.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found in this delta — the catalog alignment is correct and resolves the prior copy-divergence nit.
Reviewed changes
en.jsoncopy alignment —7b4d9e1f2aand5a1c8d3e6fnow match the component's fallback strings verbatim, so English and untranslated-locale users see identical sign-in copy.
The remaining positioning nit (bottom-[220px] vs the dynamic UpdateCard height) from the prior review is unchanged and still optional.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found in this delta — the fixed-offset overlap heuristic is replaced with real flex stacking, resolving the prior positioning nit.
Reviewed changes
NotificationCardStack— a new fixed bottom-right container (flex-col-reverse,overflow-y-auto,pointer-events-nonewith per-childpointer-events-auto) that stacks notification cards by their rendered height.- Per-card positioning removed —
UpdateCard,StarNagCard, andUnexpectedSignoutCardnow render as plain flex children, dropping thebottom-[220px]/updateCardVisibleheuristic and theirfixed/z-40wrappers. - Test harness updated —
UpdateCard.error-card.test.tsxwraps its render inNotificationCardStack.
The OverlayBoundary/RecoverableRenderErrorBoundary wrappers render children without a DOM node, so the stack's [&>*] selectors land on the card roots as intended, and cardRootRef in UpdateCard only clears animation timers, so losing the fixed wrapper is safe.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — one minor test-coverage suggestion below.
Reviewed changes
- Gated the signout card on a fresh auth read —
UnexpectedSignoutCardnow callsfetchOrcaProfileAuthStatus()itself on mount and only renders once it settles (authRefreshReady), replacing theuseOrcaProfileAuthStatusRefreshfire-and-forget hook whose first render could race a stale cached status. The recovery-observation effect and the dev preview path are untouched.
ℹ️ Nitpicks
- The
authRefreshReadytiming gate has no failing-first coverage. Everyunexpected-signout-cardtest seedsorcaProfileAuthStatusasreconnect-requiredand mocks the fetch to resolve immediately, so removing the gate would not fail any test. Holding the fetch promise open, asserting the card stays hidden, then resolving and asserting it appears would lock the fix in — consistent with the PR's reproduce-first testing note.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9d2d0ecc-d85c-40db-93d7-5d6c3a55db7d
📒 Files selected for processing (1)
src/renderer/src/components/UnexpectedSignoutCard.tsx
Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — the verified-auth gate is correct; one test-coverage suggestion inline.
Reviewed changes
- Required verified auth before signout recovery — the mount-time
fetchOrcaProfileAuthStatus()now setsauthRefreshReadyonly when it resolves a non-nullstatus (replacing the.finallythat also fired on failure), and the recovery-observation effect is additionally gated onauthRefreshReady. - Test harness updated — the card test mock now resolves the seeded
statusobject instead ofundefined, matching the new non-nullgate.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Retried transient auth-readiness failures — the mount-time
fetchOrcaProfileAuthStatus()now retries up to three times (500ms apart) before giving up, so a transientnull/failedauthStatus()read no longer permanently suppresses the card and recovery observation for the session.
The retry is bounded, cancellation-safe, and directly resolves the transient-failure concern from the prior round.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Conflict in client-ui-schemas.ts: main (#19966) added dismissedUnexpectedSignoutVersion to UiUpdateFields while this branch moved UiUpdateFields to src/shared/rpc-contract/client-ui-params.ts. Kept the re-export and re-applied main's field at the schema's new home, so the signed-out-user prompt keeps its persisted dismissal field. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

ELI5
Users whose linked Orca Cloud session disappeared get a bottom-right card to sign in again. Explicitly signed-out and unconfigured users never qualify. Dismissing the card or successfully reconnecting keeps it hidden for the running app version.
What Changed
reconnect-required, and a retained cloud link.dismissedUnexpectedSignoutVersionthroughui:set, including defaults, hydration, RPC schema, and parity coverage. Retain observed dismissals in session state so stale UI sync cannot re-arm the card.Why
The recent unexpected sign-out incident left previously signed-in users without a clear path back to Cloud features. Adversarial regression tests exposed the unreachable sign-in dismissal effect, production preview bypass, ineffective preview dismissal, stale hydration re-arming, repeated writes, and inconsistent unconfigured auth acceptance. Each fix was verified after reproducing the failure.
Linked Issue
User-requested follow-up to the recent Cloud sign-out incident; no issue supplied.
Visual Proof
Optional Electron visual check was not run. Component behavior is covered by rendered happy-dom tests; no screenshot attached.
Testing
ORCA_BACKGROUND_LAUNCH=1 pnpm run typecheckORCA_BACKGROUND_LAUNCH=1 pnpm exec vitest run --config config/vitest.config.ts unexpected-signout UpdateCard ui-notice-dismissals client-ui profile-cloud-auth-status profile-cloud-service profile-cloud-session-store— 230 tests across 13 suites.ORCA_BACKGROUND_LAUNCH=1 node config/scripts/check-changed-code-quality.mjsAutomated validation ran on macOS. Auth coverage includes explicit sign-out/link removal, unconfigured profiles, memory-only sessions, missing credentials, decrypt failures, and unreadable credentials. This uses profile/UI state independently of git or folder workspaces; no execution-host or git-provider behavior changes. Windows/Linux/SSH manual checks and a full build were not run.
Agent skill upstream boundary