Repository navigation
feat(providers): manage isolated cli logins from the app - #732
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 14, 2026 15:45
nixuuu
force-pushed
the
feat/provider-cli-auth
branch
from
November 14, 2026 16:06
7e2d5f2 to
c24638c
Compare
nixuuu
force-pushed
the
feat/provider-cli-auth
branch
from
November 14, 2026 16:41
bc199f8 to
bca7839
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 14, 2026
## Why
Feedback from Settings → Providers → Codex (Device login): a signed-in
account offered **"Sign in again"**, which suggests something signed the
user out.
## What
One state-aware action label, shared by web and mobile through
`accountAction()` / `ACCOUNT_ACTION_LABELS` in
`@canopy/domain/provider-accounts`. It applies to every harness (Codex,
Claude, Grok).
| Login state | Action |
|---|---|
| none, error or unknown | **Sign in** |
| expired, or a turn rejected it (`expired`) | **Sign in again** |
| signed in, or login saved (Grok) | **Change account** |
- **Provider card (web LoginPanel, mobile ProviderLoginActions):** uses
the label. The confirm step keeps "This changes the CLI account on
<computer>, as <cli> does." Its button repeats the action (§8.3). **Sign
out** stays beside the action and hides only when the CLI is not signed
in.
- **Account status row (web):** the command popover uses the same label.
It is hidden when the in-app sign-in panel is next to it, so the action
does not show twice. It stays in "All workers" and Workers → Provider
accounts.
- **Failed turn card (web):** the login just failed, so the action is
"Sign in again", or "Sign in" when the CLI reports no login. The hint
("…, then retry.") and the confirm button match.
- **Summary line** ("Authenticated · ChatGPT") and the status labels
have no action, so they are unchanged. Mobile turn errors show only CLI
hints, with no button.
- Docs: `docs/provider-accounts.md` (status row) and a `provider
account` glossary entry in `docs/copy.md`.
Related: #696, #732
## Copy audit (docs/copy.md §8)
| Where | Before | After | Reason |
|---|---|---|---|
| Provider card button, signed in (web + mobile) | Sign in again / Sign
in | Change account | The login works. "Again" reads as a sign-out.
"Change" fits better than "Switch", because the new login replaces the
old one and there is no second account to switch back to. |
| Provider card button, expired/rejected | Sign in again (web) / Sign in
(mobile) | Sign in again | Correct here. Web and mobile now agree. |
| Provider card button, not signed in | Sign in | Sign in | Unchanged. |
| Confirm button (web SignInConfirm, mobile dialog) | Sign in | Sign in
/ Sign in again / Change account | A confirmation repeats the title's
verb (§8.3). |
| Mobile confirm title | Sign in? | Sign in? / Sign in again? / Change
account? | Matches the button. |
| Own-login confirm text | This signs in only this instance on X. | This
changes only this instance’s account on X. | Correct for all three
actions. One idea, 8 words. |
| Status row popover trigger (web) | Sign in / Sign in again | Sign in /
Sign in again / Change account | Same rule. Not shown next to the in-app
action (§2.12). |
| Failed turn hint + button (web) | Sign in, then retry. / Sign in |
Sign in again, then retry. / Sign in again (or Sign in) | The turn
showed the login was rejected. |
| Sign out (web + mobile) | Always shown | Hidden when not signed in |
Nothing to sign out. |
- Glossary: added `provider account`. Banned for its action: "switch
account", and "sign in again" while the login works.
- Buttons start with a verb, use sentence case and have no period. No
new errors or empty states. No sentences with "soul".
- Length: "Change account" is shorter than "Sign in again", so wrapping
is the same or better at phone width.
## Checks
- `bun install`, `gen:check`, `typecheck`, `lint`, `format:check`:
clean.
- Web build (`vite build`): clean.
- Mobile `expo export --platform all` (Android + iOS): clean.
- Expo fingerprint unchanged against `dev` (android `906dc944…`, ios
`138e0c6b…`). The change is JS only and ships OTA.
- Not run: `check:tmp` (full suite; no tests cover these labels and none
were added, per the no-UI-tests rule) and a live browser pass.
This was referenced Nov 16, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 23, 2026
Fixes: #732 Codex CLI 0.171.0 rejects atomic credential replacement when `auth.json` has another hard link. If the source was already replaced, worker and bot homes can still hold the old file. - Remove the hard-link fallback and detach verified legacy aliases, including inactive bot conversations and configured instance homes. - Preserve detached files under a backup name in managed homes. Existing bot conversations resume with the current login. - Show a Windows Developer Mode hint when Canopy cannot create the symbolic link. ## Verification - Linux: 26 focused worker tests passed, including an existing bot conversation with a hard link to the same old file as the thread's backup. - Linux: Codex CLI 0.171.0 reproduced the hard-link write error and saved through a symbolic link using synthetic credentials. - Worker typecheck, edited-file lint and formatting, and `git diff --check` passed. - The native Windows CI job now runs the two migration test files. A real ChatGPT account and Windows desktop session are outside the local verification. ## Copy audit The existing account error now explains that Canopy could not use the device login and names Windows Developer Mode as the action. The detail uses two sentence-case sentences, contains no account data, and conveys the action in text.
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.
Claude, Codex and Grok device-login instances now use the terminal's live credential store while retaining isolated agent configuration. Web, desktop and mobile can sign in and sign out through the official CLIs; own-login instances mutate only their isolated store.
Claude uses
CLAUDE_SECURESTORAGE_CONFIG_DIRfor both keychain and file storage, including bots and text generation. Codex keeps a refreshable link instead of a stale copy; Windows can use a hard link when symlinks are unavailable. Grok retainsGROK_AUTH_PATHand reports saved credentials without claiming their validity.Auth commands require strict worker ownership, reject platform workers and linked peers, share one flight per credential store, and keep outcomes tied to a specific login. Confirmations name the computer and explain terminal effects. The additive
provider_cli_auth_v1capability protects old workers. Authorization codes remain transient and CLI output is never logged or forwarded.Related: #696, #724.
Validation:
GROK_AUTH_PATHmakes the device instance available while isolated homes remain separate; removing or disabling a sibling during Claude sign-in still publishes that login's completion. ConfigApplied also queues a fresh account read after an older in-flight report.138e0c6b171c82b4933e86808cdfef56da73b8c6; Android906dc944f94eb8333fa384ed9f198834fdd30d13.Copy audit (§8):
All changed copy uses sentence case, action verbs and text cues independent of colour. No empty states or personality copy were added. Reviewed desktop/phone widths, both themes and short, typical and long computer names; confirmations retain full names while the status label truncates.