Skip to content

fix(settings): provide guidance when adding accounts in remote runtime scope - #20043

Closed
denis-sj wants to merge 3 commits into
stablyai:mainfrom
denis-sj:fix/remote-runtime-add-account-guidance-20009
Closed

denis-sj wants to merge 3 commits into
stablyai:mainfrom
denis-sj:fix/remote-runtime-add-account-guidance-20009

Conversation

@denis-sj

Copy link
Copy Markdown
Contributor

ELI5

When Orca is connected to a remote server runtime, accounts cannot be added or re-authenticated through local browser sign-in. Previously the buttons were simply disabled without explanation. Now hovering or clicking those disabled buttons displays guidance on how to run orca account add in a terminal on the remote server.

What Changed

  • In accounts-pane-claude-section.tsx: Wrapped the "Add Account" and "Re-authenticate" buttons with a tooltip when isRemoteAccountScope is true. Clicking the disabled button displays an informational toast notice, and hovering shows a tooltip with instructions to run orca account add --agent claude.
  • In accounts-pane-codex-section.tsx: Wrapped the "Add Account" button in the same tooltip/toast notice pattern instructing the user to run orca account add --agent codex.
  • In accounts-pane-codex-account-row.tsx: Wrapped the "Re-authenticate" button in the same tooltip/toast notice pattern instructing the user to run orca account add --agent codex.
  • Added localized strings to src/renderer/src/i18n/locales/en.json.
  • Updated AccountsPane.test.tsx to assert that remote guidance tooltip copy is rendered when in remote server scope and omitted in local scope.

Why

When isRemoteAccountScope is active, the <Button> component has disabled={isRemoteAccountScope || ...}, which applies disabled:pointer-events-none. This dropped all pointer events and prevented clicks or hovers from giving any feedback to the user. Wrapping the disabled button inside a span trigger with a tooltip and click-to-toast notice ensures users clearly understand why the button cannot be clicked locally and gives them the exact terminal command to run on the server instead.

Linked Issue

Fixes #20009

Visual Proof

N/A - Non-interactive static rendering in automated tests and standard tooltip/toast UI feedback on disabled buttons.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated:
    • pnpm test src/renderer/src/components/settings/AccountsPane.test.tsx passes
    • pnpm typecheck passes
    • pnpm run check:code-quality:changed passes
    • pnpm run verify:localization-catalog passes

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: fe941884-a055-49e6-b241-619e1e17f995

📥 Commits

Reviewing files that changed from the base of the PR and between f3a0d81 and 0b18e6f.

📒 Files selected for processing (5)
  • src/renderer/src/components/settings/AccountsPane.test.tsx
  • src/renderer/src/components/settings/accounts-pane-claude-section.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-account-row.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-section.tsx
  • src/renderer/src/components/settings/accounts-pane-remote-action-wrapper.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/settings/AccountsPane.test.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change extracts shared remote-action behavior for Claude and Codex account controls. Remote actions show localized server commands and display notices through a common wrapper. Tests mock tooltip rendering and verify both commands in remote scope and neither command in local scope.

Priority: ➖ Normal

Severity of issue fixed: Medium

Merge Risk: 🔵 Low · up to 0b18e

Remote account guidance may remain inaccessible through keyboard interaction at the affected account actions, so this should be confirmed before merge.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding guidance for account actions in remote runtime scope.
Description check ✅ Passed The description explains the user impact, changes, rationale, linked issue, testing, and checklist. It is mostly complete, but the Visual Proof section marks an interactive UI change as N/A, and the R…
Linked Issues check ✅ Passed The changes satisfy issue #20009. Remote Claude and Codex add-account actions show tooltips and informational toasts with the required orca account add --agent claude and `orca account add --agent c…
Out of Scope Changes check ✅ Passed The wrapper update, account-section changes, localized strings, and focused tests directly support issue #20009. The changes preserve local runtime behavior. No unrelated change is demonstrated.
  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: d0317068-ee82-464e-b458-875355353e23

📥 Commits

Reviewing files that changed from the base of the PR and between e187c82 and 69d3071.

📒 Files selected for processing (5)
  • src/renderer/src/components/settings/AccountsPane.test.tsx
  • src/renderer/src/components/settings/accounts-pane-claude-section.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-account-row.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-section.tsx
  • src/renderer/src/i18n/locales/en.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild>
<span className="inline-flex cursor-not-allowed" onClick={() => toast.info(notice)}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make the three remote guidance triggers keyboard-accessible.

