Skip to content

feat(activity): multi-select agent rows with a bulk right-click menu - #25486

Merged
Jinwoo-H merged 17 commits into
mainfrom
activity-agent-multiselect
Oct 5, 2026
Merged

Jinwoo-H merged 17 commits into
mainfrom
activity-agent-multiselect

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​556 $\color{#cf222e}{\Huge{\mathbf{−}}}$​56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​500
Prod 34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​545 $\color{#cf222e}{\Huge{\mathbf{−}}}$​225 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​320

ELI5

In the left sidebar's agent list you can now pick several agents at once, the same way you already pick several workspaces, and right-click to mark them all read, mark them all unread, or clear them from the list in one go.

What Changed

Before: clicking an agent row always opened that agent. There was no way to select more than one row, so marking or clearing several agents meant right-clicking each row in turn. The agent right-click menu could also stay open alongside a workspace or tab menu.

After:

  • A plain click still selects the row and opens the agent. Cmd-click (Ctrl-click on Windows/Linux) adds or removes a row, and Shift-click selects every row between the last clicked row and this one, crossing group headers. Neither of these opens the agent. On macOS a Ctrl-click is the system's right-click gesture, so the row leaves it to the menu.
  • Selected rows look exactly like selected workspace cards. The open agent keeps its own "open" look even when it is part of the selection.
  • Right-clicking inside a selection of two or more rows opens a bulk menu that follows the workspace menu's multi-select style: one read toggle, "Mark N Agents Read" when any selected agent is unread, otherwise "Mark N Agents Unread" (the open agent is left out, same rule as the single-row menu), then "Clear N Agents from List" (singular for one, like the workspace menu's "Sleep 3 Workspaces"). Clearing uses the existing clear with its Undo toast. Open, Go to Workspace and the Copy items only apply to one agent, so they are hidden. Right-clicking a row outside the selection resets the selection to that row and shows the usual single-agent menu.
  • Rows hidden by a collapsed group, a filter or search drop out of the selection. Clicking anywhere outside the list clears it.
  • Opening the agent menu closes any open workspace, tab or terminal menu, and opening one of those closes the agent menu.
  • Workspace list behaviour and visuals are unchanged.

How it works, in three commits:

  1. Shared selection logic. The workspace list's click / Cmd / Shift selection moved into a generic hook (hooks/use-list-multi-selection.ts) keyed by string ids, and its pure functions moved to lib/list-multi-selection.ts. The workspace hook is now a thin wrapper that keeps its row order and the Cmd+1–9 shortcut publishing, and returns the same shape as before. The workspace board keeps its own hook and only picks up the renamed functions.
  2. One selected-row style. The multi-selected workspace card look moved from Tailwind classes into a single main.css rule keyed by a data-worktree-card-selected attribute. Both lists set that attribute only on rows that are selected and not the open/active row. The rule also excludes [data-worktree-card-active], because navigation can mark a card active in the DOM before React re-renders. Screenshots 01 and 02 below differ only inside an animated status spinner.
  3. Agent multi-select. ActivityThreadListPane runs the shared hook over the agent rows it renders, so the sidebar list and the full Agents page both get it. The agent row menu is now a controlled Radix ContextMenu. When it opens it sends the app's close-all-menus event, takes a snapshot of its targets from the selection, and closes when another menu sends the event. The close-all event name was defined in four places; it now lives in lib/close-all-context-menus.ts. New markThreadsRead / markThreadsUnread actions send a whole batch to the store in one update.

Why

  • One selection implementation, two lists: a second copy of the selection rules for agents would drift from the workspace list (modifier keys, range anchoring, pruning). Pulling out the existing logic keeps one set of rules and leaves the workspace behaviour as it was.
  • A data attribute for the selected look, not shared class strings: the active look already works this way. It is also the only approach that holds up when the DOM marks a row active before React re-renders.
  • The workspace menu stays on DropdownMenu. Our style guide prefers ContextMenu for right-click menus, and Radix ContextMenu can be closed from code, so moving it over is possible. It isn't worth it in this PR. The workspace menu is about 800 lines with four test files, and it depends on capture-phase behaviour that would all need rewriting: letting the native menu through, nested lineage scopes, Alt revealing developer items, and handing focus to the parent picker. Users would see no difference. The agent menu was already a ContextMenu and only needed the bulk section and the close-all hookup.
  • Snapshotting targets when the menu opens: pressing a menu item is a pointerdown outside the list, which clears the selection before the item's action runs. The workspace menu solves this the same way.
  • The macOS Ctrl-click guard is a plain check, not a timer: on macOS that gesture always means right-click, so returning early from the row click is enough.

Linked Issue

N/A (internal). Stacked on #25376; base is activity-view-hide-client-workspaces.

Visual Proof

Workspace list, multi-selected (two plain-selected cards plus the active card in the selection). Before (Tailwind classes) / after (shared attribute rule). Computed background and border match exactly; the ring shadow is the same 1px value:

Before After
01-workspace-multiselect-before.png 02-workspace-multiselect-after.png

Multi-selected workspace cards (left) next to multi-selected agent rows (right); "Refactor the activity filters" is the open agent and keeps its open look:

03-workspace-and-agent-multiselect.png

Single-agent menu on an unread agent and on a read agent, and the bulk menu with three agents selected (two unread, all three finished):

Single, unread Single, read Bulk (3 selected)
01-single-unread.png 02-single-read.png 03-bulk.png

The result of marking 4 agents read from the bulk menu (bells gone, selection cleared):

05-agent-bulk-mark-read-done.png

Clearing 2 agents from the bulk menu, with the Undo toast (Undo restored both rows):

06-agent-bulk-clear-undo-toast.png

Menus never coexist. With a workspace menu open on the workspace board, right-clicking an agent row closes it (left). With the agent menu open, right-clicking a workspace card closes the agent menu (right):

Agent menu replaces workspace menu Workspace menu replaces agent menu
07b 07c

Testing

  • I manually tested these changes locally (macOS, dark theme, dev build in the background with the agent dev fixture; screenshots above taken over CDP)
  • Automated tests added/updated, or explained why not below

New tests:

  • the shared hook: toggle on each platform, range, pruning with anchor fallback, right-click inside vs outside a selection, outside-pointerdown scope, identity reuse
  • the agent list: Ctrl / Cmd toggle without opening, macOS Ctrl-click ignored, plain click opens and replaces, Shift range across group headers, the open row never gets the selected attribute, collapsing a group prunes
  • the menu: bulk labels and counts, mark unread skips the open agent, bulk clear passes only clearable targets to the undoable clear, disabled fallbacks without counts, the single-row menu is unchanged, close-all in both directions
  • the workspace card attribute and the CSS rule
  • batch read/unread actions

Each new behavioural test was confirmed to fail with its fix removed. Existing workspace selection, board and context-menu tests pass unchanged apart from import renames and dropping the now-unused close-all key from module mocks.

Ran locally: pnpm tc; vitest over activity, sidebar, lib, hooks, tab-bar, right-sidebar, status-bar, terminal-pane, editor, assets and i18n (2381 files / 21045 tests passing); oxlint; pnpm run check:code-quality:changed; check:max-lines-ratchet; localization sync and all verify:localization-*.

Not run: Windows/Linux (the toggle key comes from the existing navigator.userAgent check and the hook tests cover both platforms), and light theme.

AI Disclosure

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • SSH/remote: selection lives only in the renderer and isn't synced. Bulk read/unread use the existing local store actions keyed by pane, and bulk clear uses the existing renderer clear path. No wire or host changes.
  • Folder workspaces and floating terminals: the bulk actions don't depend on workspace type. The one item that does (Copy) is single-agent only.
  • Performance: row click and menu-target handlers keep one identity through a ref, so the memoized agent rows don't re-render on every selection change. Only rows whose selected state changed re-render.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • 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)

Reveals are skipped while the activity view is showing, and activation no
longer lifts workspace-list filters there. Only explicit requests (Go to
workspace, reveal-current-workspace, Cmd+J project row, agent send target,
Cmd+1-9) switch to the workspace list via showSidebarWorkspaceList.
Activity view gains its own persisted Hide automation-created, Hide CLI-created
and Hide other-client agents toggles, applied through the existing activity
scope filter so the selected-row exemption and identity-preserving return keep
working. The options trigger now uses the workspace view's SlidersHorizontal
icon and shared numeric badge, counting every active activity filter, and Add
project stays visible so no header button shifts between views.
Open, Mark as read/unread, Go to workspace (real workspaces only), Copy (agent
title, plus branch and path for real workspaces), and Clear from list for
finished threads, reusing the row's existing actions and clearActivityThread.
Go to workspace and Cmd+1-9 switched the sidebar before activating, so a
blocked folder activation still left the activity view. Activation now owns
the switch via showWorkspaceList, applied after its failure gates. The
separate showSidebarWorkspaceList action and the one-line sidebar-body-reveal
module go away: setSidebarBody is the single writer, and the census pins its
callers.
Move the workspace list's id-keyed click/Cmd/Shift selection into
useListMultiSelection and rename the pure selection functions to
lib/list-multi-selection so another list can reuse them. The workspace
hook keeps its row order and Cmd+1-9 publish; no visible change.
…ribute

Move the multi-selected workspace card style out of Tailwind classes into
one main.css rule keyed by data-worktree-card-selected, so agent rows can
share it. The attribute is set only off the active card and off lineage
drop targets, and the rule also skips [data-worktree-card-active], so the
active look wins even when the DOM marks a card active before React.
Agent rows now select like workspace cards: a plain click selects and
opens, Cmd-click (Ctrl-click on Windows/Linux) toggles and Shift-click
selects a range across groups, without opening anything. On macOS a
Ctrl-click is left to the row menu. Right-clicking inside a 2+ selection
offers Mark N as read / Mark N as unread / Clear N from list (with
Undo). The row menu is now controlled and joins the shared close-all
event, whose constant moves to one module.
@Jinwoo-H
Jinwoo-H requested a review from brennanb2025 as a code owner October 5, 2026 08:50

@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 couple of nitpicks below.

Reviewed changes — full read of the 58-file diff plus surrounding sources; two independent review passes (the agent-menu snapshot / close-all race, and the shared-hook extraction vs the sidebar and kanban consumers).

  • Shared selection hook — click / Cmd(Ctrl) / Shift selection moved out of the workspace list into hooks/use-list-multi-selection.ts, backed by renamed pure functions in lib/list-multi-selection.ts (was worktree-multi-selection.ts). The sidebar hook stays a thin wrapper: row order, array-identity reuse, and the Cmd/Ctrl+1–9 layout-effect publishing are preserved, and the kanban keeps its own anchor-fallback logic.
  • One selected-row style — the multi-selected card look moved from Tailwind classes into a single main.css rule keyed by data-worktree-card-selected, applied only to selected, non-active, non-lineage-drop rows; the rule reuses the exact tokens the removed classes used and sits after the hover rules.
  • Agent multi-select + bulk menu — ActivityThreadListPane runs the shared hook over its flattened rows; the agent context menu is now a controlled Radix ContextMenu that snapshots its targets on open, dispatches/observes the centralized CLOSE_ALL_CONTEXT_MENUS_EVENT, and shows a counted bulk section (Mark N read / unread / Clear N) for selections of two or more, hiding the single-agent Open / Go to workspace / Copy items.
  • Batch store actions — markThreadsRead / markThreadsUnread send one batched update; the single-row actions now delegate to them.
  • Event constant centralized — CLOSE_ALL_CONTEXT_MENUS_EVENT moved from four separate definitions to lib/close-all-context-menus.ts, with every importer migrated.
  • Tests — 25 test files added or updated (the hook, the agent list, the menu, the card attribute, the batch actions).

I traced the two riskiest seams and found no functional defects: the menu's own open event cannot close it (its listener is only attached while menuOpen is true, so the synchronous self-dispatch misses it), the target snapshot is safe against the portaled-item pointerdown that clears the selection, and the open agent is excluded from bulk mark-unread exactly as in the single-row menu (allowMarkUnreadWhenSelected preserved). Grep confirms no leftover worktree-multi-selection / old function names and no unmigrated CLOSE_ALL_CONTEXT_MENUS_EVENT importers.

ℹ️ Nitpicks

  • src/renderer/src/components/sidebar/worktree-list/navigation/use-selection.ts:74 returns renderedWorktreeIdentities, which has no consumer anywhere (grep-verified). Since this PR rewrote that line to source it from the new hook, it could drop the field instead of carrying the dead return forward.
  • src/renderer/src/hooks/use-list-multi-selection.ts:9 imports useReusedArrayIdentity from @/components/sidebar/worktree-list/listing/use-reused-array-identity, so a top-level hooks/ module now depends on a deep sidebar component module. Relocating that helper (and its reuseArrayIfEqual dependency) to lib/ or hooks/ would keep the dependency direction one-way.

Pullfrog  | Fix it ➔ | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

… to the workspace menu

Brings in the single-agent menu alignment and applies the same conventions
to the bulk menu: one read toggle (Mark N Read / Mark N Unread), Clear N
from List, Title Case, size-3.5 icons.

@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 — incremental pass over the two commits since the prior pullfrog review: the base-branch merge that aligned the agent row menu to the workspace row menu, and the follow-up that names the agent count in the bulk labels. Read the full 59-file diff plus surrounding sources, ran 279 focused tests, and re-ran the runtime English catalog gate.

  • Agent row menu matches the workspace row menu — a single read toggle ("Mark Read" / "Mark Unread", Bell/BellOff icons) replaces the two separate read items; Copy Title/Branch/Path are flat items instead of a ContextMenuSub; Title Case labels and size-3.5 icons throughout, matching WorktreeContextMenuView.
  • Bulk read collapsed to one toggle — "Mark N Agents Read" when any selected agent is unread, otherwise "Mark N Agents Unread" (disabled when no target is markable), so a mixed selection never offers both directions at once.
  • Bulk counts name the agent — plural _one/_other catalog entries added for the three bulk labels; en-runtime-required.json correctly ships the six plural variants (the generator keeps every _one/_other and drops base keys whose value equals the call-site default).
  • Tests updated — the context-menu test asserts the new labels and the read-wins-when-mixed branch; the exact-label assertions genuinely exercise the plural keys and the toggle, and the whole components/activity suite plus the shared hook/lib selection tests pass (44 files / 279 tests).

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

…aces' into activity-agent-multiselect

# Conflicts:
#	src/renderer/src/components/activity/activity-thread-context-menu.test.tsx
#	src/renderer/src/components/activity/activity-thread-context-menu.tsx

@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 — incremental pass over the single commit since the prior pullfrog review: the merge of the base branch tip (5e64ed4c5b), whose only net effect is the agent row menu's copy items.

  • Copy items match the workspace row menu — getActivityThreadCopyTargets drops the Copy Branch target and now returns Copy Path then Copy Title, gating the path on a real workspace that has one; the copyBranch key is removed from en.json. This mirrors WorktreeContextMenuView's Copy Path / Copy Worktree Name ordering.
  • Tests updated — the exact toEqual([path, title]) assertion and the Copy Branch absence check pin the new shape, and en-runtime-required.json never carried the removed key.

I read the full incremental delta (git diff 7e3b71a..HEAD) and the context-menu region of the full 59-file diff, ran activity-thread-context-menu.test.tsx (16 pass) and verify:localization-catalogs (exit 0); copyBranch no longer appears in any i18n file. No behavioral defects in the delta.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H changed the base branch from activity-view-hide-client-workspaces to main October 5, 2026 19:36
…elect

# Conflicts:
#	src/renderer/src/components/activity/activity-thread-context-menu.test.tsx
#	src/renderer/src/components/activity/activity-thread-context-menu.tsx
#	src/renderer/src/components/activity/activity-thread-virtual-row.tsx
#	src/renderer/src/i18n/locales/en.json
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

🧰 Additional context used
📚 Code guidelines (2)
docs/STYLEGUIDE.md — auto-discovered
AGENTS.md — auto-discovered

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: 28bdbfa5-0734-46a3-a7e0-9d90e671248d
📥 Commits

Reviewing files that changed from the base of the PR and between d9cc1d0 and 0e83044.

📒 Files selected for processing (59)
  • src/renderer/src/assets/main.css
  • src/renderer/src/assets/worktree-card-active-style.test.ts
  • src/renderer/src/components/activity/ActivityPrototypePage.tsx
  • src/renderer/src/components/activity/activity-thread-actions.test.ts
  • src/renderer/src/components/activity/activity-thread-actions.ts
  • src/renderer/src/components/activity/activity-thread-context-menu.test.tsx
  • src/renderer/src/components/activity/activity-thread-context-menu.tsx
  • src/renderer/src/components/activity/activity-thread-list-pane-collapsible.test.tsx
  • src/renderer/src/components/activity/activity-thread-list-pane.multi-select.test.tsx
  • src/renderer/src/components/activity/activity-thread-list-pane.tsx
  • src/renderer/src/components/activity/activity-thread-list-pane.virtualization.test.tsx
  • src/renderer/src/components/activity/activity-thread-row.tsx
  • src/renderer/src/components/activity/activity-thread-virtual-row.tsx
  • src/renderer/src/components/activity/use-activity-thread-action-bindings.ts
  • src/renderer/src/components/activity/use-activity-thread-selection.ts
  • src/renderer/src/components/editor/EditorPanelHeaderPath.tsx
  • src/renderer/src/components/right-sidebar/FileExplorerBackgroundMenu.tsx
  • src/renderer/src/components/right-sidebar/FileExplorerRow.tsx
  • src/renderer/src/components/right-sidebar/use-file-explorer-background-menu.ts
  • src/renderer/src/components/sidebar/SidebarAgentsList.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.compact-ports-hover-independence.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.delete-failed.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.host-badge-toggle.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.hosted-review-refresh.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.lineage.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.merged-pr-display.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.pinned-repo-icon.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.quick-actions.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.ssh-reconnect-prompt.test.tsx
  • src/renderer/src/components/sidebar/WorktreeContextMenu.tsx
  • src/renderer/src/components/sidebar/WorktreeContextMenuView.tsx
  • src/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsx
  • src/renderer/src/components/sidebar/kanban-empty-selection-prune-budget.test.tsx
  • src/renderer/src/components/sidebar/use-workspace-kanban-selection.ts
  • src/renderer/src/components/sidebar/use-worktree-context-menu-model.tsx
  • src/renderer/src/components/sidebar/worktree-card-surface.tsx
  • src/renderer/src/components/sidebar/worktree-context-menu-policy.ts
  • src/renderer/src/components/sidebar/worktree-list-lineage-card-test-harness.ts
  • src/renderer/src/components/sidebar/worktree-list/navigation/use-selection.ts
  • src/renderer/src/components/status-bar/ProviderDetailsMenu.tsx
  • src/renderer/src/components/status-bar/StatusBarSurface.tsx
  • src/renderer/src/components/status-bar/use-status-bar-controller.ts
  • src/renderer/src/components/tab-bar/BrowserTab.tsx
  • src/renderer/src/components/tab-bar/EditorFileTab.test.tsx
  • src/renderer/src/components/tab-bar/EditorFileTab.tsx
  • src/renderer/src/components/tab-bar/SortableTab.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-context-menu-trigger.ts
  • src/renderer/src/hooks/use-list-multi-selection.test.tsx
  • src/renderer/src/hooks/use-list-multi-selection.ts
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/close-all-context-menus.ts
  • src/renderer/src/lib/list-multi-selection.test.ts
  • src/renderer/src/lib/list-multi-selection.ts
💤 Files with no reviewable changes (19)
  • src/renderer/src/components/sidebar/worktree-context-menu-policy.ts
  • src/renderer/src/components/sidebar/WorktreeCard.ssh-reconnect-prompt.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.delete-failed.test.tsx
  • src/renderer/src/components/tab-bar/EditorFileTab.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.lineage-agent-expansion-coupling.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.pinned-repo-icon.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.host-badge-toggle.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.hosted-review-refresh.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.lineage-child-real-card.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.lineage.test.tsx
  • src/renderer/src/components/sidebar/WorktreeList.status-lane-lineage-drop.test.tsx
  • src/renderer/src/components/status-bar/ProviderDetailsMenu.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.compact-hover.test.tsx
  • src/renderer/src/components/sidebar/WorktreeContextMenu.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.merged-pr-display.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.pr-display.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.compact-ports-hover-independence.test.tsx
  • src/renderer/src/components/sidebar/worktree-list-lineage-card-test-harness.ts
  • src/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The changes add reusable multi-selection behavior and apply it to workspace and activity lists. Activity context menus now support bulk read, unread, and clear actions, with batch read and unread callbacks wired through the activity panes. The close-all context-menu event moves to a shared module. Selected worktree cards and activity rows expose a shared selected-state style.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 0e830

The selection and bulk-action changes appear mergeable after normal checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 0e830

Bulk actions retain existing controls and do not appear to grant additional access or agent authority. The main concern is a bounded state-ownership race: clearing an older selection can affect a newer retained run that replaces it while the menu remains open.

Retained concerns

  • Low · reliability · inferred: Bulk-clear eligibility uses menu-open thread snapshots, but execution removes the current retained entry for each pane key. If another selected pane acquires a replacement retained run while the menu remains open, that newer snapshot can be removed without renewed eligibility or run-identity validation. The clear planner predates this PR; the new frozen-target caller introduces this exposure. Undo and live-status preservation limit the impact but do not bind clearing to the originally selected run.
Security review details

Security Blast Radius

  • inferred — The new action scope is the selected rendered activity rows in the user's application state, potentially spanning groups. The inspected batch path changes acknowledgement and retained activity data; it does not add batch workspace navigation, command execution, or agent privileges.

Trust Boundaries and Controls

  • observed — Bulk unread dispatch applies the host's per-thread eligibility predicate, and clear dispatch filters completed outcomes without fresh live state. Single-thread workspace navigation still validates workspace membership and resolves execution-host identity; bulk mode does not expose that navigation path.

Resilience and Maintainability Implications

  • observed — Deferred eviction is guarded against repeated completion and cancelled by undo. Eviction requests carry pane key and status timestamps rather than only a pane key, constraining their intended run identity.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 17.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 37 files. (3 skipped:… 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 primary change: multi-select agent rows with a bulk context menu.
Description check ✅ Passed The description covers the required sections and gives clear details about the user-facing changes, rationale, visual proof, testing, and compatibility considerations. It identifies the linked issue c…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 17.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 39 functions across 37 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@Jinwoo-H
Jinwoo-H merged commit e2a1ecd into main Oct 5, 2026
46 of 49 checks passed
brennanb2025 added a commit that referenced this pull request Oct 5, 2026
Conflict in worktree-card-surface.tsx: main (#25486) moved the multi-selected look to a
data-worktree-card-selected attribute; kept that, with the read-only card's `interactive` flag
still gating the hover class, cursor and click.
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