Skip to content

fix(desktop): confirm unlinking and don't repeat pending link requests - #1471

Merged
jonathan308 merged 3 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-account-link-guards
Oct 15, 2026
Merged

jonathan308 merged 3 commits into
codex/desktop-mac-preview-20261012from
fix/desktop-account-link-guards

Conversation

@jonathan308

@jonathan308 jonathan308 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Two account-link controls in the desktop app acted too eagerly:

  1. Unlinking without a confirmation. Settings → Account → Unlink this Mac sent { action: 'unlink' } on the first click. In the development preview the toast immediately read Mac unlinking · Complete. Other actions that remove something (Remove model, Turn off Autopilot, Pause) all confirm first. Unlinking stops attributing the Mac's earnings to the account.
  2. Repeat link requests. Home's footer (?preview&account=unlinked) kept Link account enabled next to the pending Link code: KXQF-7M2P, and while a link operation was running, so every click started another link request. Settings' equivalent button is already disabled while busy.

Found during the second desktop UI audit pass. 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(["Settings: click Unlink this Mac"]):::user --> B2(["unlink sent immediately"]):::bad
    B3(["Home: link code shown"]):::user --> B4["Link account still enabled"]:::bad
    B4 --> B5(["Each click = another link request"]):::bad
  end
  subgraph After["After"]
    direction TB
    A1(["Settings: click Unlink this Mac"]):::user --> A2["UnlinkDialog: Keep linked / Unlink"]:::fix
    A2 --> A3(["unlink only after confirming"]):::good
    A4(["Home: link pending or code shown"]):::user --> A5["Link account disabled / hidden"]:::fix
    A5 --> A6(["One request; the code is the next step"]):::good
  end
  classDef user fill:#1f2937,stroke:#93c5fd,color:#f9fafb
  classDef bad fill:#7f1d1d,stroke:#fca5a5,color:#fef2f2
  classDef fix fill:#065f46,stroke:#6ee7b7,color:#ecfdf5
  classDef good fill:#14532d,stroke:#86efac,color:#f0fdf4
Loading

Legend: blue = user action/state, red = defect, green = changed code / fixed outcome.

Changes

  • components/account/UnlinkDialog.tsx (new): a confirmation dialog following RemoveModelDialog's pattern.
  • features/Settings.tsx: Unlink this Mac opens the dialog. Link account is unchanged.
  • features/Home.tsx: Link account is hidden while a link code is shown, and disabled while busy or while a link operation runs.
  • tests/accountLinkGuards.test.tsx (new): both behaviors. Both tests fail on the base branch.
  • CHANGELOG.md: Unreleased entry.

Validation

cd desktop-app
npx vitest run tests/accountLinkGuards.test.tsx   # 2 fail on base, 2 pass here
npx vitest run tests/accountLinkGuards.test.tsx tests/app.test.tsx tests/updateControls.test.tsx tests/idleMemory.test.tsx tests/accountSignInProgress.test.tsx
npx tsc --noEmit
npx prettier --check src tests
make docs-impact-check BASE=origin/codex/desktop-mac-preview-20261012

Limitations

Fixtures and jsdom only. No real account was linked or unlinked.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Settings' "Unlink this Mac" sent the unlink action on a single click,
unlike Remove model or Turn off Autopilot, which confirm. Add an
UnlinkDialog with Keep linked / Unlink this Mac.

Home's footer kept "Link account" enabled next to a pending link code
and while a link operation ran, so each click started another link
request. Hide it once a code exists and disable it while linking or
busy, as Settings' button already is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Ready Ready Preview Oct 15, 2026 6:11am UTC
d-inference-console-ui-dev Ready Ready Preview Oct 15, 2026 6:11am UTC
d-inference-landing Ready Ready Preview Oct 15, 2026 6:11am UTC
darkbloom-status Ready Ready Preview Oct 15, 2026 6:11am UTC
eigen-homepages-darkbloom Ready Ready Preview Oct 15, 2026 6:11am UTC

Request Review

This Mac's "Finish linking this Mac" step quoted the code inside a
sentence ("Enter code ABCD-1234 in your browser…"), which was easy to
miss and awkward to read off while typing it on the link page. Show the
code on its own, large and letter-spaced, with a Copy code button, and
keep the sentence for what it's for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308

Copy link
Copy Markdown
Collaborator Author

Follow-up 23892e8: the pending link code on This Mac's Finish linking this Mac step was only quoted inside a sentence. It's now shown on its own, large and letter-spaced (selectable as one unit), with a Copy code button next to Open link page. overview.test.tsx and readiness.test.ts cover it (2 fail before, all pass after); full suite 427 passed, tsc and prettier clean.

The large link code on the Finish linking step could wrap at its hyphen
in a narrow column. Keep it on one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jonathan308

Copy link
Copy Markdown
Collaborator Author

Follow-up 8de1288: the large link code on Finish linking this Mac no longer wraps at its hyphen (white-space: nowrap). CSS only; full suite 427 passed.

This branch was successfully deployed

5 active deployments
Preview – d-inference-landing — 8de12880 Deployed Oct 15, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 8de12880 Deployed Oct 15, 2026 by vercel[bot]
Preview – d-inference — 8de12880 Deployed Oct 15, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 8de12880 Deployed Oct 15, 2026 by vercel[bot]
Preview – darkbloom-status — 8de12880 Deployed Oct 15, 2026 by vercel[bot]
benchmarks — 8de12880 Deployed Oct 15, 2026 by jonathan308 via E2E Benchmarks #2675
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