Skip to content

feat(dashboard): add agent status search board - #11042

Merged
brennanb2025 merged 16 commits into
mainfrom
brennanb2025/agent-dashboard-status-search
Jul 28, 2026
Merged

brennanb2025 merged 16 commits into
mainfrom
brennanb2025/agent-dashboard-status-search

Conversation

@brennanb2025

Copy link
Copy Markdown
Contributor

Summary

  • split completed agents into a dedicated Done column and hide stale Idle agents by default behind a synchronized board setting
  • add search plus multi-select project, workspace-status, and provider-neutral review filters with removable filter chips
  • enrich agent cards with workspace status, cached review state, and collapsed subagent details in both in-window and pop-out dashboards
  • keep sidebar counts, snapshot relays, validation, settings defaults, and localized copy aligned with the new board model

Testing

  • pnpm run typecheck
  • pnpm run lint
  • focused Vitest suite: 9 files, 99 tests passed
  • pnpm test was additionally attempted under local Node 26 (the repo requires Node 24); unrelated localStorage, WSL relay, and PTY timing failures appeared under the full-suite load, so the run was stopped after the dashboard-focused suite had passed independently

@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The Agent Dashboard snapshot now supports distinct done and optional idle buckets, workspace status, review metadata, subagent summaries, and validated idle visibility settings. Snapshot construction incorporates review caches and workspace state. The pop-out adds search, project/status/review filters, removable filter chips, review indicators, workspace swatches, and expandable subagents. Sidebar counts and settings expose done and idle-agent behavior, with updated tests and localized strings.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and testing but omits required Screenshots, AI Review Report, Security Audit, and Notes sections. Add the missing template sections: Screenshots, AI Review Report, Security Audit, and Notes, including the required cross-platform compatibility review.
Docstring Coverage ⚠️ Warning Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main dashboard search/filter board change and is specific enough.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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: 1

🧹 Nitpick comments (3)
src/shared/dashboard-snapshot.ts (1)

10-11: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Make the exported-type comments concise.

These added multi-line comments largely restate the types/UI behavior; reduce them to one non-obvious sentence or remove them. As per coding guidelines, “Comments must be concise, limited to non-obvious information, and preferably one line.”

Also applies to: 22-24

Source: Coding guidelines

src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx (1)

44-73: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Replace JSON.stringify subagent comparison with a manual field check.

JSON.stringify(a.subagents) === JSON.stringify(b.subagents) runs on every memo comparison for every card; a manual length + per-item id/name/dotState comparison avoids the serialization allocation and isn't sensitive to incidental key ordering.

♻️ Proposed fix
+function sameSubagents(
+  a: DashboardCard['subagents'],
+  b: DashboardCard['subagents']
+): boolean {
+  if (a === b) return true
+  if (!a || !b || a.length !== b.length) return a === b
+  return a.every((item, i) => item.id === b[i].id && item.name === b[i].name && item.dotState === b[i].dotState)
+}
+
 function sameCard(a: DashboardCard, b: DashboardCard): boolean {
   return (
     ...
-    JSON.stringify(a.subagents) === JSON.stringify(b.subagents) &&
+    sameSubagents(a.subagents, b.subagents) &&
     ...
   )
 }
src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx (1)

254-257: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Condense this layout walkthrough.

Keep only the non-obvious rationale in one concise line, or remove it. As per coding guidelines, “Comments must be concise, limited to non-obvious information, and preferably one line.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 89e87f9b-9150-4d1d-9c73-2f0ba2221bdb

📥 Commits

Reviewing files that changed from the base of the PR and between 9a8e21a and f648133.

📒 Files selected for processing (31)
  • src/main/ipc/dashboard-payload-validation.test.ts
  • src/main/ipc/dashboard-payload-validation.ts
  • src/renderer/src/components/dashboard-popout/AgentDashboardFilterChips.tsx
  • src/renderer/src/components/dashboard-popout/AgentDashboardToolbar.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.test.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.test.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx
  • src/renderer/src/components/dashboard-popout/agent-board-filtering.test.ts
  • src/renderer/src/components/dashboard-popout/agent-board-filtering.ts
  • src/renderer/src/components/dashboard/AgentDashboardSettingsMenu.tsx
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.test.ts
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.ts
  • src/renderer/src/components/dashboard/dashboard-card-context.ts
  • src/renderer/src/components/dashboard/useAgentBucketCounts.ts
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.test.tsx
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.ts
  • src/renderer/src/components/dashboard/useLiveDashboardSnapshot.ts
  • src/renderer/src/components/settings/AgentDashboardExperimentalSetting.tsx
  • src/renderer/src/components/settings/ExperimentalPane.test.tsx
  • src/renderer/src/components/sidebar/SidebarNav.test.tsx
  • src/renderer/src/components/sidebar/SidebarNav.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/shared/constants.test.ts
  • src/shared/constants.ts
  • src/shared/dashboard-snapshot.ts
  • src/shared/types.ts

