Repository navigation
fix(desktop): ask signed-out Macs to sign in instead of loading earnings forever - #1460
Merged
jonathan308 merged 1 commit intoOct 15, 2026
Conversation
useInsights reads earnings only while the account is signed in or has legacy data, but Earnings, Home's fleet chart and the Models earnings order chose their message from `linked`. Signing out, or the dashboard session expiring after 30 days, clears the session without clearing the provider link, so those views showed "Loading…" forever with no retry. Expose whether insights can load from the hook and show a sign-in prompt when a linked Mac cannot read them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jonathan308
had a problem deploying
to
benchmarks
October 13, 2026 22:47 — with
GitHub Actions
Error
jonathan308
merged commit Oct 15, 2026
94ef355
into
codex/desktop-mac-preview-20261012
20 of 22 checks passed
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useInsightsonly reads earnings whenaccount.signed_in || account.legacy_data; otherwise its key is empty and nothing is requested. The three views that render its result chose their message fromstate.linkedinstead:Sign-out (
DesktopAccountActions.swift) clears the dashboard session but not the provider link (AuthTokenStore), and the dashboard session also expires after 30 days. In both cases,linked: truetogether withaccount: { signed_in: false, legacy_data: false }left these views loading forever.Reproduction: render
Earningswithlinked: trueandaccount: { signed_in: false, legacy_data: false }. Before: Loading settled earnings…. After: Sign in to see earnings · Sign in to your Darkbloom account from the sidebar to load settled earnings. A signed-in account still shows loading while it reads.Found during a desktop UI audit. Base:
codex/desktop-mac-preview-20261012(unmerged desktop stack: #1354 plus the signed preview packaging commits). The diff contains only this fix. The Desktop / frontend check on this base also needs #1455.Before / After
flowchart LR subgraph Before["Before"] direction TB B1(["Sign out / session expires<br/>(link kept)"]):::user --> B2["useInsights: key '' → no read"]:::code B2 --> B3["view checks linked → true"]:::bad B3 --> B4(["'Loading settled earnings…' forever"]):::bad end subgraph After["After"] direction TB A1(["Sign out / session expires<br/>(link kept)"]):::user --> A2["useInsights: key '' → available false"]:::fix A2 --> A3["view checks linked, then available"]:::fix A3 --> A4(["'Sign in to see earnings'"]):::good end classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb classDef code fill:#312e81,stroke:#a5b4fc,color:#eef2ff classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2 classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5 classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4Legend: blue = user action, indigo = unchanged code path, red = defect, green = changed code / fixed outcome.
Changes
features/insights/useInsights.ts: returnsavailable, which is true exactly when it will read earnings.features/Earnings.tsx,features/home/FleetEarnings.tsx,features/models/ModelEarnings.tsxandModels.tsx: tell signing in apart from loading.tests/earningsSignedOut.test.tsx: uses the real hook, so the hook and view are tested together. The signed-out case fails on the base branch, and signed-in still shows loading.CHANGELOG.md: Unreleased entry.Validation
Limitations
DesktopAccountActions.swiftandDesktopSnapshot.swift.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.