Repository navigation
feat(native-chat): show each interrupted chat's workspace as its read-only sidebar card - #25652
Conversation
…-only sidebar card The resume-on-restart dialog listed workspaces as a bare name and glyph, so users could not tell their sessions apart. It now renders each workspace with the sidebar's own WorktreeCard in a new read-only mode, with the offered chats in place of its live agent rows, and nests child workspaces under a listed parent the way the sidebar does. The dialog is wider and the chat rows use the sidebar's compact agent row layout. Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
The dialog's cards stand in for the chats before the restart, so the sidebar's live status (Failed, now Interrupted) read as a verdict on chats the dialog offers to resume. A read-only card shows no status, and in the new card style its PR joins the badges because the status lane that normally holds it is gone. Co-Authored-By: Claude <[email protected]>
…ever its caller passes A read-only card stayed inert only because each control checked `readOnly` on its own and the caller left out the handlers that would turn the rest on: passing `onLineageToggle` put a live child-workspaces toggle on it. It also still painted live state over the resume dialog's chat rows: the sleep dim, the "Queued for deletion" overlay (which blocked unticking a pre-ticked chat) and the prompt-cache countdown. WorktreeCard now reduces a read-only card's props to what it pictures (every handler, selection and active flag dropped), and the controller resolves `readOnly` once into what the views already read: card properties without status, ports or live agents (and with the host), no sleep or delete state, no cache countdown, and one `interactive` flag for its own controls. A contract test renders a read-only card with every feature and handler on in all three card styles and fails on any control outside the caller's rows or any live state.
…s as the sidebar does A child workspace whose parent has older metadata with no host id stayed at the top of the dialog, though the sidebar nests it: the dialog copied a strict same-host filter, while the sidebar treats a hostless row as belonging to the host. The nesting rule now lives in one sidebar lineage helper, getWorktreeLineageAncestorsOnHost, which scopes by host the way the sidebar's lineage inputs do. In the legacy card style a nested child was inset for its parent's depth instead of its own, so it sat one sidebar step too far left (0px instead of 14px), outdented into the parent's padding. Each child is now inset for its own depth, as a sidebar row is. A groups-level test renders real sidebar cards from the store, with the child nested under a hostless parent, and checks every offered chat's checkbox renders and the legacy inset.
…neage loops Nesting followed each workspace's parent chain, so two workspaces listed as each other's ancestors (possible only when two hosts report opposite lineage for the same ids) were placed under no top-level entry and vanished, while their pre-ticked chats would still be resumed. The loop is now cut where the walk first comes back, so every workspace renders.
…ttons when narrow Below the small breakpoint the footer stacks bottom-up, so the option moved into it rendered under Resume and Dismiss all. It now reads top to bottom: the option, then the actions; wider windows keep the single row.
Its dynamic import ran in a beforeAll with a 20 s timeout, below the suite's 60 s hook timeout, and timed out under parallel load, which skipped all six contract tests.
… lane Legacy cards outdent their nested child list by 1.125rem to pull it back over the 22px status lane. A card without that lane (a read-only card in the resume dialog, or the sidebar with the Status property off) kept the outdent, so a child's title sat 3px right of its parent's instead of 25px. Without a lane the list now sits at ml-1, which gives the same 25px step (39px at depth 2). Cards with a status lane, the default sidebar, render exactly as before.
…w rule Round one nested a child under a parent whenever either had no host id, but the sidebar's row builder looks a parent up on the child's own host, so a row with no host id nests only under a parent with none either. The dialog showed a parent/child pair nested that the sidebar shows side by side. The row builder's parent lookup is now one function, getSidebarLineageParent, and the dialog walks ancestors with it (getSidebarLineageAncestors) over the same non-archived rows and cycle set. The chat's workspace is still found on its host, falling back to a row with no host id. A test checks the four host pairings against the real row builder, and the dialog test renders each pairing with every chat's checkbox.
Covers legacy, compact and new card styles with the Status property on and off. With Status on, the legacy and compact sidebar keep their outdent unchanged; with it off they now step children in by the same amount; the new card style is identical either way. The file now imports the card statically, since its 15 s per-test dynamic import timed out under load.
…bar's do The legacy outdent on a card's child list cancels its status lane, which in the sidebar is the unread button plus the row gap: 1.125rem, exactly the outdent, not the 22px the previous fix assumed. Its ml-1 for a card with no lane put the resume dialog's children 4px deeper per level than the sidebar's (25px against 21px). With no lane there is now nothing to cancel and no margin, which gives the sidebar's 21px (35px at depth 2). Status is a fixed card property, so every live card has the lane: only a read-only card takes this branch, and the live sidebar is unchanged. The tests now pin the outdent for live legacy and compact cards and no margin for a read-only one, instead of an unreachable Status-off state.
Review summary (updated after the sidebar-parity redesign)The problem. After Orca restarts while structured chats were mid-turn, the "Resume interrupted chats?" dialog listed each workspace as a bare name and host chip. With several workspaces it was hard to tell which session was which. What changes for the user. Each workspace in that dialog is now its left-sidebar card, with the same look and indentation as in the sidebar, but frozen:
What changed during review (head
Deferred (small, or not caused by this PR):
Verified:
Not verified:
|
|
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:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe restart-resume dialog now nests workspaces by host-aware lineage and renders known worktrees as read-only sidebar cards. WorktreeCard supports read-only presentation, caller-provided agent rows, and conditional interaction. The dialog’s chat rows, focus behavior, and layout are also updated. Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to No actionable merge-blocking behavior is established by the supplied change context; unverified platform combinations are not demonstrated failures. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The preview blocks workspace actions and preserves session-based resume requests. However, nesting drops host qualification before matching parents, which could misattribute workspaces in a mixed-host offer. No change that directly redirects execution or grants additional privileges was demonstrated. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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 |
There was a problem hiding this comment.
ℹ️ No critical issues — two doc wordings worth a look.
Reviewed changes
- Read-only card mode:
WorktreeCardgainsreadOnly+agentRows;toReadOnlyCardPropsallowlists display-only props, anduseWorktreeCardControlleris the single resolution point forinteractive, strippedcardProps, no sleep/delete/cache state, andreviewInBadges. - Resume dialog renders the real card:
NativeChatResumeOnRestartGroupsdraws each workspace with the sidebar'sWorktreeCard, nests children by the sidebar's lineage rule, and passes the resume chats throughagentRows. - Shared lineage rule:
getSidebarLineageParent/getSidebarLineageAncestorsextracted fromrow-builders.ts;nestResumeWorkspacesbuilds the dialog forest with cycle cutting. - Layout/token tweaks: wider dialog (
sm:max-w-3xl),bg-worktree-sidebarsurface, "Don't ask again" moved into the footer.
I read the complete diff and verified the inertness contract and the nesting algorithm independently. The read-only allowlist plus the single interactive resolution point hold up: every card control (details popover, SSH reconnect, lineage chip, delete quick action, rename-failed badge, status slot, ports button, cache timer, delete overlay) is gated or unmounted, and the badges rendered in the card are passive spans. getSidebarLineageParent is a faithful extraction of the row builder's logic, and nestResumeWorkspaces places every listed workspace exactly once across cyclic, chained, diamond and self-parenting graphs.
ℹ️ Nitpicks
src/renderer/src/components/native-chat-resume-on-restart-grouping.ts:120— "as the sidebar nests child workspaces" overstates parity. The sidebar only nests under the workspace's direct lineage parent, so an unlisted parent makes the child a root, whereasnestResumeWorkspacespromotes to the nearest listed ancestor. The next sentence describes that promotion; consider clarifying it as dialog-only (e.g. "by the sidebar's nesting rule, promoting past ancestors with nothing to resume").src/renderer/src/components/sidebar/worktree-lineage-projection.ts:205— "a lineage cycle nests nothing" is imprecise. It is the cyclic worktree itself that nests nothing; a non-cyclic worktree whose direct parent is cyclic still receives that parent as an ancestor. This matches the pre-existing row-builder behavior, so only the wording is off.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
Conflict in worktree-card-surface.tsx: main (#25486) moved the multi-selected look to a data-worktree-card-selected attribute; kept that, with the read-only card's `interactive` flag still gating the hover class, cursor and click.
…arker Main now styles a multi-selected card through data-worktree-card-selected. The contract test passes isMultiSelected, so it now asserts the marker stays off a read-only card, and drops the context-menu event constant main removed from that module.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
The delta since the prior Pullfrog review (ff1b786) is a merge of main plus a follow-up test commit, touching two files.
- Card surface adopts
main's multi-selection styling:worktree-card-surface.tsxdrops the inlineisMultiSelectedclass branch and leans on the pre-existing[data-worktree-card-selected]rule inmain.css:1301; theinteractivegating on the cursor, hover class andonClickis unchanged. - Read-only contract test extended:
WorktreeCard.read-only-contract.test.tsxasserts a read-only card never carriesdata-worktree-card-selected, and drops the now-unusedCLOSE_ALL_CONTEXT_MENUS_EVENTfrom theWorktreeContextMenumock.
toReadOnlyCardProps (worktree-card-model.ts:117) already forces isMultiSelected: false, so the new assertion is real coverage and the class-branch removal is behavior-equivalent to main (main.css was unchanged across the delta). No new issues.
deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e0b5c623-616e-4bd1-86a0-0b73d91ab5d5
📒 Files selected for processing (18)
src/renderer/src/components/NativeChatResumeOnRestartGroups.test.tsxsrc/renderer/src/components/NativeChatResumeOnRestartGroups.tsxsrc/renderer/src/components/NativeChatResumeOnRestartModal.test.tsxsrc/renderer/src/components/NativeChatResumeOnRestartModal.tsxsrc/renderer/src/components/activity/activity-thread-hover-card.tsxsrc/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.lineage.test.tsxsrc/renderer/src/components/sidebar/WorktreeCard.read-only-contract.test.tsxsrc/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsxsrc/renderer/src/components/sidebar/use-worktree-card-controller.tssrc/renderer/src/components/sidebar/use-worktree-card-secondary-details.store-subscriptions.test.tsxsrc/renderer/src/components/sidebar/use-worktree-card-secondary-details.tssrc/renderer/src/components/sidebar/worktree-card-model.tssrc/renderer/src/components/sidebar/worktree-card-parent-content.tsxsrc/renderer/src/components/sidebar/worktree-card-presentation.tsxsrc/renderer/src/components/sidebar/worktree-card-secondary-rows.tsxsrc/renderer/src/components/sidebar/worktree-list/rows/item-row.tsxsrc/renderer/src/components/sidebar/worktree-list/rows/worktree-row-geometry.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
…odal-sidebar-cards
Every row of the resume list (Select all, workspace, chat) now keeps its checkbox in one left column; nesting indents only the content after it, and a divider separates every row. A workspace checkbox is tri-state over its own chats and those of the workspaces nested under it; Select all heads the list with an "N of M selected" count. Failures a retry cannot fix stay out of both. Up/Down move between the list's checkboxes. The dialog no longer renders the sidebar's WorktreeCard, so the read-only card mode and the sidebar changes that only served it are reverted to main. The sidebar lineage helpers stay: the dialog still nests child workspaces by the sidebar's own rule.
…odal-sidebar-cards
…ialog The workspace row's host chip spelled an SSH host with its raw target id (e.g. ssh-1728291234567-abc12d) because it never got the sidebar's host labels. It now takes them from useSidebarHostScopeOptions, as the delete dialog does, so the chip reads "devbox" like the sidebar. Also translates the dialog's five new strings in es, fr, ja, ko and zh.
…odal-sidebar-cards
Visual proof: the resume dialog is now a checkbox listWhat changed for the user. After a restart with chats mid-reply, the "Resume interrupted chats?" dialog is now a checkbox list:
This replaces the previous design in this PR (each workspace drawn as its read-only sidebar card). That design's read-only card mode is removed from the sidebar. Before (main): narrow dialog, bare workspace names. Before (this PR's previous design): read-only sidebar cards, with checkboxes at different indents. After, all four chats selected (dark): After, mixed selection. "Make native chat work on remote" and Select all show a dash, "Fix quick command paste" is empty, and the button reads "Resume 2 chats": After, light theme: After, window narrower than 640px (checkboxes stay in one column; nothing clipped): Verified in the live run (isolated dev build of
Since the capture (head
The sidebar matches main except for one shared nesting helper that the dialog uses. Its behavior is unchanged, and a test checks it against the real sidebar row builder. Not verified live: SSH, folder and runtime-paired hosts (unit tests only), Windows and Linux rendering, keyboard Up/Down navigation. |
…5/rsc-resume-reconnect Takes #25652's checkbox-column list wholesale: every checkbox in one left column, a divider between rows, one Select all in the dialog, Up/Down between checkboxes, and no read-only sidebar cards. Per-machine wrapping follows it: each machine row's tri-state box sits in the same column and ticks only that machine's chats; what is under a machine row indents one level; the dialog keeps exactly one Select all, counting across machines every chat a tick can name (others' chats included, failures no retry can fix and machines mid-resume left out). A workspace under a machine row carries no host chip repeating that machine; the flat this-computer list keeps #25652's chip rule unchanged. The machine row's count now reads "N of M" like a workspace row's, so its three old count strings leave every catalog. Conflicts: runtime.ts takes main's host-stamped desktop caller, and the restart-offer origin now recognises this host's desktop by that caller instead of its client id string; structured-agent-session-params keeps both moves (identifiers to their own file on main, restart params to theirs here).
…nanb2025/rsc-resume-reconnect A workspace's host chip now spells its host with the sidebar's labels; the machine-host rule from the previous merge still decides whether the chip shows. Its five new strings arrive translated; the three machine count strings this branch dropped stay dropped.
…lect its chats The resume list now follows the common grouped-list pattern: each workspace heads its chats with a full-width tinted band (lighter for a nested child, at its own indent), chats are split by plain hairlines, and groups meet without gaps or rounded row corners. The project row gets a checkbox in the same left column, tri-state over every eligible chat in the project (nested workspaces included, failures a retry cannot fix left out) with an "x of y" count, on a band a step stronger than a workspace's. The list takes arrow keys, so it is now a named group (role="group").
…odal-sidebar-cards
…t place Workspaces the store cannot place in a repo were grouped under a header with an empty name, so the new project checkbox was announced as "Select all chats in ". Main and the earlier heads showed that header as a bare folder glyph with no name, and there is no id to fall back to. Those workspaces now get no project row; their own rows and Select all still cover their chats.
…nanb2025/rsc-resume-reconnect Takes #25652's banded groups, the project row's tri-state checkbox and its role="group" list. Under a machine row the project's title indents one level like everything else while its checkbox stays in the column, and the machine row wears the project's band as the outermost group.
Visual proof: grouped checkbox list with selectable projectsWhat changed since the last screenshots. The resume dialog keeps one checkbox column on the left, and is now drawn as a standard grouped list:
Before (main): narrow dialog, bare workspace names. Before (this PR's previous version): one checkbox column, but every row looked the same, so workspaces didn't visibly contain their chats. After, all five chats selected (dark): After, mixed selection. Two chats are unticked: orca-demo and "Make native chat work on remote" show a dash, "Fix quick command paste" is empty, Select all reads "3 of 5 selected", and the button reads "Resume 3 chats". After, light theme: After, window 600px wide ("Don't ask again" moves above the buttons; nothing clipped): Verified in the live run (isolated dev build of
Not verified live:
|
Brennan chose the nested-box layout without row dividers. A project is a tinted band; each workspace is a bordered, rounded box one step in from its project, holding its header band and its chats, and a child workspace's box sits inside its parent's, after the parent's chats, at the parent's chat indent. The boxes are drawn in the content area only, so every checkbox stays in the one left column outside them. Rows carry no dividers; the box border is the only line.
…odal-sidebar-cards
…nto brennanb2025/rsc-resume-reconnect #25652: each workspace is a bordered box drawn in the content area, a nested child's box sits inside its parent's, and rows have no dividers. Under a machine row everything a machine holds moves in one level while every checkbox stays in the outside column. The machine row is the header over its boxes, never boxed: the project's band in the content area, set off from the previous machine's boxes by twice the list's gap. Main via the base: the in-chat "why Orca stopped" row and Continue (#25675) and the desktop send layer (#25959). - Host: main's restart-resume contract module now also declares this branch's listed dismissal; the branch's own copy of that type is gone. continueInterrupted and the listed dismissal both stay. - Client: one options argument carries both the pairing fence and the compatibility skip; restartContinue keeps its 195 s. - Continue is hidden while a resume carries the chat on its own machine (resumes are per machine here), and the launch's resume decision is marked where main marks it: when this computer's resume names its chats, and when the launch read ends.
Brennan chose the Resume Tree. The list is now a tree: machine, then project, then workspace (a child workspace is a node inside its parent, after the parent's chats), then the chats. Every row keeps its checkbox in one left column, then an 18px indent per level, a disclosure arrow (an empty slot on a leaf), the icon and label, and its count. Levels read apart by icon and weight; there are no boxes, bands or row dividers, only the divider under Select all. The machine level shows only when the machine is not obvious (a remote host, or chats on more than one), named with the sidebar's host labels and an SSH chip; it replaces the per-workspace host chip. Chats are grouped per machine first, so one workspace id on two hosts stays two nodes. Every node is tri-state over the eligible chats under it, through the existing per-chat onToggle. Nodes start expanded; collapsing is local to this opening and keeps the selection. The list is a role="tree" of leveled treeitems: Up/Down move between checkboxes, Left collapses and Right expands the focused node.
…odal-sidebar-cards
…ct toast, one status entry, one dialog grouped by machine When a paired Orca server restarts while chats on it are mid-reply, this desktop now finds out: each verified connection to a server reads its restart offers, a toast names the server and offers Resume or Show chats, the status-bar entry counts the user's own interrupted chats on every machine, and the resume dialog lists every machine with its own row, tri-state box and workspaces. A server that predates the offer capability shows nothing. Rebuilt on #25652 alone: this branch no longer depends on #25674. The dialog opens through main's request/consume/subscribe API; a request carries only the machine it was opened for, and a request while one is open keeps the open dialog (its focus and the user's ticks). The offer-store, actions, toast, status entry, machine rows, Select all, own-only Dismiss, outcome toast, listed dismissal, origin, per-machine fence and the 195 s continue budget are this branch's own work, carried over unchanged.
Every per-chat read in the resume tree (its tick, its toggle, its failure, and each group's coverage) now goes through chatState, so a later change of chat key stays in one function. Tests pin the machine level's host rules: a runtime host gets a machine node but no SSH chip.
…and after a click Tab lands on the tree itself, where the arrow keys did nothing. Down and Home now enter at the first checkbox, Up and End at the last; Home and End also jump to the ends from a row. Clicking an arrow with the mouse left focus on the arrow, where no tree key works. After a collapse or expand click, focus now moves to that row's checkbox, or to the tree when the checkbox is disabled.
…nnanb2025/rsc-resume-reconnect #25652 shows the resume list as a tree: machine, project, workspace, chat, every checkbox in one left column, role="tree" with flat treeitems, Up/Down between checkboxes and Left/Right to close and open. Its machine level names each host from the sidebar's labels. This branch's own machine wrapper (NativeChatResumeOnRestartMachineSection, the machineHostId and depth props) goes: one tree lists every machine's rows. What the tree gains for several machines, all optional props: - rowKey: chats are keyed by their machine's listing (machine and pairing revision) and session id, since two servers may hold one id; selected, onToggle, failureFor, row actions and origin labels take it. - busyFor: a machine mid-resume locks only its own nodes and rows. - defaultExpanded: a machine starts open when the dialog was opened for it, when it is the only one, or when nothing on it starts ticked; the user's own opening and closing wins, also across later answers. - machineSubtitle: "Installed an update / Was quit · <age>" beside a machine's name. - originLabelFor: the origin chip on a chat that is not the user's, and that row's own dismiss beside it, outside the row's checkbox label.
… after a click) into brennanb2025/rsc-resume-reconnect #25652 reads every chat through chatState and builds group coverage through coveredKeys, and makes the tree's keys work from its own Tab stop and after an arrow is pressed. This branch's additions move onto those plug-in points: the row key (machine listing plus session id) is read in chatState, which now also names a row's own actions and origin; busy per machine is one helper beside it; the machine props live with the tree's props. The branch's separate tree-props module is gone. Also: each locale catalog had two "selectMachine" keys in one object after the first tree merge (this branch's "Resume every chat on …" and the tree's "Select all chats on …"); the branch's one goes, the tree owns the string.
Visual proof: the resume dialog is now a treeWhat changed. The "Resume interrupted chats?" dialog is now a tree: machine → project → workspace → chat.
Before (main): a narrow dialog with bare workspace names. After, all five chats selected: After, two chats unticked. orca-demo, "Make native chat work on remote" and Select all show a dash, and the button reads "Resume 3 chats": After, "Make native chat work on remote" collapsed. Its chats and child workspace are hidden, and its checkbox still shows the partial pick ("2 of 3"): After, light theme: After, a 600px-wide window: Verified in the live run (isolated dev build of
Not verified live:
|
… one end-of-review sync) #25652 landed on main squashed (4bd4f8c), so its branch commits are not on main. The merge result is main's tree with only #25676's own change re-applied: the diff from #25652's final head 25cefbc to this branch's 996e884, applied 3-way onto main, with no conflicts. The same 93 files differ from main as differed from #25652's head, and in them the merge adds exactly main's own lines since 25cefbc.
…the one end-of-review sync) #25652's resume-dialog tests open the dialog as the user and start past the startup checks, like the other resume-dialog tests here.
















ELI5
When Orca restarts while chats were still working, it asks "Resume interrupted chats?" and lists them. That list showed each workspace as a bare name, so it was hard to tell which session was which, and picking some of them was fiddly. Now the dialog is a tree, like a file tree: machine, project, workspace, chat. Every node has a checkbox in one column on the left that selects everything under it, and branches collapse.
What Changed
Before: a narrow dialog. Each workspace was a small glyph, its name and a host chip, with its chats under it on two lines each. A child workspace was not nested, and the only way to pick was chat by chat.
After:
sm:max-w-3xl, wassm:max-w-xl) and the list has no bright border. "Don't ask again" sits in the footer row (above the buttons when narrow). Resume has keyboard focus when the dialog opens. Wording and actions are unchanged.Mechanism:
ResumeOnRestartGroupsgroups the offered chats by machine (executionHostId, any non-local id counts as remote), then project, then workspace, and nests child workspaces with the sidebar's own parent rule (getSidebarLineageParent, now shared with the sidebar's row builder). Each row is aResumeTreeRow: a fixed checkbox column, an 18px indent per level, an arrow slot, then the content. Chat rows still render throughResumeCandidateRow.role="tree"with leveled tree items. The collapsed set lives in one hook (useResumeTreeExpansion), is local to this opening of the dialog, and is never saved.onToggle, and every per-chat lookup goes through one helper (chatState).ResumeOnRestartGroupsandResumeCandidateRowprops are unchanged.Why
The ask was that users can recognize their sessions and pick some of them quickly, with clear containment, and room for a machine level as more hosts arrive. Earlier versions of this PR drew each workspace as its sidebar card, then as a flat checkbox list, then as nested boxes. Each one either hid what contains what or stacked boxes several levels deep. A tree is the common pattern for choosing from a hierarchy: containment comes from indentation and arrows, every level gets its own checkbox, and adding the machine level is just one more level.
The read-only card mode that the first version added to
WorktreeCardis removed, so the sidebar code is back to main apart from the shared nesting rule.Linked Issue
N/A (internal).
Visual Proof
Captured from an isolated dev Orca build of this branch (
25cefbc5db1) on a second Mac, with a fake Codex, driven only over the Chrome DevTools Protocol. The scene: two projects, four workspaces (one a child of another), and five structured Codex chats left mid-reply when Orca restarted.Before (main): narrow dialog, bare workspace names, two lines per chat, child not nested.
After, all selected:
After, mixed selection (dashes on the project, the workspace and Select all; "Resume 3 chats"):
After, a workspace collapsed (selection kept, "2 of 3"):
After, light theme:
After, 600px window:
The demo was all on one computer, so the machine level doesn't appear here; tests cover SSH hosts, paired-server hosts and several hosts.
Testing
Live check on macOS in an isolated dev build; see Visual Proof.
tscfor the web project: clean.Vitest: the resume dialog test files pass.
Tests cover:
Each key guard was removed in turn to confirm its test fails.
Changed-code quality gate, React Doctor, oxlint and the localization checks pass.
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
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
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)