Repository navigation
Conversation
Highlight tabs (Cmd/Ctrl-click, Shift-click), group them into named, colored, collapsible groups, rename/recolor/ungroup/close groups, and drag a whole group within a strip, across panes or into a new split. Groups survive restarts, pane merges, editor renames, reopen-closed and paired-web mirror rebuilds; keyboard tab cycling skips tabs hidden in collapsed groups.
… ids, close parity, IME rename, keyboard coverage
…, explicit rename, shared move transaction, ContextMenu, dead code removed
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change adds named, colored tab clusters that can be collapsed, expanded, moved, and closed. The tab strip supports multi-tab selection, cluster menus, drag-and-drop, and cluster-aware navigation and shortcuts. Cluster membership is normalized and carried through session persistence, hydration, pane moves, editor rekeying, and recently closed tab restoration. Closing a cluster checks running terminal processes and can show one confirmation listing affected terminals. The documentation and tests cover these behaviors, including split restrictions in remote workspaces and the floating terminal panel. Priority: ⬇️ Low
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ❓ Inconclusive | Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 132 functions across 95 files. (15 skipped… | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Linked Issues check | ✅ Passed | Issue #5194 requests named, collapsible, renamable, color-coded groups across tab types and supported platforms. The PR adds pane-level group state, colored chips, rename and collapse controls, and sh… |
| Out of Scope Changes check | ✅ Passed | The changes support #5194. Persistence, drag and pane movement, keyboard navigation, close confirmation, editor-tab rekeying, localization, documentation, and tests implement or validate tab groups. S… |
| Title check | ✅ Passed | The title clearly and concisely identifies the main change: Chrome-style tab groups in pane tab strips. |
| Description check | ✅ Passed | The description covers the required sections, explains the change and rationale, links issue #5194, includes visual proof and testing details, and records platform limits and known failures. |
Full details: Docstring Coverage
Explanation
Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 132 functions across 95 files. (15 skipped: 3 unsupported, 12 over the file limit.)
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Autopilot is currently an internal CodeRabbit preview.
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.
Comment @coderabbitai help to get the list of available commands.
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: e61baeb6-e573-4a0b-900a-9babfaf4a2e9
📒 Files selected for processing (129)
docs/site/content/docs/model/tabs-panes-splits.mdxsrc/main/runtime/orca-runtime-move-headless-mobile-session-tab.tssrc/renderer/src/assets/main.csssrc/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsxsrc/renderer/src/components/floating-terminal/FloatingWorkspaceTabDragContext.tsxsrc/renderer/src/components/floating-terminal/use-floating-terminal-close-actions.test.tssrc/renderer/src/components/floating-terminal/use-floating-terminal-close-actions.tssrc/renderer/src/components/tab-bar/BrowserTab.tsxsrc/renderer/src/components/tab-bar/EditorFileTab.test.tsxsrc/renderer/src/components/tab-bar/EditorFileTab.tsxsrc/renderer/src/components/tab-bar/EditorFileTabContextMenu.test.tsxsrc/renderer/src/components/tab-bar/EditorFileTabContextMenu.tsxsrc/renderer/src/components/tab-bar/EditorFileTabLeadingIcon.tsxsrc/renderer/src/components/tab-bar/SortableTab.rename-shortcut.test.tsxsrc/renderer/src/components/tab-bar/SortableTab.tsxsrc/renderer/src/components/tab-bar/SortableTabContextMenu.test.tsxsrc/renderer/src/components/tab-bar/SortableTabContextMenu.tsxsrc/renderer/src/components/tab-bar/TabBar.context-menu.test.tssrc/renderer/src/components/tab-bar/TabBar.tsxsrc/renderer/src/components/tab-bar/TabClusterChip.test.tsxsrc/renderer/src/components/tab-bar/TabClusterChip.tsxsrc/renderer/src/components/tab-bar/TabClusterContextMenu.split-blocked.test.tsxsrc/renderer/src/components/tab-bar/TabClusterContextMenu.tsxsrc/renderer/src/components/tab-bar/TabClusterMemberIndicator.tsxsrc/renderer/src/components/tab-bar/TabClusterMenuSection.test.tsxsrc/renderer/src/components/tab-bar/TabClusterMenuSection.tsxsrc/renderer/src/components/tab-bar/tab-bar-cluster-items.test.tssrc/renderer/src/components/tab-bar/tab-bar-cluster-items.tssrc/renderer/src/components/tab-bar/tab-bar-item-model.tssrc/renderer/src/components/tab-bar/tab-bar-item-surface.tsxsrc/renderer/src/components/tab-bar/tab-bar-props.tssrc/renderer/src/components/tab-bar/tab-bar-surface.tsxsrc/renderer/src/components/tab-bar/tab-bar-windows-shell-launch-test-harness.tssrc/renderer/src/components/tab-bar/tab-cluster-colors.tssrc/renderer/src/components/tab-bar/tab-cluster-menu-rename-focus.test.tsxsrc/renderer/src/components/tab-bar/tab-cluster-menu-targets.tssrc/renderer/src/components/tab-bar/tab-cluster-rename-request.tssrc/renderer/src/components/tab-bar/tab-context-menu-consistency.test.tsxsrc/renderer/src/components/tab-bar/tab-strip-pointer-activation.test.tsxsrc/renderer/src/components/tab-bar/tab-strip-pointer-activation.tssrc/renderer/src/components/tab-bar/tab-strip-selection.test.tssrc/renderer/src/components/tab-bar/tab-strip-selection.tssrc/renderer/src/components/tab-bar/use-sortable-tab-rename.tssrc/renderer/src/components/tab-bar/use-tab-bar-cluster-interactions.test.tsxsrc/renderer/src/components/tab-bar/use-tab-bar-cluster-interactions.tssrc/renderer/src/components/tab-bar/use-tab-bar-item-projection.tssrc/renderer/src/components/tab-bar/use-tab-bar-runtime-model-worktree-write-probe.tssrc/renderer/src/components/tab-bar/use-tab-cluster-menu-close-action.tssrc/renderer/src/components/tab-bar/use-tab-strip-rename.tssrc/renderer/src/components/tab-group/TabDragPreview.tsxsrc/renderer/src/components/tab-group/TabGroupPanel.tsxsrc/renderer/src/components/tab-group/TabGroupSplitLayout.tsxsrc/renderer/src/components/tab-group/tab-cluster-drag-geometry.test.tssrc/renderer/src/components/tab-group/tab-cluster-drop-target.test.tssrc/renderer/src/components/tab-group/tab-cluster-drop-target.tssrc/renderer/src/components/tab-group/tab-cluster-split-availability.test.tssrc/renderer/src/components/tab-group/tab-cluster-split-availability.tssrc/renderer/src/components/tab-group/tab-drag-data.tssrc/renderer/src/components/tab-group/tab-drag-drop-commit.test.tssrc/renderer/src/components/tab-group/tab-drag-drop-commit.tssrc/renderer/src/components/tab-group/tab-drag-hover-preview.tssrc/renderer/src/components/tab-group/tab-drag-preview-activation.test.tssrc/renderer/src/components/tab-group/tab-drag-preview-activation.tssrc/renderer/src/components/tab-group/tab-drag-preview-target.tssrc/renderer/src/components/tab-group/tab-group-panel-split-target.tssrc/renderer/src/components/tab-group/tab-insertion.tssrc/renderer/src/components/tab-group/useTabDragSplit.test.tssrc/renderer/src/components/tab-group/useTabDragSplit.tssrc/renderer/src/components/tab-group/useTabGroupCloseScopeCommands.test.tsxsrc/renderer/src/components/tab-group/useTabGroupWorkspaceModel.tssrc/renderer/src/components/terminal-pane/CloseTerminalDialog.test.tsxsrc/renderer/src/components/terminal-pane/CloseTerminalDialog.tsxsrc/renderer/src/components/terminal-pane/CloseTerminalGroupList.tsxsrc/renderer/src/components/terminal-pane/RunningTerminalCloseDialog.test.tsxsrc/renderer/src/components/terminal-pane/RunningTerminalCloseDialog.tsxsrc/renderer/src/components/terminal/running-terminal-close-guard.tssrc/renderer/src/components/terminal/running-terminal-group-close-guard.test.tssrc/renderer/src/components/ui/context-menu.tsxsrc/renderer/src/hooks/ipc-tab-switch-clusters.test.tssrc/renderer/src/hooks/ipc-tab-switch.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/tab-number-shortcuts.test.tssrc/renderer/src/lib/tab-number-shortcuts.tssrc/renderer/src/lib/workspace-session-unified-tabs.tssrc/renderer/src/runtime/web-session-client-owned-tab-placement.test.tssrc/renderer/src/runtime/web-session-client-owned-tab-placement.tssrc/renderer/src/runtime/web-session-tab-clusters.test.tssrc/renderer/src/runtime/web-session-tabs-sync-client-owned-placement.test.tssrc/renderer/src/runtime/web-session-terminal-recovery-snapshot-validation.test.tssrc/renderer/src/store/index.tssrc/renderer/src/store/running-terminal-close-confirm.tssrc/renderer/src/store/slices/editor-tab-cluster-rekey.test.tssrc/renderer/src/store/slices/editor/actions/restored-editor-owner-transition.tssrc/renderer/src/store/slices/editor/actions/restored-editor-tab-clusters.tssrc/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.tssrc/renderer/src/store/slices/editor/file-ids/open-file-path-rekey.tssrc/renderer/src/store/slices/recently-closed-tab-clusters.test.tssrc/renderer/src/store/slices/recently-closed-tab-position.tssrc/renderer/src/store/slices/recently-closed-tabs.test.tssrc/renderer/src/store/slices/restored-editor-tab-clusters.test.tssrc/renderer/src/store/slices/store-test-helpers.tssrc/renderer/src/store/slices/tabs-hydration.tssrc/renderer/src/store/slices/tabs-legacy-hydration.tssrc/renderer/src/store/slices/tabs/create-tabs-slice.tssrc/renderer/src/store/slices/tabs/tab-close-successor.tssrc/renderer/src/store/slices/tabs/tab-cluster-invariant.tssrc/renderer/src/store/slices/tabs/tab-cluster-model.test.tssrc/renderer/src/store/slices/tabs/tab-cluster-model.tssrc/renderer/src/store/slices/tabs/tab-cluster-persistence.test.tssrc/renderer/src/store/slices/tabs/tab-cluster-transfer.tssrc/renderer/src/store/slices/tabs/tabs-close-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-cluster-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-collapse-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-cluster-move-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-cluster-move-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-strip-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-transfer-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-create-actions.tssrc/renderer/src/store/slices/tabs/tabs-drop-actions.tssrc/renderer/src/store/slices/tabs/tabs-move-actions.tssrc/renderer/src/store/slices/tabs/tabs-secondary-actions.tssrc/renderer/src/store/slices/tabs/tabs-slice-contract.tssrc/shared/tab-types.tssrc/shared/workspace-session-schema.test.tssrc/shared/workspace-session-schema.tssrc/shared/workspace-session-tab-cluster-schema.tstests/e2e/tab-clusters.spec.ts
💤 Files with no reviewable changes (1)
- src/renderer/src/components/tab-bar/tab-context-menu-consistency.test.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
…opy, restore menu consistency test, keep unrelated runtime catalog keys
|
@coderabbitai Addressed the pre-merge checks in a699a85:
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Use neutral copy for mixed terminal groups. · CloseTerminalDialog.tsx:134-152
src/renderer/src/components/terminal-pane/CloseTerminalDialog.tsx:134-152
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse neutral copy for mixed terminal groups.
When a grouped close contains both
commandandagentterminals, the aggregateisAgentvalue remains true. The dialog labels the entire action as “Stop these agents?”, shows the agent resume warning, and uses “Stop Agent”. The expanded list does not correct this copy.Use neutral group copy for mixed
copyKindvalues. Show the agent warning and confirmation only when every grouped terminal is an agent.Suggested fix
+ const hasMixedCopyKinds = terminals + ? terminals.some((terminal) => terminal.copyKind === 'agent') && + terminals.some((terminal) => terminal.copyKind !== 'agent') + : false + ... - {isAgent + {hasMixedCopyKinds + ? translate( + 'auto.components.terminal.pane.CloseTerminalDialog.stop_mixed_group_title', + 'Stop these running terminals?' + ) + : isAgent ... - {isAgent ? ( + {isAgent && !hasMixedCopyKinds ? ( ... - {isAgent + {isAgent && !hasMixedCopyKinds
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 5b125c7f-3df0-4c5d-95c5-cd2d04da666e
📒 Files selected for processing (6)
src/renderer/src/components/tab-bar/tab-bar-surface.tsxsrc/renderer/src/components/terminal-pane/CloseTerminalDialog.test.tsxsrc/renderer/src/components/terminal-pane/CloseTerminalDialog.tsxsrc/renderer/src/components/terminal-pane/CloseTerminalGroupList.tsxsrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (6)
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/terminal-pane/CloseTerminalGroupList.tsx
- src/renderer/src/i18n/en-runtime-required.json
- src/renderer/src/components/tab-bar/tab-bar-surface.tsx
- src/renderer/src/components/terminal-pane/CloseTerminalDialog.test.tsx
- src/renderer/src/components/terminal-pane/CloseTerminalDialog.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
fd -H '^AGENTS\.md$|^tab-context-menu-consistency\.test\.tsx$|^en-runtime-required\.json$' . --exclude .git
if [ -f AGENTS.md ]; then cat AGENTS.md; fi
base=""
if git rev-parse --verify origin/main >/dev/null 2>&1; then
base="origin/main"
elif git rev-parse --verify main >/dev/null 2>&1; then
base="main"
fi
while IFS= read -r file; do
printf '\n--- %s ---\n' "$file"
ast-grep outline "$file" --items all || true
sed -n '1,65p' "$file"
if [ -n "$base" ]; then git diff "$base" HEAD -- "$file"; else echo "Main reference unavailable"; fi
done < <(fd '^tab-context-menu-consistency\.test\.tsx$' .)
printf '\n--- Runtime locale diff ---\n'
if [ -n "$base" ]; then
git diff "$base" HEAD -- src/renderer/src/i18n/en-runtime-required.json
else
echo "Main reference unavailable"
fi
python - <<'PY'
import json
from pathlib import Path
p = Path("src/renderer/src/i18n/en-runtime-required.json")
data = json.loads(p.read_text())
key = "components.native-chat.subagents.unnamed"
def walk(obj, prefix=""):
if isinstance(obj, dict):
for k, v in obj.items():
path = f"{prefix}.{k}" if prefix else k
if path == key:
print(f"{key}: {v!r}")
walk(v, path)
walk(data)
PYLength of output: 20375
✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! You are interacting with an AI system. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the full Chrome-style tab-group feature at a699a856. The core mechanisms hold up: the position-derived membership rule and its store subscriber, the atomic cluster mutators, Close Group's single all-or-nothing prompt, the highlight/chip/drag/keyboard surfaces, and the persistence/hydration/rekey round-trip.
- Model & invariant —
normalizeTabClustersis idempotent and enforces the documented invariants (unpinned members, contiguous longest-run, single ownership, no empty clusters,shownTabIdonly on collapsed member sets); the subscriber's change detection does not skip an affected pane. - Cluster mutators — every order-changing operation (
buildTabClusterStripMove,moveTabsToPane,moveTabCluster,mergeGroupIntoSibling, recreate-via-anchor) writestabOrderandtabClustersin one update and normalizes before returning; cross-pane and same-id-in-two-panes cases rekey correctly. - Close Group — hidden members are included, probes use the terminal
entityIdwhile closes use unified ids, one prompt covers the group, Cancel closes nothing, and every production host suppresses the per-tab re-prompt. - Collapse semantics —
shownTabIdis only set for a collapsed member, cleared on expand, pruned when the member leaves, and the active tab is never hidden. - Persistence —
tabClustersincludingshownTabIdsurvives restart, pane merge, editor rekey/move, reopen, and the headless rewrite; the renderer normalizes on both the read and the write boundary. - Keyboard — next/prev, Select Tab N, and terminal cycling skip hidden members; Ctrl+Tab still lists all.
ℹ️ Structured agent-session members are outside the Close Group running-work prompt
The documentation added here says the group warning covers "a command or agent", but closeCluster only collects members whose unified tab is contentType === 'terminal'. A structured agent-session member is closed with no running-work prompt.
Technical details
# Close Group running-work prompt skips structured agent sessions
## Affected sites
- `src/renderer/src/components/tab-bar/use-tab-bar-cluster-interactions.ts` — `closeCluster`'s `terminals` collection filters to `contentType === 'terminal'` / legacy item `type === 'terminal'`.
- `src/renderer/src/components/terminal/running-terminal-close-guard.ts` — `guardRunningTerminalGroupClose` only receives those terminals.
- `docs/site/content/docs/model/tabs-panes-splits.mdx` — the added sentence says the warning covers "a command or agent".
## Required outcome
- Confirm the exclusion is intentional, or make the doc wording match the behavior.
## Open questions for the human
- Is a structured `agent-session` tab expected to raise the "Stop these agents?" prompt on Close Group? It has no PTY to probe, and the existing single-tab close of an `agent-session` never used the running-process guard, so this is most likely the intended policy — flagging only so the doc sentence and behavior can be reconciled.ℹ️ Headless pane rewrite persists cluster membership verbatim
persistHeadlessTabGroups copies each pane's tabClusters by pane id without stripping members that the same write moved to another pane, so the persisted record can reference a tab owned elsewhere until hydration normalizes it. This self-heals; calling it out so the host-preserves / client-normalizes split is explicit.
Technical details
# Headless cluster records copied without member filtering
## Affected sites
- `src/main/runtime/orca-runtime-move-headless-mobile-session-tab.ts` — `persistHeadlessTabGroups` re-emits `previousGroupsById.get(group.id)?.tabClusters` unchanged, keyed by pane id.
- `src/main/runtime/headless-tab-group-split-layout.ts` — the move/split builders update `tabOrder` only.
- `src/renderer/src/store/slices/tabs-hydration.ts` — `normalizeTabGroupClusters` repairs the stale member on the next read.
## Required outcome
- Keep the current division (host preserves, client normalizes) and add a test that a headless move of a cluster member converges after hydration, so the reliance on normalization is pinned.
## Open questions for the human
- Should the host strip moved members itself, or is renderer normalization the intended single repair point? No headless test currently exercises a pane that has `tabClusters` when a member moves.ℹ️ Nitpicks
src/renderer/src/components/floating-terminal/use-floating-terminal-close-actions.test.tscallsguardRunningTerminalGroupClosewith the unified tab id directly, bypassingcloseCluster; it would not catch a regression in the unified-id → terminal-entityIdmapping thatcloseClusterperforms.- No test covers a headless mobile tab move (or split) on a pane that has cluster members.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
# Conflicts: # src/renderer/src/components/tab-bar/tab-bar-item-surface.tsx # src/renderer/src/components/tab-bar/use-tab-bar-item-projection.ts # src/renderer/src/components/tab-group/useTabDragSplit.test.ts
|
Merged main (including #24261) and resolved the conflicts in 81c4ea2. Tab groups now go through the new row:
I added a case to |
|
@greptileai review |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed PR #24728 at 81c4ea25, scoped to the delta since the prior pullfrog review at a699a85: a merge of origin/main (18b99ac7) whose conflict resolution adapted the tab-cluster feature onto main's newly memoized tab-row structure.
- Merged main's refactored tab row —
tab-bar-item-surface.tsxnow routes every tab kind through the memoizedTabBarItemRowand forwards the clusterclusterColor, the highlightisHighlighted, and the canonicalallItemsindex used for close-scope neighbors;tab-bar-surface.tsxinterleaves cluster chips with the visible rows. - Added
selectTabto the stable actions object —use-tab-bar-item-actions.tsgainedselectTab, wired fromclusterInteractions.selectTabinTabBar.tsx, so the highlight gesture still runs through the strip's single activation fan-out without changing the actions identity. - Rebuilt the strip projection on main's identity-stable
sortableIds—use-tab-bar-item-projection.tsproducesstripItems/visibleItems/clusterByUnifiedTabIdand keyssortableIdstostripIds;tabStripLayoutKeyfolds in each cluster's name, color, collapsed flag, and member count. - Extended tests — sensor-stability coverage plus a chip-drag-over-strip/edge case in
useTabDragSplit.test.ts, and aTabBarItemRowtest asserting a highlight re-renders only the affected row and selects through the current handler.
The resolved TabBarItemRow comparator includes clusterColor and isHighlighted, so cluster/highlight writes are not swallowed by the memo, and the full tab-bar + tab-group suites pass (809 tests).
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
# Conflicts: # src/renderer/src/store/slices/tabs/tabs-close-actions.ts
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed PR #24728 at 2f31d76, scoped to the delta since the prior pullfrog review at 81c4ea25: a merge of origin/main (752871b) whose only conflict resolution touching branch logic is in tabs-close-actions.ts.
- Adopted main's structured-agent-session ownership resolution —
closeUnifiedTabnow resolves the owning runtime viastructuredAgentSessionTargetForTab(state, tab)and clears focus intent throughstructuredAgentSessionFocusOwner(target), replacing the removedLOCAL_STRUCTURED_SESSION_OWNER/getActiveRuntimeTarget(...)path; retirement starts only when a runtime target resolves, else it warns and closes the tab locally. This matchesorigin/mainexactly. - Retained the cluster-aware close successor —
pickTabCloseSuccessor(hidden-member-aware next-active selection) is untouched by the merge, so collapsing groups still steer the successor away from hidden members.
No cluster production or test file changed in this delta, so the previously reviewed feature surface is unaffected.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…ingle chip gesture, store rename request, dedupe tests
…name via menu only, count only groupable tabs
…hip focus after its menu
… MRU after successor, one drag preview
…or; one successor and history implementation
# Conflicts: # src/renderer/src/components/tab-bar/EditorFileTab.tsx
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Keep indexed moves outside unrelated destination clusters. · tabs-move-actions.ts:43-47
src/renderer/src/store/slices/tabs/tabs-move-actions.ts:43-47
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep indexed moves outside unrelated destination clusters.
When
opts.indexfalls inside a destination cluster,moveUnifiedTabToGroupinserts the tab there. The store invariant then adds the tab to that cluster instead of preserving it as a nonmember. Use the cluster-aware insertion helper and normalize the destination:Suggested fix
-import { applyTransferredTabClusterMembership } from './tab-cluster-model' +import { + applyTransferredTabClusterMembership, + getTabClusterInsertionIndex +} from './tab-cluster-model' ... - const targetIndex = Math.max( - 0, - Math.min(opts?.index ?? targetOrder.length, targetOrder.length) + const targetIndex = getTabClusterInsertionIndex( + targetOrder, + targetGroup.tabClusters, + opts?.index ?? targetOrder.length ) ... - return { - ...group, - activeTabId: opts?.activate ? tabId : group.activeTabId, - tabOrder: targetOrder, - recentTabIds: opts?.activate - ? pushRecentTabId(sanitizedTargetRecent, tabId) - : sanitizedTargetRecent - } + return applyTransferredTabClusterMembership( + { + ...group, + activeTabId: opts?.activate ? tabId : group.activeTabId, + tabOrder: targetOrder, + recentTabIds: opts?.activate + ? pushRecentTabId(sanitizedTargetRecent, tabId) + : sanitizedTargetRecent + }, + [tabId], + null, + pinnedTabIds + )
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
9b317a6e-b1de-4b6f-9e37-2275e76a7fb7
📒 Files selected for processing (67)
docs/site/content/docs/model/tabs-panes-splits.mdxsrc/renderer/src/components/floating-terminal/FloatingTerminalPanel.shortcuts.test.tsxsrc/renderer/src/components/floating-terminal/use-floating-terminal-panel-items.tssrc/renderer/src/components/tab-bar/EditorFileTab.tsxsrc/renderer/src/components/tab-bar/EditorFileTabContextMenu.test.tsxsrc/renderer/src/components/tab-bar/SortableTab.tsxsrc/renderer/src/components/tab-bar/TabClusterChip.test.tsxsrc/renderer/src/components/tab-bar/TabClusterChip.tsxsrc/renderer/src/components/tab-bar/TabClusterContextMenu.tsxsrc/renderer/src/components/tab-bar/TabClusterMenuSection.test.tsxsrc/renderer/src/components/tab-bar/TabClusterMenuSection.tsxsrc/renderer/src/components/tab-bar/TabDragPreview.tsxsrc/renderer/src/components/tab-bar/tab-bar-cluster-items.tssrc/renderer/src/components/tab-bar/tab-cluster-chip-gesture.test.tsxsrc/renderer/src/components/tab-bar/tab-cluster-chip-gesture.tssrc/renderer/src/components/tab-bar/tab-strip-selection.tssrc/renderer/src/components/tab-bar/use-tab-bar-cluster-interactions.tssrc/renderer/src/components/tab-bar/use-tab-cluster-menu-close-action.tssrc/renderer/src/components/tab-group/tab-cluster-drag-geometry.test.tssrc/renderer/src/components/tab-group/tab-cluster-drop-target.test.tssrc/renderer/src/components/tab-group/tab-drag-drop-commit.test.tssrc/renderer/src/components/tab-group/tab-insertion.tssrc/renderer/src/components/tab-group/useTabGroupCloseScopeCommands.test.tsxsrc/renderer/src/components/ui/context-menu.tsxsrc/renderer/src/hooks/ipc-tab-switch-clusters.test.tssrc/renderer/src/hooks/ipc-tab-switch.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/floating-workspace-terminal-actions.test.tssrc/renderer/src/lib/floating-workspace-terminal-actions.tssrc/renderer/src/lib/tab-number-shortcuts.test.tssrc/renderer/src/lib/tab-number-shortcuts.tssrc/renderer/src/runtime/web-session-client-owned-tab-placement.tssrc/renderer/src/runtime/web-session-tab-clusters.test.tssrc/renderer/src/runtime/web-session-tabs-sync/apply-preparation-groups.tssrc/renderer/src/runtime/web-session-tabs-sync/layout-groups.tssrc/renderer/src/runtime/web-session-tabs-sync/state-equality-core.tssrc/renderer/src/store/index.tssrc/renderer/src/store/slices/editor-tab-cluster-rekey.test.tssrc/renderer/src/store/slices/editor/file-ids/open-file-path-rekey.tssrc/renderer/src/store/slices/recently-closed-tab-clusters.test.tssrc/renderer/src/store/slices/recently-closed-tab-position.tssrc/renderer/src/store/slices/restored-editor-tab-clusters.test.tssrc/renderer/src/store/slices/tab-group-state.test.tssrc/renderer/src/store/slices/tab-group-state.tssrc/renderer/src/store/slices/tabs/create-tabs-slice.tssrc/renderer/src/store/slices/tabs/tab-cluster-model.test.tssrc/renderer/src/store/slices/tabs/tab-cluster-model.tssrc/renderer/src/store/slices/tabs/tab-cluster-persistence.test.tssrc/renderer/src/store/slices/tabs/tabs-close-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-actions.tssrc/renderer/src/store/slices/tabs/tabs-cluster-collapse-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-cluster-move.test.tssrc/renderer/src/store/slices/tabs/tabs-cluster-transfer-actions.test.tssrc/renderer/src/store/slices/tabs/tabs-create-actions.tssrc/renderer/src/store/slices/tabs/tabs-drop-actions.tssrc/renderer/src/store/slices/tabs/tabs-focus-actions.tssrc/renderer/src/store/slices/tabs/tabs-move-actions.tssrc/renderer/src/store/slices/tabs/tabs-slice-contract.tssrc/renderer/src/store/terminals/terminal-tab-creation.tssrc/shared/tab-close-successor.test.tssrc/shared/tab-close-successor.tssrc/shared/tab-group-history.tssrc/shared/tab-types.tssrc/shared/workspace-session-terminal-tab-close.test.tssrc/shared/workspace-session-terminal-tab-close.tstests/e2e/tab-clusters.spec.ts
💤 Files with no reviewable changes (2)
- src/renderer/src/runtime/web-session-tabs-sync/state-equality-core.ts
- src/renderer/src/store/slices/tab-group-state.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/renderer/src/i18n/en-runtime-required.json
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes
Re-reviewed PR #24728 at 51d17b3, scoped to the delta since the prior pullfrog review at 2f31d76: a batch of fix(tab-clusters) branch commits plus a merge of origin/main.
- Unified successor/history into
shared—pickNextActiveTab/pickTabCloseSuccessornow live insrc/shared/tab-close-successor.ts(rewritten to handle legacy duplicate orders),pushRecentTabIdinsrc/shared/tab-group-history.ts, andgetHiddenClusterTabIdsinsrc/shared/tab-types.ts; every close, cross-pane move/drop, headless close, and editor-rekey path shares them and records the chosen successor. - Insertion snapping — added
getTabClusterInsertionIndexso a non-joining insert lands outside another cluster's span, applied inmoveTabsToPaneandrestoreRecentlyClosedTabPosition;applyTransferredTabClusterMembershipfolded intotab-cluster-model.ts. - Chip rework — one
useTabClusterChipGesture, rename requested through the store fieldrenamingTabClusterinstead of a window event, double-click rename dropped (menu only), anduseMountedReffocus handling that lets Radix restore focus to the chip. - Floating panel — collapsed-cluster members skipped in
visibleFloatingTabOrderandswitchFloatingWorkspaceTab; the chip is markeddata-floating-terminal-no-drag. - Consolidation — folded
tab-cluster-menu-targetsintotab-strip-selection,tabs-cluster-move-actionsintotabs-cluster-actions, andtab-group/TabDragPreviewintotab-bar/TabDragPreview; the New Group menu counts only groupable tabs.
ℹ️ Nitpicks
moveUnifiedTabToGroup(src/renderer/src/store/slices/tabs/tabs-move-actions.ts:43) inserts at a raw index withoutgetTabClusterInsertionIndex, so an interior-index move would let the membership invariant absorb the tab into a cluster, diverging fromdropUnifiedTab, which snaps to the nearest edge. Latent today — the only production caller (web-runtime-terminal-placement-settlement.ts:62) passes no index, and the shared test (tabs-cluster-transfer-actions.test.ts:168) covers only boundary indices — but worth aligning the two entry points.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
…s survivors, not entries
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Re-reviewed PR #24728 at 06e5904, scoped to the single commit since the prior pullfrog review at 51d17b3: two fix(tab-clusters) corrections that close out both findings from the last review, each with a regression.
- Indexed cross-pane moves now snap to the cluster edge —
moveUnifiedTabToGroup(tabs-move-actions.ts:46) routes its target index throughgetTabClusterInsertionIndex, so a move aimed at another pane's cluster interior lands just outside it instead of being absorbed by the position-derived membership rule. This aligns the move path withdropUnifiedTab; the drop path still passesjoiningClusterIdfor explicit joins, while the move path intentionally joins by position only. The newit.eachintabs-cluster-transfer-actions.test.tsdrives interior indices 2 and 3 through bothdropandmoveand asserts the destination cluster keeps its original members. - Close-successor guard now counts survivors, not entries —
src/shared/tab-close-successor.ts:57changedvisibleOrder.length > 1tovisibleOrder.some((tabId) => tabId !== closingTabId). The old guard counted the closing id (and legacy duplicates of it), so a collapsed group with a duplicated active id fell through topickNextActiveTabon a two-entry list and returnednull, leavingactiveTabIdnull while a hidden member remained. The regression intab-close-successor.test.tspins['a','a','b']closing'a'→'b'. The prior inline thread is resolved by the author.
No other production file changed in this delta; both corrections are accurate and covered.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
# Conflicts: # src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx # src/renderer/src/components/floating-terminal/use-floating-terminal-close-actions.ts # src/renderer/src/components/floating-terminal/use-floating-terminal-panel-items.ts # src/renderer/src/components/tab-bar/EditorFileTabContextMenu.test.tsx # src/renderer/src/components/tab-bar/EditorFileTabContextMenu.tsx # src/renderer/src/components/tab-bar/TabBarItemRow.tsx # src/renderer/src/components/tab-bar/tab-bar-surface.tsx # src/renderer/src/i18n/locales/en.json # src/renderer/src/lib/floating-workspace-terminal-actions.test.ts # src/renderer/src/store/slices/tabs/tabs-close-actions.ts
669eff4 to
1b015b0
Compare
# Conflicts: # src/renderer/src/components/floating-terminal/use-floating-terminal-close-actions.test.tsx # src/renderer/src/components/tab-bar/SortableTabContextMenu.tsx # src/renderer/src/components/tab-bar/TabBar.tsx # src/renderer/src/i18n/locales/en.json # src/renderer/src/store/slices/editor/actions/restored-editor-owner-transition.ts # src/renderer/src/store/slices/store-test-helpers.ts

ELI5
You can now bundle tabs in a pane's tab strip into named, colored groups, like Chrome's tab groups. Highlight a few tabs, right-click, Add to New Group, type a name. Click the group's label to fold its tabs away or bring them back; drag the label to move the whole group.
What Changed
Before: a pane's tab strip was a flat row. The only way to organize it was reordering tabs or splitting panes.
After:
Mechanism. Each pane (
TabGroup) gets an optionaltabClusterslist. Internally a group is a "tab cluster" becauseTabGroupalready means a split pane in Orca; the UI says "Group". Each cluster is{ id, name, color, collapsed, tabIds, shownTabId? }. The pane's flattabOrderis unchanged and remains the source of truth, so mobile publication, remote clients, close-to-the-right and every existing tab operation keep working without knowing about groups.A single repair rule keeps clusters consistent no matter which code path changed the tab order: membership follows position. Stale, pinned and duplicate members are dropped; a single unowned tab placed between two members joins; if a cluster's members end up split into several runs, the longest run keeps the cluster. The rule never reorders tabs. It runs in a store subscriber (
tab-cluster-invariant.ts) and in hydration/serialization, so existing mutators (create, close, drop, move, pin, reconcile, hydration repair) did not each need group-aware rewrites. Operations whose intent the rule can't infer (create, drag with membership, moving a whole group, merging panes) write order and membership in one atomic store update, and a dropped or reopened tab that isn't joining a group is placed at that group's edge, never inside it.Why
Agent-heavy workspaces accumulate many terminals, editors and browser tabs in one strip. Splits are the only grouping today and cost screen space. Named, collapsible groups are the familiar Chrome/Firefox model.
Alternatives considered:
tabOrder(keyboard, mobile, close-to-right, remote mirror) would need to flatten it. Keeping the flat order plus a position-derived membership rule avoided touching them.Linked Issue
Fixes #5194
Visual Proof
All media is from the packaged app driven headlessly (real clicks, drags and keys). Full-length MP4s are linked under each clip.
All operations: videos and screenshots
Highlight, group, name
MP4
Color and rename
MP4
Collapse and the kept tab
MP4
Moving: join, leave, reorder, split, move across panes
MP4
Ungroup and Close Group with running terminals
MP4
Edge cases: pinned tab, Add to Group, keyboard skipping, dark theme, unavailable split
MP4
Persistence across restart
MP4
Decisions
Decisions and the reason for each
TabGroupalready means a split pane, in code and in the docs. Users get Chrome's word; code avoids the collision.tabOrderuntouchedtabOrder, so mobile/remote clients still list them and close-to-the-right still includes them.shownTabId)ContextMenuItemgainedaria-disabledstyling so focusable-but-unavailable items look disabled.State analysis
State variables, one-group visibility matrix, transitions and coverage
State
id,name,color,collapsed,tabIds,shownTabId?tabOrder, intabOrderorder, each in at most one group; no empty groups;shownTabIdonly on collapsed groups and only a current member. Name trimmed, ≤80 chars; invalid color → grey.tabOrder,activeTabId,recentTabIds, pinned/preview tabstabOrderincludes hidden members. The active tab is always visible.Visibility of one group's members
A = active tab, S =
shownTabId.Impossible states (S on an expanded group, S not a member, empty group, non-contiguous members, pinned member) are removed by normalization and by the schema on load.
Transitions
tabOrder, so hidden members are included; pinned tabs survive.Affected surfaces
Every part of Orca this touches
tabClusterson panes; field-level fallback. Older builds ignore it.orca serve)tabClusterswhen it rewrites a pane (orca-runtime-move-headless-mobile-session-tab.ts).orca terminal list, browser tab commands)--tab-cluster-*colors (light/dark) and a highlight surface inmain.css.docs/site/content/docs/model/tabs-panes-splits.mdx"Grouping tabs".Testing
Unit: group model and normalization (idempotence, sandwich join, longest run, sticky), every store action, persistence round-trip including corrupt data, drag/drop decisions (incl. same-id groups in two panes), keyboard skipping incl. kept tab and mixed tab types, close scopes across collapsed groups, Close Group guard (busy/idle/timeout/skip setting/cancel), dialog disclosure, editor rekeys, reopen-closed, remote snapshot rebuild and successor, floating Close Group history.
End-to-end (
tests/e2e/tab-clusters.spec.ts, 8 tests): highlight → group → rename → collapse/expand → Escape-cancelled rename; ungroup and Close Group; one warning for two running terminals with expandable list, Cancel and confirm; kept tab after collapse, switching back, closing it; next/prev and Select Tab N across a collapsed group; Ctrl+Tab switcher into a hidden member; restart persistence; move to new split and merge back.Existing e2e: tabs, rename, drag, close navigation, browser tab, floating rename, running-close confirms, split identity/layout, paired split placement, editor selection (68 passed together with the group tests).
Failing on
origin/maintoo, unrelated:tab-strip-active-dock.spec.tson a 5K display (40 tabs never overflow the strip twice) andterminal-tab-close-restart-persistence.spec.ts(orphaned PTYs after restart; failed 3/3 on a cleanorigin/maincheckout).pnpm typecheck,oxlint, changed-code quality, React Doctor, selector fan-out, dead classes, max-lines/ts-nocheck/electron ratchets, localization extraction/catalogs/coverage: pass.audit:code-quality:nativereports 5 pre-existingmobile/import cycles, unchanged by this branch.Full
pnpm test: all failures are outside this change:config/scripts/mobile-web-app-*(Playwright browsers not installed locally),browser-manager-tab-identity,skill-recipe-shell, palette performance budget (timing; passes on rerun).Manually exercised the packaged macOS arm64 build through the browser client.
Platforms: macOS only.
I manually tested these changes locally
Automated tests added/updated
AI Disclosure
Implemented with Claude (orchestrating sub-agents) under human direction. Reviewed by an independent state-completeness audit, Codex (
gpt-6-astra, xhigh), a Grok review, and two rounds of Codexgpt-6-astraat max effort; every finding was fixed or is listed under Notes with its reason.Review
AI review summary (Claude orchestration, independent state audit, Codex
gpt-6-astraat xhigh and max effort, Grok; all findings fixed or listed under Notes):--tab-cluster-*colors, light/dark) and shadcn primitives (ContextMenu, Collapsible, Tooltip); design-system lints pass; verified in light and dark.Review findings and fixes
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Caveats
config/i18n-translation-source.md(feature PRs change English; target locales fall back to English until the translation pass).Cross-platform / SSH / mobile / compatibility: shortcuts use the existing platform bindings (Cmd vs Ctrl highlight; Select Tab N is Ctrl+digit on macOS, Alt+digit elsewhere); no paths or processes added; SSH and folder workspaces behave like local; no wire or RPC change; persistence change is an optional field with field-level fallback.
Future development: Orca CLI for tab groups
Not in this PR. A follow-up could let agents organize tabs through the
orcaCLI, like they already drive terminals (orca terminal …) and browser tabs (orca tab …):orca tab-group list|create|add|remove|rename|color|collapse|expand|move|ungroup|close … [--json]. It would add runtime RPC methods that call the store actions this PR adds (createTabCluster,addTabsToCluster,setTabClusterCollapsed,moveTabCluster, …), return stable tab ids in--jsonoutput, keep the running-terminal warning onclose(refuse or require--force), and document the commands in the bundledorca-cliskill. Groups that every client sees on server-hosted workspaces would need host-owned group state, a capability-negotiated protocol addition (docs/reference/remote-wire-compatibility.md).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred) — see Testing for the unrelated local failures.