…shboard-status-search

# Conflicts:
#	src/main/ipc/dashboard-payload-validation.ts
#	src/renderer/src/components/dashboard-popout/AgentKanbanBoard.test.tsx
#	src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx
#	src/renderer/src/components/dashboard-popout/AgentKanbanCard.test.tsx
#	src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx
#	src/renderer/src/components/dashboard/build-dashboard-snapshot.ts
#	src/renderer/src/components/dashboard/useDashboardPopoutBridge.ts
#	src/renderer/src/components/dashboard/useLiveDashboardSnapshot.ts
#	src/shared/dashboard-snapshot.ts

@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

🧹 Nitpick comments (1)
src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx (1)

90-96: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Review equality only tracks number/state.

If DashboardCardReview carries other rendered/derived fields later, memoization will silently go stale. Worth a sameReview helper mirroring sameSubagents so the comparison stays next to the type.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2114cf92-53c1-41d7-9af1-5e7bcecc57b5

📥 Commits

Reviewing files that changed from the base of the PR and between f648133 and 28c4790.

📒 Files selected for processing (19)
  • src/main/ipc/dashboard-payload-validation.test.ts
  • src/main/ipc/dashboard-payload-validation.ts
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.test.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.test.tsx
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.test.ts
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.ts
  • src/renderer/src/components/dashboard/useAgentBucketCounts.ts
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.test.tsx
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.ts
  • src/renderer/src/components/dashboard/useLiveDashboardSnapshot.ts
  • src/renderer/src/components/settings/AgentDashboardExperimentalSetting.tsx
  • src/renderer/src/components/settings/ExperimentalPane.test.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (18)
  • src/renderer/src/components/dashboard/useAgentBucketCounts.ts
  • src/main/ipc/dashboard-payload-validation.test.ts
  • src/renderer/src/components/settings/AgentDashboardExperimentalSetting.tsx
  • src/renderer/src/components/settings/ExperimentalPane.test.tsx
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.ts
  • src/renderer/src/components/dashboard-popout/AgentKanbanCard.test.tsx
  • src/renderer/src/components/dashboard/useDashboardPopoutBridge.test.tsx
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.test.ts
  • src/renderer/src/components/dashboard/useLiveDashboardSnapshot.ts
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx
  • src/renderer/src/components/dashboard/build-dashboard-snapshot.ts
  • src/renderer/src/components/dashboard-popout/AgentKanbanBoard.test.tsx
  • src/main/ipc/dashboard-payload-validation.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ko.json

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Electron validation on the PR branch:

  • Verified the four dashboard columns and counts, including Idle.
  • Verified workspace-status swatches expose accessible names.
  • Verified singular 1 subagent and the expanded subagent card.
  • Applied the real In progress filter and verified the chip plus 1 of 4 shown.

The isolated Electron profile used representative state seeded into the real Zustand store; it did not depend on live PTYs.

Agent dashboard overview

Agent dashboard filtered to In progress

…shboard-status-search

# Conflicts:
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/ja.json
#	src/renderer/src/i18n/locales/ko.json
#	src/renderer/src/i18n/locales/zh.json

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/renderer/src/i18n/locales/es.json (1)

5677-5677: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Mention completed agents in the dashboard description.

This copy still says the board monitors agents in attention, working, and idle states, but this PR adds a separate Done column. Update the Spanish description to include completed agents so it accurately reflects the available board buckets.

src/renderer/src/i18n/locales/ja.json (1)

5662-5662: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update the dashboard description for Done and optional Idle agents.

This copy only mentions attention, working, and idle agents, while the board now includes a Done column and hides Idle agents by default. Update it to describe completed agents and make Idle visibility conditional.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2f115c4c-3b16-41a0-aa59-19e3f76e48c0

📥 Commits

Reviewing files that changed from the base of the PR and between ce2ee52 and bd28983.

📒 Files selected for processing (5)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/i18n/locales/en.json

