Skip to content

feat(sidebar): filter the workspace list by card status (#13996) - #14633

Closed
brennanb2025 wants to merge 4 commits into
mainfrom
brennanb2025/sidebar-status-filter-13996
Closed

brennanb2025 wants to merge 4 commits into
mainfrom
brennanb2025/sidebar-status-filter-13996

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​473 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​473
Prod 17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​386 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​372

ELI5

The sidebar can already group workspaces by card status (Todo / In progress / In review / Done), but it can't filter by it. This adds a "Status" row to the sidebar options menu (the sliders icon) with a checkbox per status. Tick nothing and you see everything, exactly as today. Tick "Done" and you see only your finished workspaces.

What Changed

The filter

  • New Status row in the sidebar options menu, under Show, next to Hosts and Projects. Same DropdownMenuSub shape as those two — label left, current value right ("All statuses" / the status name / "N statuses"), checkboxes in the nested panel.
  • Positive multi-select: an empty selection means "show everything". This matches the workspace-status filter already shipped on the Agent Dashboard in feat(dashboard): add agent status search board #11042 (agent-board-filtering.ts), which uses exactly filters.workspaceStatuses.length === 0 || filters.workspaceStatuses.includes(id).
  • The predicate lives in the shared computeVisibleWorktreeIds pipeline, so it applies in every grouping mode (Project / Status / PR / None), to the Workspace Board, and to the Cmd+1–9 numbering — those cannot diverge from the rendered card order because they read the same function.
  • New filterWorkspaceStatuses UI state, persisted through the existing debounced window.api.ui.set writer and the ClientUiWorkspaceFilterFields allowlist. Counted by the filter badge and reset by Clear Filters.

The traps this closes

  • Stale ids can't empty your sidebar. sanitizeFilterWorkspaceStatuses validates the selection against the live status catalog on hydrate and on every catalog edit. Delete a custom status you were filtering by and the filter drops that id instead of silently matching nothing.
  • "Select all" isn't a filter. Selecting every status narrows nothing, so it collapses back to the empty selection rather than showing a filter badge that does nothing.
  • You can't trap yourself in the menu. Deselecting the last checked status returns to "All statuses" instead of emptying the list from inside the control that created the problem.
  • Reveal still works. Activating or revealing a workspace whose status is filtered out clears the filter, matching the existing repo-filter rule in activateAndRevealWorktree.

One refactor, forced by a lint gate

visible-worktrees.ts crossed the 300-line max-lines cap. Per AGENTS.md a disable or a baseline bump is not allowed, so SidebarFilterState / sidebarHasActiveFilters / ClearFilterActions / computeClearFilterActions moved into sidebar-filter-state.ts. That is the same split #13971 proposed, and the repo had already named the concept — sidebar-filter-state.test.ts existed before this PR. Four importers, no behavior change.

Why

#13996 asks for this directly, and calls out the inconsistency: the Workspace Board and the Agent Dashboard both filter by workspaceStatus; the sidebar, which shares the model, does not.

Why this supersedes the two open attempts

#13971 (jihoonl) #13999 (PannenetsF) this PR
Model Inverted — hiddenWorkspaceStatusIds Positive — filterWorkspaceStatuses Positive
Matches #13996's spec ("empty = show all") ✗ ✓ ✓
Matches shipped #11042 dashboard filter ✗ ✓ ✓
Prunes deleted statuses on catalog edit ✗ ✓ ✓
Validates persisted selection on hydrate partial ✓ ✓
Clears filter when revealing a hidden workspace ✗ ✓ ✓
Collapses a full selection back to "all" n/a ✗ ✓
Keeps the active workspace listed when its own status is filtered out ✓ ✗ ✓ (adopted)
Applies the predicate inside the jump palette ✓ ✗ ✗ deliberate
Merges into current main ✗ 8 files conflict ✗ 6 files conflict ✓ clean

#13999 had the right model and I have adopted its shape wholesale — positive selection, the pipeline predicate, catalog sanitization, and the reveal escape hatch are all its design. #13971 contributed the sidebar-filter-state.ts split and the active-workspace pin, both of which this PR also adopts. What is new here is the "select all collapses to none" rule (both PRs leave a full selection reading as an active filter that filters nothing), the deselect-the-last guard as a collapse rather than #13971's disabled checkbox, catalog-ordered persistence so the label is stable, and a rebase onto the post-#14465 / post-#14486 sidebar.

The two places this PR deliberately differs from #13971, spelled out so nobody has to diff to find out whether they were intentional:

  • The active-workspace pin is kept (use-visible-worktrees.ts). "Move to Status" sits on the workspace row itself, so restatusing the workspace you are working in would otherwise delete its row while its panes stay open, with nothing on screen saying why. Status is the only filter dimension a user can flip from the row, so no other filter can be turned against the row that turned it — which is why the pin is gated on a status filter being active rather than applied unconditionally. Regression test: worktree-list/listing/active-workspace-survives-status-filter.test.ts.
  • The jump palette is NOT filtered, where feat(sidebar): filter the workspace list by status #13971 filtered it. This is the deliberate one. If the palette hid workspaces off the selected statuses, a filtered-out workspace would be unreachable by name and the "clear the filter on reveal" escape hatch in activateAndRevealWorktree could never fire — the recovery path would be gated behind the very filter it exists to recover from. Leaving the palette unfiltered keeps hidden workspaces findable, and jumping to one clears the filter.

Performance (STA-3354)

STA-3354 (P0) is about tab-agent status resolution scanning the whole global agent-status map per tab per render. This filter does not touch that path. It is worth stating plainly because the two things are both called "status" and they are not the same:

  • WorktreeStatus (src/renderer/src/lib/worktree-status.ts:14, active | working | permission | done | inactive) is the agent-activity dot, derived from live PTYs and the agent-status map via resolveWorktreeStatus.
  • WorkspaceStatus (src/shared/worktree/types.ts:51) is the kanban card status the user drags between board columns. It is a plain string field on the worktree.

#13996 and #11042 are both about the second one. So the added cost is one Set.has(getWorkspaceStatus(w, statuses)) per worktree, inside computeVisibleWorktreeIds, which already runs once per filter/sort snapshot — not per row, not per render, and with no read of agentStatusByPaneKey. Both call sites also subscribe to the status catalog only while a filter is active, so users who never filter by status pay nothing and don't re-run the pipeline on status renames.

Manual order (STA-3921 / #13847)

No interaction. computeVisibleWorktreeIds takes the already-computed sortedIds and only removes entries, then re-sorts by that pre-existing order index. Filtering never derives or writes an order, so it cannot compound the manual-order jumping in #13847 — exactly like the existing repo and host filters.

Linked Issue

Fixes #13996

Supersedes #13971 and #13999 (same feature, two authors; both now conflict with main).

Related but deliberately not bundled: #13938 (project name on grouped cards) and #9708 (folder workspaces under Status/PR grouping).

Refactor collision assessment (#14443 / #14486)

Requested separately from the filter. Every claim below is from a git merge-tree probe, not from the GitHub mergeable flag — which was stale for #14486 throughout.

Update (2026-08-16) — the assessment's recommendation was borne out. It was written against origin/main at 9bb8836bb6, when #14486 was still open and GitHub was mislabelling it CONFLICTING. #14486 merged on 2026-08-15T20:40:10Z, and this PR has since been rebased onto the resulting layout. The analysis is kept below as written, with the claims that events have settled marked in place and the probe numbers re-run against current main (96b03bab4f). #14443 is still open, and is now more obsolete than when this was written, not less.

#14443 is obsolete and should be closed, not merged.

refactor(sidebar): extract WorktreeList into focused modules extracts a ~4800-line monolithic WorktreeList.tsx into ~40 flat sidebar/use-worktree-*.ts modules. That monolith no longer exists. #14465 (nwparker, merged 2026-08-14T06:35:41Z, 81 files) already landed that extraction as a sidebar/worktree-list/ module — 70 files — followed by #14467 for the quality gates. main's WorktreeList.tsx is now 344 lines.

#14443 and #14486 do conflict with each other, and cannot be ordered. A direct probe reports 12 conflicting files including WorktreeList.tsx. But ordering is the wrong question — they are not two steps, they are two competing extractions of the same code at different bases. #14486's head does contain #14465. It is #14443's rebased successor. #14486 supersedes #14443.

#14486 did not conflict with main, and did not conflict with this PR. (Settled: it merged on 2026-08-15T20:40:10Z. The git merge-tree probe was right and the GitHub flag was wrong.)

#14486 does conflict with both superseded filter PRs — 22 files with #13999, 25 with #13971 — but that is not #14486's doing. Those two already conflict with plain main (5 and 7 files) because they predate #14465. The refactor is not what blocks them. (Re-probed 2026-08-16 against 96b03bab4f, now that #14486 has landed: #13971 conflicts in 8 files, #13999 in 6. Both drifted further, and neither was blocked by the refactor as such.)

Recommended order for a maintainer

  1. Merge refactor(sidebar): group worktree-list files by domain #14486 whenever convenient. It is clean against main today and every day it waits it drifts against a very active directory. Done — merged 2026-08-15T20:40:10Z.
  2. Merge this PR in either order relative to refactor(sidebar): group worktree-list files by domain #14486 — both directions are clean. (Now moot in the good way: this PR has been rebased onto post-refactor(sidebar): group worktree-list files by domain #14486 main, and git merge-tree --write-tree origin/main HEAD returns clean with zero CONFLICT lines.)
  3. Close refactor(sidebar): extract WorktreeList into focused modules #14443 as superseded by the merged refactor(sidebar): split WorktreeList into a worktree-list module #14465 and by the merged refactor(sidebar): group worktree-list files by domain #14486, with thanks — the author already redirected their own work. Still open, and still the recommendation.
  4. Close feat(sidebar): filter the workspace list by status #13971 and feat(sidebar): filter workspaces by card status #13999 as superseded by this PR, crediting feat(sidebar): filter workspaces by card status #13999 for the model and feat(sidebar): filter the workspace list by status #13971 for the module split. Still open, and still the recommendation.

The real churn risk is not the filter PRs colliding with the refactor. It is that #14486 is a 119-file move sitting on the busiest directory in the app, and it is clean right now. Merge it first and everything else rebases trivially. (That is what happened: #14486 went in first, and this PR's rebase across it was mechanical — three conflicts, all import-path or code-that-moved-house, no behavior change.)

Visual Proof

None captured — this change is visually unverified, and I am not claiming otherwise.

Orca's sanctioned UI-validation skill is reserved for explicit human invocation, so I could not run it. The alternative — standing up my own isolated Electron dev instance — was not safe to attempt here: this machine currently has 7 live Orca processes and 26 Electron processes belonging to the user's real workspace and to other concurrent sessions, this worktree has no prebuilt dev bundle, and a dev instance launched alongside those has a track record of adopting sibling worktrees and clobbering dev identity mid-session. Risking the user's live workspace for a screenshot was the wrong trade, so I stopped.

The logic is covered by tests (see Testing); the rendered menu is not. A reviewer should confirm the visual result. Two-minute manual check:

  1. Open the sidebar options menu (the sliders icon in the sidebar header).
  2. Under Show, there is now a Status row between Projects and the separator, reading "All statuses".
  3. Open it — one checkbox per workspace status, each with its status icon, plus an "All statuses" row on top.
  4. Tick Done. The sidebar narrows to Done workspaces; the trigger row reads "Done"; the sliders icon grows its filter-count badge.
  5. Tick every status. The row returns to "All statuses" and the badge clears — selecting everything is not a filter.
  6. Tick a status no workspace has. The list empties and shows the standard "No workspaces found" state with a working Clear Filters button.

What I would specifically ask a reviewer to eyeball, since tests cannot: the status icons rendering at size-3.5 next to their labels, and the trigger row's value text truncating correctly for a long custom status name.

Testing

Scoped checks only (full-suite runs are avoided in this worktree).

  • New tests — 3 files, 30 assertions:
    • visible-worktrees-status-filter.test.ts — the pipeline predicate: empty = all, single status, multi-status union, unset workspaceStatus resolving to the catalog default, the empty-result state (a status no workspace holds → zero visible, together with the assertion that sidebarHasActiveFilters is true so Clear Filters stays reachable), fail-open when the catalog is missing, stale ids ignored, and intersection with other filters.
    • workspace-status-filter-sanitize.test.ts — pruning, collapse-to-all, catalog ordering, dedupe, non-array payloads, array-identity stability.
    • SidebarWorkspaceStatusFilterSection.test.ts — toggle and label logic.
  • Non-vacuity proven by mutation, not assumed:
    • Neutralizing the pipeline predicate → 6 of 8 pipeline tests fail (the 2 that pass are the intentional no-op guards).
    • Removing the toggle's collapse branch → 2 tests fail.
    • Removing the sanitizer's catalog guard → initially 0 failed. That exposed a genuine hole in my own coverage, so I added keeps the surviving id when stale ids alone reach the catalog size, which fails under that mutation. The guard is now load-bearing and proven so.
  • Regression sweep: src/renderer/src/components/sidebar, src/renderer/src/store/slices, src/shared/workspace-status* → 409 files, 4793 tests, all pass (covers the sidebar-filter-state.ts extraction).

Re-verified after the post-#14486 rebase (2026-08-16)

Rebased onto 96b03bab4f. Three conflicts, all resolved without behavior change — see the collision-assessment update above for why they were structural rather than semantic.

  • No test was lost. The five test files this PR adds or touches carried 69 tests before the rebase and 69 after, all passing. File count and diffstat are unchanged at 20 files / 755 insertions.
  • Regression sweep, re-run on the rebased tree: components/sidebar + app-shell + shared/workspace-status* → 252 files, 2225 tests, all pass; store/slices → 262 files, 2612 tests, all pass. (An initial combined run showed timeouts in agent-status-live-map-leak.test.ts; that file passes in isolation and in the split runs, the timing-out test differed between runs, and this PR touches nothing in the agent-status eviction path — machine load, not a regression.)
  • Typecheck: tsconfig.node.json, tsconfig.tc.web.json, tsconfig.tc.cli.json all exit 0 on the rebased tree.
  • Gates re-run: oxfmt --check clean; oxlint --deny-warnings clean on changed files — and confirmed live by injecting a debugger statement and watching it fail, since a silent clean run is otherwise indistinguishable from a dead gate. Native + type-aware code-quality audits exit 0 over src config tests mobile. react-doctor (both the config run and the changed-lines gate) clean. Max-lines ratchet OK, no new bypasses. All three localization gates pass.
  • The max-lines extraction still earns its keep. main had grown visible-worktrees.ts to 448 lines; with the extraction plus this feature it is 394 — a net reduction, with no max-lines disable anywhere.
  • The STA-3354 perf property survives the resolution, which was the thing most at risk in a rebase across a reorg. The predicate still builds new Set(filterWorkspaceStatuses) once per pipeline run, outside the .filter callback, costing one Set.has(getWorkspaceStatus(w, statuses)) per worktree inside the existing useMemo — not per row, not per render. Neither call site reads agentStatusByPaneKey, and both still subscribe to the status catalog only while a filter is active.

One incidental fix the rebase forced: main moved the debounced persisted-UI writer out of App.tsx into app-shell/use-persisted-ui-writer.ts and reshaped it around a useShallow selector. This PR's three App.tsx lines were re-homed there rather than recreated at the old path, and a code comment in ui.ts that named App.tsx was corrected to name the hook.

  • Typecheck: all three projects pass — tsconfig.node.json, tsconfig.tc.web.json, tsconfig.tc.cli.json. Verified the node gate is live by injecting a deliberate type error and confirming it was caught.
  • Lint / gates: oxlint, oxfmt, react-doctor (changed), type-aware + native code-quality audits (changed), max-lines ratchet, reliability gates, all three localization gates — all pass. No max-lines disable added; the cap was resolved by extraction.

Platforms: logic-level change with no platform-dependent code — no metaKey/path/shell handling touched. Under SSH the filter is pure renderer state over already-loaded worktree fields, so it adds no round-trips.

  • I manually tested these changes locally — see Visual Proof: not done, and not claimed
  • Automated tests added/updated, or explained why not below

Review

  • Security — no new IPC surface; one optional z.array(z.string()) field added to the existing ClientUiWorkspaceFilterFields allowlist.
  • Cross-platform — no platform-conditional code; no shortcuts, paths, or accelerators touched.
  • Remote SSH — renderer-only filtering over data already in the store; no extra round-trips, no new loading states.
  • Mobile — untouched. mobile/ has its own workspace-status grouping and is not part of this change.
  • Backwards compatibility — filterWorkspaceStatuses is optional in PersistedUI and defaults to [], which is exactly today's behavior. An older client reading a newer profile ignores the field; a newer client reading an older profile sanitizes undefined to []. No wire opcode, no capability negotiation needed.
  • Performance — see the STA-3354 note above. One Set lookup per worktree per pipeline run; the status catalog is subscribed to only while a filter is active.

Author

  • X / Twitter: @BrennanKB5

@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds workspace status filtering to the sidebar. It extends UI state, persistence, hydration, and RPC filter fields. It normalizes selected status IDs against the status catalog. It filters visible worktrees, Kanban items, and activation targets. It adds localized sidebar controls, filter counts, clear-filter handling, and active-worktree visibility behavior. Tests cover selection logic, persistence sanitization, visibility results, and active-worktree retention.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 45.83% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly summarizes the primary change: adding workspace card-status filtering to the sidebar.
Description check ✅ Passed The description is detailed and covers the change, rationale, linked issue, testing, visual limitation, compatibility, and review considerations.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

@brennanb2025
brennanb2025 force-pushed the brennanb2025/sidebar-status-filter-13996 branch from 21e0997 to f0bc2be Compare August 17, 2026 00:53

@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: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a311570-6aee-467a-bfb5-bece29e517f7

📥 Commits

Reviewing files that changed from the base of the PR and between 96b03ba and f0bc2be.

📒 Files selected for processing (20)
  • src/main/runtime/rpc/methods/client-ui-workspace-filter-fields.ts
  • src/renderer/src/app-shell/use-persisted-ui-writer.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.test.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.tsx
  • src/renderer/src/components/sidebar/default-branch-visible-under-hide-sleeping.test.ts
  • src/renderer/src/components/sidebar/sidebar-filter-state.test.ts
  • src/renderer/src/components/sidebar/sidebar-filter-state.ts
  • src/renderer/src/components/sidebar/use-visible-workspace-kanban-worktree-ids.ts
  • src/renderer/src/components/sidebar/visible-worktrees-status-filter.test.ts
  • src/renderer/src/components/sidebar/visible-worktrees.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/worktree-activation.ts
  • src/renderer/src/store/slices/ui.ts
  • src/shared/constants.ts
  • src/shared/persisted-ui-state-types.ts
  • src/shared/workspace-status-filter-sanitize.test.ts
  • src/shared/workspace-statuses.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 0 remain after this review.

"SidebarWorkspaceStatusFilterSection": {
"status": "Status",
"allStatuses": "All statuses",
"selectedStatusesCount": "{{value0}} statuses"

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

Handle the singular status count.

When one status is selected, this string renders 1 statuses. Use the existing localization pluralization convention, or provide a singular form for 1 status.

Comment on lines +271 to +282
/**
* Drop selected filter ids that no longer exist in the catalog, and collapse a
* full selection back to "all".
*
* Why collapse: a selection naming every status filters nothing but still reads
* as an active filter in the badge and Clear Filters. Why prune: a filter for a
* since-deleted custom status would otherwise match no workspace and empty the
* sidebar with no visible cause.
*
* Returns the same array identity when nothing changed so the debounced
* persisted-UI writer isn't woken by a no-op normalization.
*/

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.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Condense this documentation block.

Keep one short comment that states the normalization contract. Remove the implementation walkthrough and repeated rationale.

As per coding guidelines, “Comments must be concise, non-obvious, and brief—prefer one line; do not explain obvious behavior or walk through code.”

Source: Coding guidelines

@brennanb2025

Copy link
Copy Markdown
Contributor Author

$electron validation — all six acceptance points exercised, one dropped guard found

Driven with Playwright over CDP against an isolated dev instance of this branch (own ORCA_DEV_USER_DATA_PATH=/tmp/qa14633/userdata, own CDP port 9338). Identity re-asserted before every capture:

{"name":"Orca: brennanb2025/sidebar-status-filter-13996","isDev":true,"devLabel":"qa14633",
 "devBranch":"brennanb2025/sidebar-status-filter-13996",
 "devRepoRoot":"/Users/brennanbenson/orca/workspaces/orca/sidebar-status-filter-13996"}

Fixture: one project, six workspaces — main + beta = In progress, alpha + epsilon = Todo, gamma = In review, delta = Done. Grouping set to Status so each screenshot labels its own rows.

1–3. Control renders, lists the catalog, and empty selection shows everything

The Status row sits under Show alongside Hosts / Projects, reading All statuses. The nested panel lists All statuses (checked) plus one checkbox per catalog entry with its status icon. All six workspaces are visible and the filter badge is absent.

01-catalog-empty-selection.png

Note the section renders here even though this profile has one project and no host controls — that is the widened showHostScopeControls || repos.length > 1 || showStatusFilter gate doing its job.

2. Selecting one status filters the list

Ticking Todo leaves only epsilon and alpha. Row label becomes Todo, badge reads 1, header flips from Projects to Workspaces.

02-filter-todo.png

store.filterWorkspaceStatuses = ["todo"]

Three of four selected — label 3 statuses, badge 3, delta (Done) correctly gone:

03-three-statuses-selected.png

4. Selecting ALL statuses collapses to none — the rule that distinguishes this PR

Clicking the fourth and final status (Done) from the 3-selected state does not produce a 4-of-4 selection. It collapses:

before click:  ["todo","in-progress","in-review"]
after  click:  []

Every per-status box unchecks, All statuses re-checks, the row label reverts to All statuses, the filter badge disappears, and delta returns under Done. A full selection never reads as an active filter.

04-select-all-collapses.png

5. Deselecting the last status collapses — the checkbox is never disabled

With Done as the sole selection, a DOM sweep of every [role=menuitemcheckbox] shows no disabled state anywhere:

[{"t":"All statuses","checked":"false","disabled":null},
 {"t":"Todo","checked":"false","disabled":null},
 {"t":"In progress","checked":"false","disabled":null},
 {"t":"In review","checked":"false","disabled":null},
 {"t":"Done","checked":"true","disabled":null}]

05a-last-status-selected-not-disabled.png

Clicking that live checkbox again returns [] and restores all six rows — a collapse, not a dead control:

05b-deselect-last-collapses.png

6. Reveal still surfaces a workspace the filter hides

Filter ["todo"] (so delta is hidden), then jump to delta by name. The palette is deliberately unfiltered, so the hidden workspace is still findable:

06a-reveal-before-jump.png

On activation the filter clears and every row returns, with delta active under Done:

{"filter":[],"active":".../demo-repo/delta",
 "rows":["epsilon","alpha","beta","main","gamma","delta(Active)"]}

06b-reveal-after-jump.png

Extra: the two stale-id traps hold

Persisted to disk — /tmp/qa14633/userdata/profiles/local-default/orca-data.json contains "filterWorkspaceStatuses":["in-review"] after the debounce.

Catalog edit prunes the filter — deleting in-review from the catalog while filtering by it does not empty the sidebar:

before: filter=["in-review"]  catalog=["todo","in-progress","in-review","completed"]
after:  filter=[]             catalog=["todo","in-progress","completed"]   rows=6

One finding: the active workspace can delete its own row

#13971 passed forcedVisibleWorktreeIds: [agentSendTargetWorktreeId, activeWorktreeId] with this comment:

Why the active workspace: "Move to status" sits on the row itself, so marking the workspace you are working in as a hidden status would otherwise delete its row while its panes stay open.

This PR keeps only agentSendTargetWorktreeId (worktree-list/listing/use-visible-worktrees.ts:109). Reproduced live:

  1. Filter to Todo. Activate alpha (Todo) — terminal opens in ~/orca/workspaces/demo-repo/alpha.
  2. Right-click that same row → Move to Status → Done.
{"activeIsAlpha":true,"alphaStatus":"completed","filter":["todo"],"rows":["epsilon"]}

07-active-row-vanishes.png

The terminal header still reads [alpha] and the pane is live, but alpha has no sidebar row. Nothing announces why; the only way back is opening the menu and changing the filter.

This is not a general filter hazard — it is specific to status. You cannot change a workspace's repo, host, or detached-HEAD state from its own row, so no existing filter can be flipped against the row that flipped it. activateAndRevealWorktree covers activating into a filtered-out workspace, but not filtering out the already-active one. Restoring activeWorktreeId to forcedVisibleWorktreeIds is a one-line fix and reuses machinery already in computeVisibleWorktreeIds.

Also worth recording in the supersession table: #13971 additionally applied the predicate inside WorktreeJumpPalette.tsx. This PR does not, which is the better call — it is what makes the reveal escape hatch reachable in step 6 above — but it is an unlisted scope difference, not an oversight.

Gates re-run on this branch

vitest --config config/vitest.config.ts  (5 filter test files)   5 passed | 69 tests
oxlint <19 changed .ts/.tsx>                                     clean
oxfmt --check <20 changed files>                                 All matched files use the correct format
tsc --noEmit -p config/tsconfig.node.json  --composite false     clean
tsc --noEmit -p config/tsconfig.tc.web.json --composite false    clean
git merge-tree --write-tree origin/main HEAD                     0 conflicts

The lint gate was proven live rather than assumed — oxlint is silent when clean, so I appended export const __probe: Array<string> = [] to sidebar-filter-state.ts and confirmed it fires, then restored the file:

sidebar-filter-state.ts:95:23: error typescript(array-type):
  Array type using 'Array<string>' is forbidden. Use 'string[]' instead.

No max-lines disable and no mobile/.oxlintrc.json baseline bump appear anywhere in the diff.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Fixed: the active workspace no longer deletes its own row

Pushed ddff5d8274. Two files: worktree-list/listing/use-visible-worktrees.ts and a new regression test alongside it.

forcedVisibleWorktreeIds now carries the active workspace as well as the agent-send target:

forcedVisibleWorktreeIds: [args.agentSendTargetWorktreeId, activeWorktreeId].filter(
  (id): id is string => id != null
)

with the id read only while a status filter is set:

const activeWorktreeId = useAppStore((s) =>
  filterWorkspaceStatuses?.length ? s.activeWorktreeId : null
)

Why gated rather than unconditional. #13971 pinned the active row for every filter. Gating on the status filter keeps this fix to the regression it repairs: status is the only filter dimension a user can flip from the row itself, so no other filter can be turned against the row that turned it. Pinning unconditionally would have quietly widened Hide default branch, Hide detached HEAD, the repo filter and the host filter too — behavior this PR never touched.

Proven red first

The test fails without the one-line change. Reverting only the activeWorktreeId term in forcedVisibleWorktreeIds and rerunning:

FAIL  active-workspace-survives-status-filter.test.ts >
      keeps the active workspace listed after its status is filtered out
AssertionError: expected [ 'repo1::/tmp/todo' ] to include 'repo1::/tmp/active'
 Test Files  1 failed (1)
      Tests  1 failed | 3 passed (4)

That is the same shape as the live repro. With the term restored, 4 passed. The other three cases are scope guards: a non-active workspace on an excluded status is still filtered out, and with no status filter set the active workspace is not pinned.

Re-verified live, on a clean mount

Re-ran the original repro on the same dev instance after a full renderer reload (fresh fiber tree, not a hot update). Same three facts as the failing case, different outcome:

before fix: {"activeIsAlpha":true,"alphaStatus":"completed","filter":["todo"],"rows":["epsilon"]}
after  fix: {"activeIsAlpha":true,"alphaStatus":"completed","filter":["todo"],"rows":["epsilon","alpha(Active)"]}

08-active-row-survives-after-fix.png

The filter badge still reads 1 and Todo is still the active selection — alpha is listed under Done because it is the workspace you are in, not because the filter stopped working. The proof that the filter still filters is delta: it is also completed and not active, and it stays hidden.

allWorkspaces: main=in-progress, alpha=completed, beta=in-progress,
               delta=completed, epsilon=todo, gamma=in-review
visibleRows:   2        crashDialog: false        console errors: 0

Six workspaces, two rows. The pin is workspace-specific, not a filter bypass.

One note for the record: adding a useAppStore call to a mounted hook made Vite's hot update throw TypeError: Cannot read properties of null (reading 'getSnapshot') at updateSyncExternalStore — the standard React HMR failure when a component's hook count changes mid-session. It does not reproduce on a clean mount (0 console errors above), and it is a dev-server artifact, not a property of the change.

Gates, re-run after the fix

vitest src/renderer/src/components/sidebar/  (whole suite)   251 files | 2199 tests passed
vitest <6 status-filter test files>                          6 files   | 73 tests passed
oxlint <20 changed .ts/.tsx>                                 clean
oxlint --config config/oxlint-react-doctor.json              clean (via lint-staged)
oxfmt --check                                                All matched files use the correct format
tsc --noEmit -p config/tsconfig.node.json                    clean
tsc --noEmit -p config/tsconfig.tc.web.json                  clean

main advanced to 2fdaa10fd1 mid-review, so rather than trusting a clean git merge-tree I materialized the merge and ran it:

git merge --no-edit origin/main    → merged tree 0295f1fc8f
vitest src/renderer/src/components/sidebar/ + sanitize   252 files | 2209 tests passed
tsc --noEmit -p config/tsconfig.tc.web.json              clean

then reset back off the test merge and pushed the branch un-merged. Nothing in main's 20 new commits touches the sidebar listing path.

The supersession table in the PR body now records both differences from #13971 explicitly — the pin (adopted) and the unfiltered jump palette (deliberate, with the reasoning), so neither has to be inferred from a diff.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Follow-up 6a0ae1070b — pinned-id array hoisted, re-verified end to end

Same behavior, cleaner contract. The two pinned sources now read as peers, and the call goes back to passing undefined rather than an empty array when nothing is pinned:

// Either, both or neither may be set; stay undefined when neither is.
const forcedVisibleWorktreeIds = [args.agentSendTargetWorktreeId, activeWorktreeId].filter(
  (id): id is string => id != null
)
…
forcedVisibleWorktreeIds:
  forcedVisibleWorktreeIds.length > 0 ? forcedVisibleWorktreeIds : undefined

computeVisibleWorktreeIds guards on forcedVisibleWorktreeIds && …length > 0, so [] and undefined were already equivalent — this restores the original shape and skips the allocation in the common case where neither is set.

Re-proven red against this final shape

Not carried over from the previous commit — re-run against the hoisted version, removing only activeWorktreeId from the array:

FAIL  active-workspace-survives-status-filter.test.ts >
      keeps the active workspace listed after its status is filtered out
AssertionError: expected [ 'repo1::/tmp/todo' ] to include 'repo1::/tmp/active'
 Test Files  1 failed (1)
      Tests  1 failed | 3 passed (4)

Restored → 4 passed, and the full sidebar suite is 251 files / 2199 tests green.

Re-verified live on a clean mount, through the real context menu

Renderer reloaded, alpha moved back to Todo via Move to Status, then the repro run again:

BASELINE: {"alphaStatus":"todo",     "activeIsAlpha":true,"filter":["todo"],"rows":["epsilon","alpha(Active)"]}
AFTER   : {"alphaStatus":"completed","activeIsAlpha":true,"filter":["todo"],"rows":["epsilon","alpha(Active)"]}
          totalWorkspaces: 6   alsoCompletedNotActive: ["delta"]   crashDialog: false   console errors: 0

09-after-fix-final.png

Six workspaces, two rows. delta is also completed and not active, and stays hidden — the filter still filters; only the workspace you are actually in is pinned.

Gates

vitest src/renderer/src/components/sidebar/ (--config config/vitest.config.ts)  251 files | 2199 passed
oxlint + oxlint --config config/oxlint-react-doctor.json + oxfmt --write        clean (lint-staged)
oxlint / oxfmt --check on both touched files                                    clean
tsc --noEmit -p config/tsconfig.node.json  --composite false                    clean
tsc --noEmit -p config/tsconfig.tc.web.json --composite false                   clean
git merge-tree --write-tree origin/main HEAD  (origin/main 2fdaa10fd1)          0 conflicts

Pushed ddff5d8274..6a0ae1070b with --force-with-lease=brennanb2025/sidebar-status-filter-13996:ddff5d8274… (SHA from ls-remote). CI is running; these are local results, not CI green.

@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 (1)
src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts (1)

90-124: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Scope the active-worktree pin to the status filter.

Line 91 adds the active worktree to forcedVisibleWorktreeIds. The shared visibility function restores generic forced IDs after every filter. An active worktree can therefore bypass repository, host, sleeping, and hide filters whenever a status filter is active.

Keep agentSendTargetWorktreeId on the generic forced-visible path. Restore activeWorktreeId immediately after status filtering so all unrelated filters still apply. Add a regression case with a non-empty status filter and filterRepoIds: ['repo-other']; it must return no worktrees.

🧹 Nitpick comments (1)
src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts (1)

58-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten the active-workspace rationale.

Keep only the non-obvious status-filter reason. The six-line comment is not brief.

As per coding guidelines: “Comments must be concise, non-obvious, and brief—prefer one line.”

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e2303cc7-bd2e-44c5-ad29-347ba958bb3a

📥 Commits

Reviewing files that changed from the base of the PR and between f0bc2be and 6a0ae10.

📒 Files selected for processing (2)
  • src/renderer/src/components/sidebar/worktree-list/listing/active-workspace-survives-status-filter.test.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 2 remain after this review.

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.
… filtered out

"Move to Status" sits on the workspace row itself, so restatusing the
workspace you are working in deleted its row while its panes stayed open,
with nothing on screen explaining why — the only recovery was reopening the
menu and changing the filter.

Restores the active-workspace pin from #13971. Status is the only filter
dimension reachable from the row, so no other filter can be turned against
the row that turned it; the pin is therefore gated on a status filter being
active rather than applied unconditionally, which keeps every other filter's
behavior unchanged.

activateAndRevealWorktree already covers activating *into* a filtered-out
workspace; this covers filtering *out* the already-active one.
…ng is pinned

Hoists the pinned-id array out of the call so both sources read as peers —
either, both or neither may be set — and restores the original contract of
passing undefined rather than an empty array when nothing is pinned.

No behavior change: computeVisibleWorktreeIds guards on length > 0.
…ktrees under the line cap

Main split visible-worktrees.ts three ways while this branch was open; adding the
status pass on top put it back over max-lines. Same predicate, its own module,
no lint suppression.
@brennanb2025
brennanb2025 force-pushed the brennanb2025/sidebar-status-filter-13996 branch from 6a0ae10 to dd55de5 Compare August 17, 2026 23:21
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (now includes #15013 / STA-4343)

Branch was 66 commits behind and had gone CONFLICTING against #15013 (64de8dd637, "delete on the confirmed host, and make both hosts' rows selectable"). Rebased, resolved, pushed — 6a0ae1070b → dd55de5fc3. PR is MERGEABLE again.

The conflict was structural, and one half of it was semantic

Structural. While this branch was open, main split visible-worktrees.ts three ways — visible-worktree-kinds.ts (predicates + SidebarFilterState), sidebar-filter-actions.ts (sidebarHasActiveFilters, computeClearFilterActions), visible-worktree-host-scope.ts. This branch had extracted the same symbols into its own new sidebar-filter-state.ts. Resolving naively would have left two live copies of the filter-chrome logic, with production importing one and this branch's tests the other.

Resolution: adopt main's split, delete this branch's sidebar-filter-state.ts, and port the three status-filter additions into main's modules — filterWorkspaceStatuses onto SidebarFilterState in visible-worktree-kinds.ts, and the sidebarHasActiveFilters term plus resetFilterWorkspaceStatuses into sidebar-filter-actions.ts. Importers go back to main's convention of importing from the visible-worktrees barrel, so the import lines are now byte-identical to main's.

Semantic — this is the one that mattered. Main changed the live listing path from computeVisibleWorktreeIds (ids) to computeVisibleWorktrees (worktree objects), and changed the ancestor dedup key from worktree.id to getWorktreeHostIdentity(worktree). That is precisely STA-4343: two execution hosts publish the same repoId::path, so any id-keyed projection folds two workspaces into one row.

This branch's commit 3 still ended with:

const ids = computeVisibleWorktreeIds(worktreesByRepo, sortedIds, { ... })
return ids.map((id) => worktreeMap.get(id)).filter((w): w is Worktree => w != null)

worktreeMap is id-keyed and keeps one entry per id. Taking this side verbatim would have silently reverted #15013's headline fix — the second host's row disappears again — while merging cleanly and passing every test in this PR. Resolved by keeping main's object-returning computeVisibleWorktrees and applying only this branch's forcedVisibleWorktreeIds construction on top.

Verified rather than assumed, with a throwaway probe against two rows sharing one id on different hosts:

BASELINE (no status filter): ["w@local", "w@ssh:box"]   <- both rows survive

The status filter itself is collision-safe: it is an object-level predicate, so each host's row is judged on its own workspaceStatus, and it runs before the host-identity dedup.

One real interaction, pre-existing, that this PR widens

forcedVisibleWorktreeIds is still id-keyed — unchanged at the merge base and unchanged by #15013:

const includedIds = new Set(all.map((worktree) => worktree.id))

So for a colliding workspace the active-workspace pin can no-op. Same probe, status filter ['todo'], active workspace = the ssh row (moved to completed), pin set:

PROBE: ["w@local/todo"]   <- the pinned ACTIVE ssh row is still hidden

The local row already occupies that id, so includedIds.has(id) is true and the pin never fires. Narrow — it needs a host collision and a status filter and the active row's status excluded and the sibling host's row surviving — and the fallout is "the guard doesn't fire", i.e. the pre-guard behaviour, not a new break of #15013.

Not fixed here, deliberately. The renderer cannot tell which host's row is active: activeWorktreeId is a bare id with no host component, so pinning correctly requires host-qualifying activeWorktreeId itself. That is #15013's domain and would also change the agentSendTargetWorktreeId path that shares this primitive. Flagging for a follow-up rather than widening this PR.

Both load-bearing behaviours re-verified by mutation, post-rebase

  • activeWorktreeId guard — dropping activeWorktreeId from forcedVisibleWorktreeIds turns active-workspace-survives-status-filter.test.ts red on exactly the intended case (1 failed, 3 passed), so the test is neither vacuous nor over-broad. Restored: 4/4.
  • Select-all collapses to none — removing || seen.size === statuses.length from sanitizeFilterWorkspaceStatuses turns the sanitize suite red (1 failed, 9 passed). Restored: 10/10.
  • The extracted status filter is actually wired — neutering filterWorktreesByWorkspaceStatus to never filter turns 7 tests red across both suites. Restored: 12/12.

max-lines, handled by extraction rather than suppression

Main's three-way split had already put visible-worktrees.ts at the cap; adding the status pass took it to 302 counted lines against a limit of 300. Rather than a max-lines disable, the predicate moved to visible-worktree-status-filter.ts, matching the sibling modules main introduced. Note oxlint counts code lines, not physical ones — trimming comments does nothing here.

Checks

  • tsc --noEmit -p config/tsconfig.tc.web.json: clean. Fixing this required adding filterWorkspaceStatuses to two fixtures in main's use-visible-worktrees.test.tsx and dropping the now-removed worktreeMap arg from the regression test.
  • Affected suites: 115 passed across 8 files — this PR's six, plus main's visible-worktrees.test.ts and use-visible-worktrees.test.tsx, plus worktree-host-collision-index.test.ts and the listing suites (54 passed) to confirm fix(workspaces): delete on the confirmed host, and make both hosts' rows selectable (STA-4343) #15013's own behaviour survived.
  • oxlint + React Doctor + oxfmt via lint-staged: clean.
  • merge-tree --write-tree against freshly fetched main (8cd338357e) immediately before pushing: clean. That newest commit is a runtime terminal-subscription fix with no sidebar/listing overlap.
  • Live repro of the active-workspace case not re-run; the red-first test above is the evidence.

@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 (1)
src/renderer/src/components/sidebar/visible-worktree-status-filter.ts (1)

8-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Shorten the block comment.

filterWorktreesByWorkspaceStatus has a correct implementation, but Lines [8-20] contain a multi-paragraph explanation. Keep the contract and one non-obvious constraint in a brief comment. As per coding guidelines, TypeScript comments must be concise and brief, with one line preferred.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d725c0e-80d2-4025-abc5-35b5eff3e2cc

📥 Commits

Reviewing files that changed from the base of the PR and between 8cd3383 and dd55de5.

📒 Files selected for processing (23)
  • src/main/runtime/rpc/methods/client-ui-workspace-filter-fields.ts
  • src/renderer/src/app-shell/use-persisted-ui-writer.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.test.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.tsx
  • src/renderer/src/components/sidebar/sidebar-filter-actions.ts
  • src/renderer/src/components/sidebar/sidebar-filter-state.test.ts
  • src/renderer/src/components/sidebar/use-visible-workspace-kanban-worktree-ids.ts
  • src/renderer/src/components/sidebar/visible-worktree-kinds.ts
  • src/renderer/src/components/sidebar/visible-worktree-status-filter.ts
  • src/renderer/src/components/sidebar/visible-worktrees-status-filter.test.ts
  • src/renderer/src/components/sidebar/visible-worktrees.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/active-workspace-survives-status-filter.test.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.test.tsx
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/lib/worktree-activation.ts
  • src/renderer/src/store/slices/ui.ts
  • src/shared/constants.ts
  • src/shared/persisted-ui-state-types.ts
  • src/shared/workspace-status-filter-sanitize.test.ts
  • src/shared/workspace-statuses.ts
🚧 Files skipped from review as they are similar to previous changes (18)
  • src/main/runtime/rpc/methods/client-ui-workspace-filter-fields.ts
  • src/renderer/src/i18n/locales/en.json
  • src/shared/constants.ts
  • src/shared/workspace-status-filter-sanitize.test.ts
  • src/renderer/src/app-shell/use-persisted-ui-writer.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.test.ts
  • src/shared/persisted-ui-state-types.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-filters.ts
  • src/renderer/src/lib/worktree-activation.ts
  • src/shared/workspace-statuses.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-visible-worktrees.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/active-workspace-survives-status-filter.test.ts
  • src/renderer/src/components/sidebar/visible-worktrees-status-filter.test.ts
  • src/renderer/src/components/sidebar/sidebar-filter-state.test.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceStatusFilterSection.tsx
  • src/renderer/src/store/slices/ui.ts
  • src/renderer/src/components/sidebar/use-visible-workspace-kanban-worktree-ids.ts
  • src/renderer/src/components/sidebar/SidebarWorkspaceOptionsMenu.tsx

Included review availability: Your plan includes up to 10 reviews per rolling hour; 3 remain after this review.

Comment on lines +319 to +320
filterWorkspaceStatuses: state.filterWorkspaceStatuses,
workspaceStatuses: state.workspaceStatuses,

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 | 🟠 Major | 🏗️ Heavy lift

Preserve host-qualified identity in the numbering path.

computeVisibleWorktreeIds filters worktree rows but returns bare worktree.id values. getVisibleWorktreeIds then rebuilds rows with bare-ID membership at Lines [349-358]. When two execution hosts expose the same worktree ID, a selected row and an excluded row share the same rank, so the excluded row reappears in Cmd+1–9 order. Carry getWorktreeHostIdentity(worktree) through this path and add a two-host collision regression test. The duplicate-ID case is documented in src/renderer/src/components/sidebar/visible-worktree-status-filter.ts, Lines [18-20].

@tobiasdiez

Copy link
Copy Markdown
Contributor

Any update here? This would be a great feature to have!

@MJViks

MJViks commented Oct 7, 2026

Copy link
Copy Markdown

I hope this makes it into the release soon.

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.

[Feature]: Filter sidebar workspaces by card status (Todo / In progress / In review / Done)

3 participants