Skip to content

Homogenize Add a subscription flows in the agents panel - #19926

Merged
dhh merged 1 commit into
quattrofrom
homogenize-agent-add-flows
Nov 23, 2026
Merged

dhh merged 1 commit into
quattrofrom
homogenize-agent-add-flows

Conversation

@dhh

@dhh dhh commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

What changes

Homogenizes the "Add a subscription" (and pay-as-you-go / re-auth) flows in the agents panel and fixes several inconsistencies between providers:

  • Mask every pasted secret: pasteField now sets password: true unconditionally so Gemini (agy) and Claude sign-in codes are masked with password dots just like API keys.
  • Consistent placeholders & clearing: API-key fields show "API key", sign-in code fields (both Gemini and Claude) show "Code", and pasteField clears stale input whenever leaving the prompt or flow.
  • Uniform post-submit checking state: Submitting a pasted code for Claude or Gemini now hides the paste field, returns keyboard focus to the panel (so Esc works immediately), hides the paste/reopen links while verifying, and switches the bold heading to "Checking the code…" — matching API-key "Checking the key…".
  • Fix keyboard input in the second-account name field: Block PanelKeyCatcher while addNameField is focused so typing letters like h/j/k/l/x, Space, or Return isn't stolen when naming an additional Claude, Codex, or Grok account.
  • Keep the provider hero steady across name, running, and error: Keep the chosen provider's mark and name in the hero instead of snapping back to "Agents", clear addProvider on cancel/completion so More never shows a stale "Add <Provider> account" subtitle, and share one beginAdd reset helper between startAdd and signInAgain.
  • Update stale API key copy: Change agents.apiKeyHint from "It's checked with %1, then saved for pi and opencode." to "It's checked with %1, then saved in OpenCode." (keys are only saved in OpenCode).
  • Eliminate event-order flash & stderr mismatch in omarchy-agent-account-add: Emit @@omarchy key / @@omarchy paste before @@omarchy status so the panel doesn't flash the browser-login prompt, and redirect stderr (2>&1) on multi-account claude/codex/grok logins to match single-account CLIs.

Verification

  • Ran bash test/shell.d/agents-panel-test.sh, bash test/shell.d/agent-account-test.sh, and bash test/shell.d/i18n-test.sh — all passed (including new assertions for Claude/Gemini paste-submit hiding & re-prompting, and @@omarchy key arriving before @@omarchy status).
  • Restarted the shell (omarchy-restart-shell) with zero QML warnings in journalctl --user -t quickshell.
  • Visually verified in the live agents panel:
    • Additional Claude account name stage displays Claude's mark/title (Setting up) and accepts "Work" via keyboard without k being intercepted.
    • Cancelling and opening Subscriptions > More displays "Add an agent / SUBSCRIPTION, PER USE, OR LOCAL" with no stale provider heading.

Screenshots

Verified locally in the live UI (captures saved in scratch dir; not committed to the repo).

@greptile-apps

greptile-apps Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Makes subscription and API-key sign-ins more consistent in the agents panel.

  • Pasted keys and codes use a masked field and a shared checking flow.
  • The chosen provider stays visible while an account is being named or signed in.
  • Provider login errors now appear with the rest of the sign-in output.

No actionable issues were identified. Review was based on source inspection; tests were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  Pick[Choose provider] --> Additional{Additional account?}
  Additional -->|Yes| Name[Name account]
  Additional -->|No| Running[Start sign-in]
  Name --> Running
  Running --> Prompt[Browser login or masked input]
  Prompt --> Checking[Check submitted code or key]
  Checking -->|Another prompt| Prompt
  Checking -->|Success| Done[Clear provider and refresh accounts]
  Running -->|Failure| Error[Show error with provider heading]
  Checking -->|Failure| Error
Loading

Reviews (1) · Last reviewed commit: "Homogenize Add a subscription flows in t..." · Reviewed by Greptile

@omarchybot

Copy link
Copy Markdown
Collaborator

Read the diff, description, existing review comments, and the base branch’s contributor rules. Classification is unsettled: GPT-6 High in Codex classified this as a bug fix because account-name keystrokes are intercepted and sign-in prompts behave inconsistently; DeepSeek V4.1 Flash (default effort) classified it as an enhancement.

No worker tests or verification review ran. This is waiting for the maintainer to resolve the classification before verification continues.

@dhh
dhh merged commit 68ff662 into quattro Nov 23, 2026
3 checks passed
@dhh
dhh deleted the homogenize-agent-add-flows branch November 23, 2026 16:21
@emirb emirb added this to the 4.6.0 milestone Dec 1, 2026
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.

3 participants