Skip to content

Restore agent tabs, add Connect Claude button to Plan pane - #82

Merged
AgentSeal merged 2 commits into
mainfrom
fix/plan-connect-claude-button
Apr 18, 2026
Merged

AgentSeal merged 2 commits into
mainfrom
fix/plan-connect-claude-button

Conversation

@AgentSeal

Copy link
Copy Markdown
Collaborator

Summary

  • Restore agent tab strip to show every provider detected on the system, not only providers with today's spend. Earlier filter (value > 0) hid the whole row whenever one provider had activity today, which also made the Plan pill unreachable (it gates on selectedProvider == .claude).
  • Add a Connect Claude button to the Plan pane's no-credentials and failed states. Launches Terminal.app with claude login via osascript using a hardcoded literal. Machines without Terminal.app see an inline fallback instruction instead of a silent no-op.
  • Refactor TerminalLauncher.runInTerminal to re-validate non-literal input against CodeburnCLI.isSafe as defense in depth, and update the file header to describe the actual invariant.

Test plan

  • swift build clean
  • swift test 10/10 pass
  • Packaged universal .app via mac/Scripts/package-app.sh, installed to ~/Applications/, verified in popover:
    • Agent tabs show All / Claude / Codex / Cursor / Pi even when Codex/Cursor/Pi have $0 today
    • Clicking Claude reveals the Plan pill
    • Clicking Connect Claude opens Terminal with claude login
    • After OAuth completes, Retry loads subscription data

Tabs were filtering on `value > 0` (today's spend), which hid the row
whenever only one provider had activity today. The CLI's providers map
already contains only providers detected on the system, so showing the
map as-is matches user intent: a tab for each installed tool,
regardless of today's spend. Tab strip only hides when nothing is
detected.

This also makes the Plan pill reachable again: it gates on
`selectedProvider == .claude`, which required clicking the Claude tab
to select.
The Plan pane previously told users to "run claude login in your
terminal, then retry" with no way to start the flow from the app.
Added a primary Connect Claude button on both the no-credentials and
failed states that launches Terminal.app with `claude login`, so the
OAuth flow is one click away.

TerminalLauncher.openClaudeLogin() uses a hardcoded literal, so no
user input reaches AppleScript. Refactored the common path into
runInTerminal(command:preValidated:) which re-validates any non-
literal input against CodeburnCLI.isSafe as defense-in-depth.

On machines without Terminal.app (iTerm/Ghostty/Warp), the button
surfaces an inline instruction to run `claude login` manually instead
of failing silently.
@AgentSeal
AgentSeal merged commit 7a5cb32 into main Apr 18, 2026
2 checks passed
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.

2 participants