TooltipTrigger asChild attaches the trigger to a plain <span> in all three remote controls. The spans have no focus target or keyboard handler, while the nested buttons are natively disabled. Keyboard users cannot open the tooltip or invoke the guidance toast. Use a shared focusable, keyboard-activatable wrapper for Claude account addition, Codex account addition, and Codex re-authentication. Keep the nested action buttons natively disabled.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — a few DRY and design-system suggestions inline.

Reviewed changes

  • RemoteActionTooltipWrapper — a new local wrapper in accounts-pane-claude-section.tsx that, in remote scope, wraps a disabled button in a tooltip-trigger span that fires a toast.info on click and a tooltip on hover.
  • Codex section + account row — the same tooltip/toast pattern, re-implemented inline in accounts-pane-codex-section.tsx and accounts-pane-codex-account-row.tsx instead of reusing the wrapper.
  • Localization — eight new AccountsPane strings (remoteAddClaudeNotice, remoteAddCodexTooltip, etc.) added to en.json.
  • Test — AccountsPane.test.tsx mocks the tooltip primitives and asserts the guidance copy renders in remote scope and is absent locally.

ℹ️ Tooltips are being used to teach on labeled buttons

STYLEGUIDE.md ("Tooltips") is fairly explicit: tooltips exist to name a control whose meaning isn't obvious, they "are not the place to teach, persuade, or warn", and you shouldn't reach for one when the control already has a visible label. The Add Account / Re-authenticate buttons here have visible text labels, and the section already shows inline guidance ("Add or re-authenticate accounts on that server"). The tooltip's marginal value is the exact terminal command, which is also conveyed by the click toast. Consider whether the toast (and/or surfacing the command in the existing inline copy) is enough, rather than adding a tooltip that several documented rules discourage.

Technical details
# Tooltip-on-labeled-button design question

## Affected sites
- src/renderer/src/components/settings/accounts-pane-claude-section.tsx:38 — TooltipContent teaching a command on a labeled button
- src/renderer/src/components/settings/accounts-pane-codex-section.tsx:203 — same for Codex add
- src/renderer/src/components/settings/accounts-pane-codex-account-row.tsx:187 — same for Codex re-auth

## Required outcome
- Confirm whether the hover tooltip is wanted, or the click toast + inline section copy already covers the guidance.

## Open questions for the human
- Is the exact command meant to be copyable? If so, plain tooltip text can't be selected; inline code in the section copy would be more useful.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 13b873fd-be31-4425-ba15-676a19555141

📥 Commits

Reviewing files that changed from the base of the PR and between 69d3071 and f3a0d81.

📒 Files selected for processing (5)
  • src/renderer/src/components/settings/AccountsPane.test.tsx
  • src/renderer/src/components/settings/accounts-pane-claude-section.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-account-row.tsx
  • src/renderer/src/components/settings/accounts-pane-codex-section.tsx
  • src/renderer/src/components/settings/accounts-pane-remote-action-wrapper.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/settings/AccountsPane.test.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — one minor accessibility suggestion inline.

Reviewed changes

  • Extracted AccountsPaneRemoteActionWrapper — the file-local RemoteActionTooltipWrapper and the two inline Codex re-implementations are now a single shared module reused by all three call sites.
  • Dropped the nested TooltipProvider — the wrapper now relies on the global App-root provider.
  • Added keyboard/tooltip accessibility — the remote-scope trigger is a focusable role="button" span with a focus ring and Enter/Space → toast, replacing the misleading cursor-not-allowed.
  • Tightened the test — asserts the concrete orca account add --agent claude / --agent codex copy rather than the looser prefix.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Routed pointer events and hid the disabled button from assistive tech — the inner <Button> is now wrapped in an aria-hidden span with pointer-events-none, so the role="button" trigger is the only interactive control a screen reader encounters (resolves the nested-controls concern).
  • Gave the trigger a concise accessible name — aria-label now carries the visible label (actionLabel) rather than the full instruction sentence, so the guidance is announced once as the description instead of doubling as name + description.
  • Tightened the test — locates the disabled button by its closing tag (Add Account</button>) and asserts the concrete orca account add --agent ... copy.

The prior accessibility thread is addressed cleanly: the trigger now exposes a single control whose name matches the visible label, with the guidance delivered once as aria-describedby.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@nwparker

Copy link
Copy Markdown
Contributor

Thanks @denis-sj for this, and for pointing people to orca account add while the button couldn't work.

Since this PR was opened, main has started disabling these buttons in remote scope and explaining why, so most of this change is already there. #31461 now fixes the underlying problem. Add Account works against a remote server: the server runs the Claude or Codex login, and this device opens the page and passes back the code. The note in that PR credits your guidance approach.

Closing this in favour of #31461. Thanks again!

@nwparker nwparker closed this Oct 21, 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.

[Bug]: 'Add account' button does nothing when default runtime is a remote server

2 participants