Comment on lines +60 to +68
for (let index = 0; index < a.length; index += 1) {
if (!(index in a) || !(index in b)) {
if (index in a !== index in b) {
return false
}
continue
}
const subagent = a[index]
const other = b[index]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Unreachable sparse-array guard in sameSubagents

Both a and b are typed as DashboardCardSubagent[] — regular dense JavaScript arrays. For any index in the range 0..a.length-1, index in a is always true, so the if (!(index in a) || !(index in b)) branch can never be entered. The inner check is dead code that adds confusion without providing any safety. The comparison can be simplified to a direct field-by-field equality check.

Suggested change
for (let index = 0; index < a.length; index += 1) {
if (!(index in a) || !(index in b)) {
if (index in a !== index in b) {
return false
}
continue
}
const subagent = a[index]
const other = b[index]
for (let index = 0; index < a.length; index += 1) {
const subagent = a[index]
const other = b[index]

@greptile-apps

greptile-apps Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR introduces a dedicated Done kanban column (splitting it away from Idle), a search + multi-select filter toolbar (project, workspace status, PR/MR review state), enriched agent cards (workspace-status dot, review pill, collapsible subagent list), and a board-level toggle to show/hide stale Idle agents. The snapshot, validation, sidebar counts, and i18n keys are all updated in step.

  • done is now its own DashboardBucket; bucketForState routes completed agents there and showIdle controls whether the Idle column is rendered at all.
  • buildDashboardSnapshot gains an options parameter (includeCardDetails, includeFilterOptions) so the lightweight sidebar counter path skips the heavier resolveDashboardCardContext / subagent-tree work.
  • filterDashboardCards implements the client-side predicate; cards whose linked review is known to exist but whose state hasn't been fetched yet receive reviewState = null and are excluded by any active reviewStates filter (noted in a previous review comment).

Confidence Score: 5/5

Safe to merge; the new Done column, filter toolbar, and card enrichment are well-contained and the snapshot/validation changes are backward-compatible.

The done bucket split is handled consistently across the snapshot builder, validation, sidebar counts, and board rendering. The includeCardDetails guard keeps the sidebar path cheap. The only known rough edge is the null-review-state exclusion in agent-board-filtering.ts, which was flagged in a prior review pass and is a narrow edge case.

Files Needing Attention: agent-board-filtering.ts for the null-review-state exclusion behaviour; AgentKanbanCard.tsx for the unreachable sparse-array branch in sameSubagents (dead code, no runtime impact).

Important Files Changed

Filename Overview
src/shared/dashboard-snapshot.ts Adds done bucket, DashboardCardReview/Subagent types, filter option types, and optional showIdle/filterOptions fields to the snapshot type; EMPTY_DASHBOARD_SNAPSHOT updated accordingly
src/renderer/src/components/dashboard-popout/agent-board-filtering.ts New filtering module; cards with a linked but not-yet-fetched review get reviewState=null and are excluded by any active reviewStates filter (previously noted P2)
src/renderer/src/components/dashboard/build-dashboard-snapshot.ts done now maps to its own bucket; subagent tree and workspace/review context enrichment added per worktree, guarded behind includeCardDetails flag; filterOptions populated from activeWorktrees
src/renderer/src/components/dashboard/dashboard-card-context.ts New file resolving workspace status and review state per worktree; delegates to existing prCache/hostedReviewCache helpers
src/renderer/src/components/dashboard-popout/AgentKanbanCard.tsx Card restructured with inner terminal button, subagent accordion, and footer terminal button; adds ReviewPill, workspace status dot, and sameSubagents memo comparison with previously noted dead code
src/renderer/src/components/dashboard-popout/AgentKanbanBoard.tsx Adds visibleBuckets/visibleCards/filteredCards memos and AgentDashboardToolbar; header count now uses visibleCards.length
src/renderer/src/components/dashboard-popout/AgentDashboardToolbar.tsx New toolbar with search input, project/workspace-status/review dropdown filters, and result count; option counts computed from all visible non-idle cards
src/main/ipc/dashboard-payload-validation.ts Adds validators for filterOptions, DashboardReview, and DashboardSubagents; new done bucket and review states included in allow-sets
src/renderer/src/components/dashboard/useLiveDashboardSnapshot.ts Now subscribes to hostedReviewCache, prCache, and workspaceStatuses in addition to prior deps; memo dependency array updated to match
src/renderer/src/components/sidebar/SidebarNav.tsx Adds done dot class (emerald), showIdle prop to DashboardBucketCounts, and idle filtering in sidebar badge

Reviews (4): Last reviewed commit: "fix(dashboard): preserve review and boar..." | Re-trigger Greptile

@brennanb2025
brennanb2025 merged commit 13c193a into main Jul 28, 2026
25 checks passed
nwparker added a commit to nwparker/orca that referenced this pull request Jul 28, 2026
stablyai#11042 added snapshot-level filterOptions whose project labels are
repo.displayName -- the same unbounded source this PR already bounds for
card.repoName, but one level up where dropping a card cannot recover it.
An over-long project name would fail isDashboardFilterOptions and take
the entire snapshot with it, which is the exact frozen-board failure the
per-card drop was added to end. Workspace-status labels are already
capped at 32 by workspace-statuses.ts, so only projects needed this.

Co-authored-by: Orca <[email protected]>
brennanb2025 added a commit that referenced this pull request Jul 28, 2026
…t-dashboard-ctrl

Resolves three dashboard conflicts against #11042 (agent status search board):
- dashboard-payload-validation.ts: keep both validator constant blocks.
- build-dashboard-snapshot.ts: intersect main's DashboardCardContextState with
  this branch's Partial<DashboardCardTerminalInputState>, and gate the card's
  terminalInput on main's new includeCardDetails so the sidebar's bucket counts
  do not pay host resolution on every agent-status tick.
- useLiveDashboardSnapshot.ts: union main's review/status slices with this
  branch's host-profile slices.
brennanb2025 added a commit that referenced this pull request Jul 28, 2026
The count path main added in #11042 renders no cards, so it must not pay a
per-pty host resolution on every agent-status tick. Both assertions run against
a card that does have a live pty, so only the gate keeps the profile off.
nwparker added a commit that referenced this pull request Jul 29, 2026
* fix(perf): correct three 07-27 perf regressions

Traversal capacity cap no longer scales with worker concurrency
(#11026). retainWorkspaceSpaceScanEntry charged a traversal-wide entry
counter, so N workers each holding a listing multiplied the live charge.
At concurrency 48 a 48x2,100 tree (100,848 entries) hit the 100,000 cap
while 100x1,500 (150,100 entries, 50% more) passed, and scanLocalWorktree
treats the capacity error as terminal, reporting an intact worktree as
"Unavailable" with sizeBytes 0. The cap is now per directory listing --
the only quantity fixed by directory shape -- restoring the invariant
docs/workspace-space-scan-resource-bounds.md already states. Aggregate
live retention stays bounded by the unchanged 64 MiB byte cap.

Note: releasing each entry's charge at dispatch (the originally suggested
fix) was measured and does not help; the peak is set at admission, before
any entry is dispatched.

Repo image icons are no longer fully base64-decoded on every snapshot
publish (#11012). sanitizeRepoIcon reached decodeBase64Prefix, which
sized its buffer to the whole payload to read a 24-byte header, running
synchronously inside ipcMain.handle at a 250 ms throttle. Validation is
now memoized on source+src in a BoundedMap. Measured for 10 icons x
256 KB: 37.34 ms -> 0.67 ms per publish.

One over-long card label no longer discards the entire snapshot (#11012).
isDashboardSnapshot was all-or-nothing and dashboard-popout returned
early with no log while replaying lastSnapshot, so `orca terminal rename
--title "<1025+ chars>"` froze the pop-out board on its last good paint
with nothing surfaced. Labels are truncated at the producer, the
validator drops only the offending card, and both the rejection and the
drop are logged. The bound now lives in the shared snapshot contract so
producer and validator cannot drift.

Co-authored-by: Orca <[email protected]>

* fix(perf): charge a scan listing's parent path once, not per entry

The 4.1 fix made the entry cap per-listing but left the 64 MiB byte cap
charging parentPath.length for every entry in a listing. Because a
listing's entries all share one parent-path string, that multiplied the
path by the directory's width, so the byte cap measured checkout depth
rather than live heap.

The reported symptom therefore still reproduced at the production default
limits: 48 x 2,100 @ concurrency 48 raised a capacity error once the
worktree path passed ~58 characters, while the same layout at concurrency
1 succeeded. The shipped regression test could not see this because it
passes maxRetainedBytes: Number.MAX_SAFE_INTEGER, disabling the only cap
still in play. Measured at a real 65-char worktree root, 3 of the report's
4 documented layouts still failed.

The parent path is now charged once per listing, with its first entry, so
an empty listing strands no charge. Per-entry overhead is unchanged at
512 B + name, which still dominates the estimate, so the OOM protection
the original PR added is preserved.

Adds a production-default-limits case covering the report's layouts under
a deep root, plus an assertion that a short and a deep root reach the same
verdict -- the path independence docs/workspace-space-scan-resource-bounds.md
requires and which no existing test enforced.

Co-authored-by: Orca <[email protected]>

* fix(perf): prove the icon cache by decode count, not wall clock

The caching test asserted a per-publish millisecond budget, which failed
on CI at 5.64 ms against a 5 ms ceiling. Any threshold flakes on a loaded
box, so count real sanitizeRepoIcon entries instead: 10 repos x 20
publishes is 200 icon checks against exactly 1 decode. Added cases pin
the cache key (payload and source both re-decode; a cached image verdict
never answers for an emoji) and that a rejection is cached too.

Also drops budget.entries, which the per-listing cap left as a
traversal-wide counter no check reads -- exactly the shape a future
guard could reintroduce the concurrency bug from.

Co-authored-by: Orca <[email protected]>

* fix(dashboard): bound the project filter label the whole board rides on

#11042 added snapshot-level filterOptions whose project labels are
repo.displayName -- the same unbounded source this PR already bounds for
card.repoName, but one level up where dropping a card cannot recover it.
An over-long project name would fail isDashboardFilterOptions and take
the entire snapshot with it, which is the exact frozen-board failure the
per-card drop was added to end. Workspace-status labels are already
capped at 32 by workspace-statuses.ts, so only projects needed this.

Co-authored-by: Orca <[email protected]>

* fix(dashboard): disambiguate the repo icon cache key

The memoization key joined `source` and `src` with a space, but the
sanitizer's base64 pattern admits whitespace inside a valid `src`. A
rejected icon can therefore split the same concatenation differently and
inherit an accepted icon's cached verdict, reaching the pop-out's
`<img src>` without ever being sanitized. Length-prefix the source.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Orca <[email protected]>
brennanb2025 added a commit that referenced this pull request Jul 29, 2026
#11015)

* fix(dashboard): give the agent preview terminal a real pane's keyboard

The dashboard's preview terminal is a bare xterm, not a pane, so it never
ran `resolveTerminalShortcutAction` — its only custom key handler covered
copy/paste and IME. Ctrl+Backspace therefore fell through to xterm's default
`\x08`, which readline binds to backward-delete-char: one character instead
of a word.

Route the preview's keys through the pane's own shortcut policy, so word and
line kills, Option chords, modified Enter, and scrollback chords encode
identically. Pane-scoped verdicts (splits, search, focus) are swallowed rather
than passed to xterm, which would send e.g. Ctrl+Shift+D as a bare Ctrl+D.

The policy needs three things the preview could not see:

- kitty-protocol flags — mirrored locally from the same PTY output stream
- the PTY's execution host — bytes follow the host, not the client OS, so a
  new `DashboardCard.terminalInput` profile is derived in the main renderer
  (the only one holding the store) and relayed to the pop-out
- host terminal options — the ConPTY backend and the kitty withhold now apply

Also brings the emulator itself up to a pane's: Orca's Unicode 11 width shim
(replayed CJK/emoji/ZWJ laid out wrong without it), Windows Ctrl+Alt chord
repair, user font/cursor/line-height/word-separator/sensitivity settings,
ligatures, the TUI wheel multiplier, lazy Arabic shaping, clickable links, and
the IME candidate anchor — extracted from pane-lifecycle so both surfaces share
one implementation.

The in-window drawer built its snapshot from a slice subset, which would have
degraded the new profile to client-OS defaults there; it now reads the full
store non-reactively.

* fix(dashboard): enumerate pane-scoped chords instead of a default case

The switch-exhaustiveness gate rejects a `default` over the shortcut-action
union — it would let a newly added action be swallowed silently instead of
forcing a decision at the preview's boundary.

* fix(dashboard): preserve native shortcuts and PTY host routing

* chore: keep merge scope limited to dashboard

* perf(dashboard): avoid full-store copies for terminal profiles

* fix(dashboard): validate terminal input profiles at IPC boundary

* fix(dashboard): sync preview terminal refs on commit, not during render

react-compiler rejects ref writes in the render pass; every reader is an event handler or a post-await continuation, so a commit-phase sync is equivalent.

* test(dashboard): cover the three seams that relay the host-input profile

Reverting any of them left every suite green: the dialog's terminalInput prop
(the only reader of DashboardCard.terminalInput), the drawer's hand-threaded
store slices, and the pop-out's republish triggers. Each new assertion was
mutation-checked against its source line.

* fix(dashboard): follow the WSL host for a preview terminal's byte routing

The card resolver handed resolveTerminalInputHostPlatform a transport with no
getLocalSessionMetadata, so a WSL pty on a Windows client resolved to win32
while its own pane resolves linux — Shift+Enter would then encode CSI-u where
the pane sends alt-enter. Mirror the pane transport's own gate.

* fix(dashboard): republish on every slice the host-input profile resolves from

The compare set covered 4 of the ~11 slices that decide a card's execution
host, so a change to the rest (folder workspaces, project groups, the runtime
catalog, detected worktrees) never triggered a publish. On a quiet board there
is no later publish to heal from, and the pop-out — which cannot re-derive the
profile — keeps encoding bytes for the host the pty used to run on.

* fix(dashboard): sync preview terminal refs on layout, not on a passive effect

xterm's keydown is a native listener, so React never flushes a passive effect
before it. A just-relayed host profile could therefore miss the next keystroke.

* test(dashboard): pin the preview's replay-vs-live kitty scan

The existing A/B passed either way: a lone CSI > u sets the same flags through
scan and scanReplay. Redeliver the push across a snapshot and its replay so
stack semantics would leave the TUI's single pop on a stale frame.

* fix(dashboard): rebuild the drawer's snapshot on every host-input slice

The in-window drawer read ~12 host slices through getState() while subscribing
to none of them, on the premise that agent activity drives the next rebuild. A
quiet board has no such rebuild: an SSH handshake completing with every agent
idle leaves the preview terminal encoding bytes for the pre-connect host, and
agentStatusEpoch only ticks on live status changes so it never heals. Watch the
same set useDashboardPopoutBridge republishes on — each writer bails out when
nothing changed, so the added deps are far quieter than agentStatusByPaneKey,
which already rebuilds this memo on every status ping.

The existing coverage mounted a second hook, which always recomputes; the new
test re-renders the same hook after changing only sshConnectionStates.

* fix(dashboard): key the preview by the user's terminal shortcut policy

The preview passed 11 of the 12 inputs the pane's policy takes and let the
12th default to orca-first. Under terminal-first a remapped tab.close chord is
meant to yield to the shell — Ctrl+W is a word-kill there — but the preview
kept claiming it as a pane close and swallowed the bytes.

* test(dashboard): pin the host-input profile to card snapshots only

The count path main added in #11042 renders no cards, so it must not pay a
per-pty host resolution on every agent-status tick. Both assertions run against
a card that does have a live pty, so only the gate keeps the profile off.

* refactor(dashboard): extract the board's client-host read

The merge of main's label bounding pushed build-dashboard-snapshot.ts to
302 lines. The client's own platform facts are a distinct concept from the
pty host each card keys against, so they move out rather than earn a
max-lines bypass.
brennanb2025 added a commit that referenced this pull request Aug 17, 2026
Add a multi-select "Status" row to the sidebar workspace options menu,
mirroring the Hosts/Projects sections. Empty selection shows every status,
matching the multi-select workspace-status filter already shipped on the
Agent Dashboard (#11042).

The predicate lives in the shared computeVisibleWorktreeIds pipeline, so it
applies in every grouping mode and to the Workspace Board, and Cmd+1-9
numbering cannot diverge from the rendered card order.

Selections are validated against the live status catalog on hydrate and on
every catalog edit, so a deleted custom status cannot silently empty the
sidebar. Revealing a workspace whose status is filtered out clears the
filter, matching the existing repo-filter rule.

Extract SidebarFilterState / sidebarHasActiveFilters / ClearFilterActions
into sidebar-filter-state.ts to keep visible-worktrees.ts under max-lines.
brennanb2025 added a commit that referenced this pull request Aug 17, 2026
Add a multi-select "Status" row to the sidebar workspace options menu,
mirroring the Hosts/Projects sections. Empty selection shows every status,
matching the multi-select workspace-status filter already shipped on the
Agent Dashboard (#11042).

The predicate lives in the shared computeVisibleWorktreeIds pipeline, so it
applies in every grouping mode and to the Workspace Board, and Cmd+1-9
numbering cannot diverge from the rendered card order.

Selections are validated against the live status catalog on hydrate and on
every catalog edit, so a deleted custom status cannot silently empty the
sidebar. Revealing a workspace whose status is filtered out clears the
filter, matching the existing repo-filter rule.

Extract SidebarFilterState / sidebarHasActiveFilters / ClearFilterActions
into sidebar-filter-state.ts to keep visible-worktrees.ts under max-lines.
PannenetsF added a commit to PannenetsF/orca that referenced this pull request Sep 12, 2026
Add a multi-select workspace-status filter to the sidebar options menu and
the Workspace Board filter menu. Empty selection shows all statuses; selecting
one or more narrows the list (e.g. only Done, or Todo + In progress + In review
for "not completed").

Implemented as a predicate in the shared computeVisibleWorktreeIds pipeline, so
it applies in every grouping mode (Project / Status / PR / None) and to both the
sidebar list and the board. State (filterWorkspaceStatuses) is persisted via
PersistedUIState and validated against the live status catalog on hydration and
whenever the catalog changes, so a deleted custom status can't silently empty
the list. Activating/revealing a workspace clears a status filter that would
otherwise hide it, mirroring the existing repo-filter behavior.

Mirrors the multi-select workspace-status filter shipped for the Agent Dashboard
in stablyai#11042, reusing the same workspaceStatus model and visual metadata.

Extracted addVisibleLineageAncestors into its own module to keep
visible-worktrees.ts under the max-lines budget without disabling the rule.

Closes stablyai#13996

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* feat(dashboard): add agent status search board

* fix(dashboard): keep idle controls reachable

* chore: drop merge-only formatting drift

* fix(dashboard): compare sparse subagent snapshots safely

* fix(dashboard): satisfy settings handler lint

* fix(dashboard): address review feedback

* fix(dashboard): complete search and localized status copy

* fix(dashboard): pad active filter row

* fix(dashboard): keep idle control in board settings

* fix(dashboard): source filters from workspace state

* fix(dashboard): clarify PR and MR status filter

* fix(dashboard): preserve review and board parity
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(perf): correct three 07-27 perf regressions

Traversal capacity cap no longer scales with worker concurrency
(stablyai#11026). retainWorkspaceSpaceScanEntry charged a traversal-wide entry
counter, so N workers each holding a listing multiplied the live charge.
At concurrency 48 a 48x2,100 tree (100,848 entries) hit the 100,000 cap
while 100x1,500 (150,100 entries, 50% more) passed, and scanLocalWorktree
treats the capacity error as terminal, reporting an intact worktree as
"Unavailable" with sizeBytes 0. The cap is now per directory listing --
the only quantity fixed by directory shape -- restoring the invariant
docs/workspace-space-scan-resource-bounds.md already states. Aggregate
live retention stays bounded by the unchanged 64 MiB byte cap.

Note: releasing each entry's charge at dispatch (the originally suggested
fix) was measured and does not help; the peak is set at admission, before
any entry is dispatched.

Repo image icons are no longer fully base64-decoded on every snapshot
publish (stablyai#11012). sanitizeRepoIcon reached decodeBase64Prefix, which
sized its buffer to the whole payload to read a 24-byte header, running
synchronously inside ipcMain.handle at a 250 ms throttle. Validation is
now memoized on source+src in a BoundedMap. Measured for 10 icons x
256 KB: 37.34 ms -> 0.67 ms per publish.

One over-long card label no longer discards the entire snapshot (stablyai#11012).
isDashboardSnapshot was all-or-nothing and dashboard-popout returned
early with no log while replaying lastSnapshot, so `orca terminal rename
--title "<1025+ chars>"` froze the pop-out board on its last good paint
with nothing surfaced. Labels are truncated at the producer, the
validator drops only the offending card, and both the rejection and the
drop are logged. The bound now lives in the shared snapshot contract so
producer and validator cannot drift.

Co-authored-by: Orca <[email protected]>

* fix(perf): charge a scan listing's parent path once, not per entry

The 4.1 fix made the entry cap per-listing but left the 64 MiB byte cap
charging parentPath.length for every entry in a listing. Because a
listing's entries all share one parent-path string, that multiplied the
path by the directory's width, so the byte cap measured checkout depth
rather than live heap.

The reported symptom therefore still reproduced at the production default
limits: 48 x 2,100 @ concurrency 48 raised a capacity error once the
worktree path passed ~58 characters, while the same layout at concurrency
1 succeeded. The shipped regression test could not see this because it
passes maxRetainedBytes: Number.MAX_SAFE_INTEGER, disabling the only cap
still in play. Measured at a real 65-char worktree root, 3 of the report's
4 documented layouts still failed.

The parent path is now charged once per listing, with its first entry, so
an empty listing strands no charge. Per-entry overhead is unchanged at
512 B + name, which still dominates the estimate, so the OOM protection
the original PR added is preserved.

Adds a production-default-limits case covering the report's layouts under
a deep root, plus an assertion that a short and a deep root reach the same
verdict -- the path independence docs/workspace-space-scan-resource-bounds.md
requires and which no existing test enforced.

Co-authored-by: Orca <[email protected]>

* fix(perf): prove the icon cache by decode count, not wall clock

The caching test asserted a per-publish millisecond budget, which failed
on CI at 5.64 ms against a 5 ms ceiling. Any threshold flakes on a loaded
box, so count real sanitizeRepoIcon entries instead: 10 repos x 20
publishes is 200 icon checks against exactly 1 decode. Added cases pin
the cache key (payload and source both re-decode; a cached image verdict
never answers for an emoji) and that a rejection is cached too.

Also drops budget.entries, which the per-listing cap left as a
traversal-wide counter no check reads -- exactly the shape a future
guard could reintroduce the concurrency bug from.

Co-authored-by: Orca <[email protected]>

* fix(dashboard): bound the project filter label the whole board rides on

stablyai#11042 added snapshot-level filterOptions whose project labels are
repo.displayName -- the same unbounded source this PR already bounds for
card.repoName, but one level up where dropping a card cannot recover it.
An over-long project name would fail isDashboardFilterOptions and take
the entire snapshot with it, which is the exact frozen-board failure the
per-card drop was added to end. Workspace-status labels are already
capped at 32 by workspace-statuses.ts, so only projects needed this.

Co-authored-by: Orca <[email protected]>

* fix(dashboard): disambiguate the repo icon cache key

The memoization key joined `source` and `src` with a space, but the
sanitizer's base64 pattern admits whitespace inside a valid `src`. A
rejected icon can therefore split the same concatenation differently and
inherit an accepted icon's cached verdict, reaching the pop-out's
`<img src>` without ever being sanitized. Length-prefix the source.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
stablyai#11015)

* fix(dashboard): give the agent preview terminal a real pane's keyboard

The dashboard's preview terminal is a bare xterm, not a pane, so it never
ran `resolveTerminalShortcutAction` — its only custom key handler covered
copy/paste and IME. Ctrl+Backspace therefore fell through to xterm's default
`\x08`, which readline binds to backward-delete-char: one character instead
of a word.

Route the preview's keys through the pane's own shortcut policy, so word and
line kills, Option chords, modified Enter, and scrollback chords encode
identically. Pane-scoped verdicts (splits, search, focus) are swallowed rather
than passed to xterm, which would send e.g. Ctrl+Shift+D as a bare Ctrl+D.

The policy needs three things the preview could not see:

- kitty-protocol flags — mirrored locally from the same PTY output stream
- the PTY's execution host — bytes follow the host, not the client OS, so a
  new `DashboardCard.terminalInput` profile is derived in the main renderer
  (the only one holding the store) and relayed to the pop-out
- host terminal options — the ConPTY backend and the kitty withhold now apply

Also brings the emulator itself up to a pane's: Orca's Unicode 11 width shim
(replayed CJK/emoji/ZWJ laid out wrong without it), Windows Ctrl+Alt chord
repair, user font/cursor/line-height/word-separator/sensitivity settings,
ligatures, the TUI wheel multiplier, lazy Arabic shaping, clickable links, and
the IME candidate anchor — extracted from pane-lifecycle so both surfaces share
one implementation.

The in-window drawer built its snapshot from a slice subset, which would have
degraded the new profile to client-OS defaults there; it now reads the full
store non-reactively.

* fix(dashboard): enumerate pane-scoped chords instead of a default case

The switch-exhaustiveness gate rejects a `default` over the shortcut-action
union — it would let a newly added action be swallowed silently instead of
forcing a decision at the preview's boundary.

* fix(dashboard): preserve native shortcuts and PTY host routing

* chore: keep merge scope limited to dashboard

* perf(dashboard): avoid full-store copies for terminal profiles

* fix(dashboard): validate terminal input profiles at IPC boundary

* fix(dashboard): sync preview terminal refs on commit, not during render

react-compiler rejects ref writes in the render pass; every reader is an event handler or a post-await continuation, so a commit-phase sync is equivalent.

* test(dashboard): cover the three seams that relay the host-input profile

Reverting any of them left every suite green: the dialog's terminalInput prop
(the only reader of DashboardCard.terminalInput), the drawer's hand-threaded
store slices, and the pop-out's republish triggers. Each new assertion was
mutation-checked against its source line.

* fix(dashboard): follow the WSL host for a preview terminal's byte routing

The card resolver handed resolveTerminalInputHostPlatform a transport with no
getLocalSessionMetadata, so a WSL pty on a Windows client resolved to win32
while its own pane resolves linux — Shift+Enter would then encode CSI-u where
the pane sends alt-enter. Mirror the pane transport's own gate.

* fix(dashboard): republish on every slice the host-input profile resolves from

The compare set covered 4 of the ~11 slices that decide a card's execution
host, so a change to the rest (folder workspaces, project groups, the runtime
catalog, detected worktrees) never triggered a publish. On a quiet board there
is no later publish to heal from, and the pop-out — which cannot re-derive the
profile — keeps encoding bytes for the host the pty used to run on.

* fix(dashboard): sync preview terminal refs on layout, not on a passive effect

xterm's keydown is a native listener, so React never flushes a passive effect
before it. A just-relayed host profile could therefore miss the next keystroke.

* test(dashboard): pin the preview's replay-vs-live kitty scan

The existing A/B passed either way: a lone CSI > u sets the same flags through
scan and scanReplay. Redeliver the push across a snapshot and its replay so
stack semantics would leave the TUI's single pop on a stale frame.

* fix(dashboard): rebuild the drawer's snapshot on every host-input slice

The in-window drawer read ~12 host slices through getState() while subscribing
to none of them, on the premise that agent activity drives the next rebuild. A
quiet board has no such rebuild: an SSH handshake completing with every agent
idle leaves the preview terminal encoding bytes for the pre-connect host, and
agentStatusEpoch only ticks on live status changes so it never heals. Watch the
same set useDashboardPopoutBridge republishes on — each writer bails out when
nothing changed, so the added deps are far quieter than agentStatusByPaneKey,
which already rebuilds this memo on every status ping.

The existing coverage mounted a second hook, which always recomputes; the new
test re-renders the same hook after changing only sshConnectionStates.

* fix(dashboard): key the preview by the user's terminal shortcut policy

The preview passed 11 of the 12 inputs the pane's policy takes and let the
12th default to orca-first. Under terminal-first a remapped tab.close chord is
meant to yield to the shell — Ctrl+W is a word-kill there — but the preview
kept claiming it as a pane close and swallowed the bytes.

* test(dashboard): pin the host-input profile to card snapshots only

The count path main added in stablyai#11042 renders no cards, so it must not pay a
per-pty host resolution on every agent-status tick. Both assertions run against
a card that does have a live pty, so only the gate keeps the profile off.

* refactor(dashboard): extract the board's client-host read

The merge of main's label bounding pushed build-dashboard-snapshot.ts to
302 lines. The client's own platform facts are a distinct concept from the
pty host each card keys against, so they move out rather than earn a
max-lines bypass.
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