Skip to content

fix(providers): name the account action by its login state - #747

Merged
nixuuu merged 1 commit into
devfrom
fix/provider-account-actions
Nov 14, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/provider-account-actions

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 14, 2026

Copy link
Copy Markdown
Member

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 , as 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.

A signed-in account offered "Sign in again", which reads as if something
signed the user out. The action now follows the login state on every
harness, on web and mobile: "Sign in" without a login, "Sign in again"
when it expired or a turn rejected it, "Change account" while it works.
The confirm button repeats the action, "Sign out" hides when nothing is
signed in, and the status row no longer repeats the in-app action.

Related: #696, #732
@nixuuu
nixuuu merged commit e49b072 into dev Nov 14, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/provider-account-actions branch November 14, 2026 19:07
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