Skip to content

feat: add active agent count in top bar - #484

Merged
AmethystLiang merged 3 commits into
stablyai:mainfrom
ypatel2022:feat/active-agent-count
Apr 11, 2026
Merged

AmethystLiang merged 3 commits into
stablyai:mainfrom
ypatel2022:feat/active-agent-count

Conversation

@ypatel2022

Copy link
Copy Markdown
Contributor

Summary

Add a titlebar badge that shows how many agents are actively running across all worktrees.

The counter is now pane-aware, so multiple active agents running in split panes within the same terminal tab/worktree are counted separately instead of being treated as a single active agent.

closes #401

Screenshots

UI with 3 agents running:
image

UI with no agents running:
image

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build

AI Review Report

Reviewed the change with an AI coding agent and explicitly checked the main risks in the counting path:

  • undercounting multiple active agents inside split panes in a single terminal tab
  • overcounting stale restored tab titles after PTY exit/ reconnect
  • stale runtime state surviving pane, tab, worktree, or repo teardown

The review flagged the original tab-based implementation as too coarse because one tab title cannot represent multiple simultaneously active pane sessions. The implementation was updated to track live pane titles in renderer state, count working agents per pane when available, and fall back to the legacy tab title only for restored/unmounted tabs where pane-level runtime state does not exist yet. Cleanup was added for pane exit and tab/worktree/repo removal so the badge does not stick after teardown.

This PR is renderer/store logic and CSS only, so the existing platform behavior remains intact.

Security Audit

Reviewed the new logic for input handling, command execution, path handling, auth, secrets, dependency, and IPC risk.

Findings:

  • pane titles originate from existing terminal/PTy title updates; this PR only stores them as plain strings and classifies them with existing agent-status detection logic
  • no new command execution paths were added
  • no new IPC channels or auth-sensitive flows were added
  • no new filesystem/path manipulation was added
  • no dependency changes were made
  • no secrets handling changed

Additional checks:

  • verified teardown paths clear the new pane-title state so stale runtime metadata does not persist in UI state after panes/tabs/worktrees/repos are removed

@AmethystLiang

Copy link
Copy Markdown
Contributor

The core logic in PR 484 for managing the active agent count looks very solid and there is no slop code or broken logic. I verified the pane-level title state management, cleanup logic on pane/tab teardown, and fallback logic for unmounted tabs.

I noticed a minor typecheck error (pnpm typecheck failing due to missing setRuntimePaneTitle and clearRuntimePaneTitle properties in the PtyConnectionDeps interface in TerminalPane.tsx) caused by recent changes in main. I've committed a fix to pass those arguments correctly.

Merging this now. Great work!

@AmethystLiang
AmethystLiang merged commit 788b71f into stablyai:main Apr 11, 2026
1 check passed
AmethystLiang added a commit that referenced this pull request Apr 11, 2026
* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
AmethystLiang added a commit that referenced this pull request Apr 11, 2026
* Revert "Revert "test: verify auto-update notification flow" (#478)"

This reverts commit 988fa02.

* test: fix missing ipc events mock in useIpcEvents.test.ts

* Add usage status bar and Codex account switching (#483)

* 1.1.14

* feat: add active agent count in top bar (#484)

* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Add "No login required" to README features (#486)

* Add "No login required" to top of README features

Highlight that Orca needs no account or login — users bring their own
Claude Code or Codex subscription directly.

* Simplify no-login line and add Codex account switching section

- Trim "No login required" to just the essentials
- Add [New] Hot Swap Codex Accounts section with gif demo

* Fix README badge layout — remove blank lines inside HTML blocks (#488)

Blank lines inside <p> tags cause GitHub to render each badge as a
separate paragraph instead of inline on one row.

* Add Codex account switcher gif (#489)

The gif was referenced in README but never committed.

* Refresh worktree quick jump UI (#487)

* fix: Warp-parity keyboard shortcuts — image paste and line-kill bindings (#491)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Nicer agent list (#492)

* test: mock more missing IPC handlers and store actions in useIpcEvents tests

---------

Co-authored-by: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Yax Patel <74978532+ypatel2022@users.noreply.github.com>
Co-authored-by: Colin Chambachan <colin.chambachan@gmail.com>
Co-authored-by: Ramzi <79337754+heyramzi@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
…i#479)

* Revert "Revert "test: verify auto-update notification flow" (stablyai#478)"

This reverts commit f2ebb3c.

* test: fix missing ipc events mock in useIpcEvents.test.ts

* Add usage status bar and Codex account switching (stablyai#483)

* 1.1.14

* feat: add active agent count in top bar (stablyai#484)

* feat: add active agent count in top bar

* fix: pass missing runtime pane title setters to pty connection

---------

Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Add "No login required" to README features (stablyai#486)

* Add "No login required" to top of README features

Highlight that Orca needs no account or login — users bring their own
Claude Code or Codex subscription directly.

* Simplify no-login line and add Codex account switching section

- Trim "No login required" to just the essentials
- Add [New] Hot Swap Codex Accounts section with gif demo

* Fix README badge layout — remove blank lines inside HTML blocks (stablyai#488)

Blank lines inside <p> tags cause GitHub to render each badge as a
separate paragraph instead of inline on one row.

* Add Codex account switcher gif (stablyai#489)

The gif was referenced in README but never committed.

* Refresh worktree quick jump UI (stablyai#487)

* fix: Warp-parity keyboard shortcuts — image paste and line-kill bindings (stablyai#491)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>

* Nicer agent list (stablyai#492)

* test: mock more missing IPC handlers and store actions in useIpcEvents tests

---------

Co-authored-by: Jinwoo Hong <73622457+Jinwoo-H@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Yax Patel <74978532+ypatel2022@users.noreply.github.com>
Co-authored-by: Colin Chambachan <colin.chambachan@gmail.com>
Co-authored-by: Ramzi <79337754+heyramzi@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com>
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.

Show active agent count in titlebar

2 participants