Skip to content

feat(native-chat): show each interrupted chat's workspace as its read-only sidebar card - #25652

Merged
brennanb2025 merged 36 commits into
mainfrom
brennanb2025/resume-modal-sidebar-cards
Oct 8, 2026
Merged

brennanb2025 merged 36 commits into
mainfrom
brennanb2025/resume-modal-sidebar-cards

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​969 $\color{#cf222e}{\Huge{\mathbf{−}}}$​63 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​906
Prod 19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1345 $\color{#cf222e}{\Huge{\mathbf{−}}}$​250 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1095

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:

  • The list is a tree: machine → project → workspace → chat. A child workspace is a node inside its parent workspace, listed after the parent's chats, and its own chats sit one level deeper.
  • Every node has a checkbox, all in one column on the left. A node's checkbox selects every chat under it and shows a dash and "x of y" when only part is selected. Select all sits at the top with "N of M selected".
  • Every node with children has a disclosure arrow. Branches start expanded, and collapsing keeps the selection.
  • Levels are told apart by icon and weight: monitor and bold for a machine, folder for a project, branch (or folder) icon with a muted branch name for a workspace, agent icon and lighter text for a chat. Chat rows keep "name - what it was doing", model and age. There are no boxes, bands or row dividers, only one divider under Select all.
  • The machine level appears only when a chat lives on another machine (an SSH host or a paired Orca server), or the chats span machines. SSH machines show their saved name and an "SSH" chip. With every chat on this computer, the tree starts at projects.
  • Keyboard: Up and Down move between checkboxes, Left collapses, Right expands, Space toggles, and Home and End jump to the ends. Clicking a row's text toggles it.
  • Chats a retry can't fix are left out of the group checkboxes and counts. While a resume is running, the checkboxes are disabled.
  • The dialog is wider (sm:max-w-3xl, was sm: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.
  • The live sidebar is unchanged.

Mechanism:

  • ResumeOnRestartGroups groups 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 a ResumeTreeRow: a fixed checkbox column, an 18px indent per level, an arrow slot, then the content. Chat rows still render through ResumeCandidateRow.
  • The list is 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.
  • Selection stays where it was, in the modal's selected set. Group and Select all toggles call the existing per-chat onToggle, and every per-chat lookup goes through one helper (chatState). ResumeOnRestartGroups and ResumeCandidateRow props are unchanged.
  • Each workspace is looked up on its own host, which also covers folder workspaces. A workspace the store doesn't know yet gets its fallback name; a group whose project can't be identified gets no project row. If lineage data ever loops, each workspace still appears exactly once, so no ticked chat is resumed without being shown.

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 WorktreeCard is 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.

Before: resume dialog on main

After, all selected:

After: all selected

After, mixed selection (dashes on the project, the workspace and Select all; "Resume 3 chats"):

After: mixed

After, a workspace collapsed (selection kept, "2 of 3"):

After: collapsed

After, light theme:

After: light

After, 600px window:

After: narrow

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.

  • tsc for the web project: clean.

  • Vitest: the resume dialog test files pass.

  • Tests cover:

    • the tree shape (levels, depth and indent, the arrow slot, where a child workspace sits);
    • the machine level appearing only for non-local or several hosts, with the SSH chip only on SSH hosts;
    • the dash and "x of y" state at every level;
    • collapse hiding only the branch and keeping the selection;
    • the keyboard: Up/Down, Left/Right, Home/End, entering from the tree, and focus after an arrow click;
    • every offered chat rendering exactly once, including the same workspace id on two hosts and loops;
    • chats a retry can't fix being excluded;
    • the running state disabling everything.
  • 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

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

Notes

  • SSH / remote: chats on another machine appear under that machine's node (saved SSH name, "SSH" chip; paired Orca servers by their name). Each workspace is looked up on its own host, and nesting follows the sidebar: a child nests only under a parent on the same host.
  • Folder workspaces: they render their sidebar card too, through the store's folder-workspace lookup.
  • Live sidebar: unchanged; only the parent rule moved into a shared function, with a test against the real row builder.
  • Performance: cards render only while the dialog is open. Lineage is worked out once per change to the worktree list. Live sidebar cards keep the same store subscriptions.
  • Wire: no IPC or remote-protocol change.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

brennanb2025 and others added 3 commits October 5, 2026 11:19
…-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]>
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.
@brennanb2025

brennanb2025 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor Author

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:

  • It shows the status column, title, branch, PR and issue badges, the "1 child" chip, the SSH host pill, and the host chip when the Host card setting shows it.
  • The chats to resume sit inside the card, one line each with a checkbox, and a child workspace sits under its parent.
  • The status column shows only the sidebar's idle look (grey dot, or the branch or PR icon in the new card style), never Working, Failed, Done, sleeping or unread.
  • Nothing on a card responds to clicks, hover or the keyboard.
  • The list has no border, and Resume has focus when the dialog opens.
  • The live sidebar is unchanged.

What changed during review (head a27b59e1342 to 4b21e08e167):

  • Read-only modeled once. It had been a check beside each control, and a control could stay live if its caller passed a handler. The card now keeps an allowlist of display props when read-only, and the controller is the one place that resolves what a read-only card shows. A contract test fails if anything clickable or focusable appears outside the chat rows, in all three card styles.
  • Live state removed: sleep dimming, the deletion overlay (it covered pre-ticked checkboxes) and the cache countdown.
  • Sidebar parity (requested after the first screenshots). The first version dropped the status column and the "1 child" chip and forced the host chip, so the dialog didn't look like the sidebar and children looked randomly indented.
    • Now the status column stays, in its idle form, and the chip and SSH pill render passively with the sidebar's own markup.
    • Indentation comes from the sidebar row's own geometry, which is now one shared function. The parent rule is shared with the sidebar's row builder the same way.
    • Dialog and sidebar were measured side by side: status-column and title offsets are identical, with a 21px child step in both.
  • Vertical spacing matches the sidebar (requested after the second screenshots). The chip-to-child spacing already matched within each card style, and was measured equal: 12px chip to child title in the new style, 18px in the default and 21px in compact. Compact card padding, the gap between top-level cards (4px against 6px), and the header padding of a card whose only extra detail is a cache timer did not match; they now use the sidebar's own spacing values. Vertical geometry is tested against a real sidebar render.
  • Bright list border removed. A bare border took the text color. This border was already there before this PR.
  • SSH identity. A read-only card shows the sidebar's SSH pill without hover or click, so a dialog whose chats are all on one SSH machine still names it. A remote folder workspace names its machine through the host chip.
  • Focus: keyboard focus stays inside the dialog when Resume is disabled.
  • No chat can be hidden: nesting places every workspace exactly once even if lineage data loops.
  • Narrow window: "Don't ask again" stacks above the buttons.
  • Merged with main. The one conflict was the card surface (main's multi-select change); the contract test now covers it too.

Deferred (small, or not caused by this PR):

  • Chats are still grouped by bare workspace id, which predates this PR. A follow-up PR that groups by machine builds on this branch.
  • The sidebar's own "child workspaces" shortcut still requires an exact host match. Changing it would change sidebar behavior, so it is out of scope.
  • The allowlist isn't type-checked for completeness. A new card prop is dropped on read-only cards, which keeps them inert.
  • The dialog lists workspaces in the order they were offered, not the sidebar's current sort. This is unchanged from before.

Verified:

  • Seven review rounds, the last ones by Codex reviewers, plus a release-readiness check. No P0 or P1 at any point.
  • The web project typechecks, and the sidebar, resume dialog and activity hover card test files pass. Each new guard was removed one at a time to confirm its test fails.
  • Live runs on a second Mac with an isolated dev build and a fake Codex (screenshots in the PR body):
    • dialog-vs-sidebar measurements, horizontal and vertical, match in the default, new and compact card styles;
    • cards don't respond to clicks, hover or Tab, and there is no status text;
    • the list has no border, and the narrow-window footer stacks correctly;
    • resuming 3 of 4 chats resumed exactly those three (run at cf86c0bc407).

Not verified:

  • SSH and runtime-paired hosts in a live run. The passive SSH pill and folder host label are covered by unit tests only.
  • Windows and Linux rendering. The change is CSS and React only.
  • Compact card mode in a live run.
  • Focus when the dialog opens by itself at startup. A feature tip covered the dialog in that run; reopening it from the status bar focused Resume.
  • One existing SSH card test file timed out on compile under local machine load; CI covers it.

@brennanb2025
brennanb2025 marked this pull request as ready for review October 5, 2026 22:54
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

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

Use the following commands to manage reviews:

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

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a66c3444-9086-46d0-b8fa-27ad3d267775
📥 Commits

Reviewing files that changed from the base of the PR and between 404de10 and 1140cca.

📒 Files selected for processing (2)
  • src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx
  • src/renderer/src/components/NativeChatResumeOnRestartModal.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/renderer/src/components/NativeChatResumeOnRestartModal.tsx

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


📝 Walkthrough

Walkthrough

The 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 1140c

No actionable merge-blocking behavior is established by the supplied change context; unverified platform combinations are not demonstrated failures.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 1140c

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

  • Low · security · inferred: The new ancestry projection resolves host-qualified workspace rows but returns each parent’s bare workspace ID; nesting then matches that ID without a host. If an offered parent on another host shares the ancestor’s ID, a chat can appear beneath the wrong host’s workspace. This can weaken the attribution supporting the user’s resume decision, although the original session ID remains the action target. Production reachability of this combination remains unresolved.
Security review details

Security Blast Radius

  • inferred — The identified concern is bounded to attribution of interrupted chats and workspaces available to the current application user. Inspected resume requests retain their original session IDs; the evidence does not demonstrate additional tenant access, backend authority, or execution redirection.

Security Findings and Attack Paths

  • inferred — A conditional exposure path is incorrect host ancestry influencing the user’s decision to resume an agent. WorkspaceId-only grouping already existed at the PR base and is not treated as newly introduced; the new concern is host qualification being discarded during ancestry matching. No attacker-controlled exploitation path or production occurrence was verified.

Trust Boundaries and Controls

  • observed — Resume authority remains with the existing host flow. The RPC forwards session IDs and caller identity; the host reads durable action markers, derives eligibility, and filters requested candidates rather than trusting workspace-card ancestry.

Resilience and Maintainability Implications

  • observed — Inspected automatic reads retain existing containment controls: issue requests use source-scoped cache keys and in-flight deduplication, while SSH hydration applies environment-generation checks before writing retained state. These are counterevidence to treating passive mounting alone as an authority bypass.

Hardening Proposals

  • proposed — Preserve host-qualified workspace identities through ancestor results and nesting keys, keeping display ownership aligned with the identity used for workspace lookup.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 50 functions across 30 files. 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 identifies the primary change: interrupted chats now show their workspaces as read-only sidebar cards. It is concise and specific.
Description check ✅ Passed The description is complete and relevant. It includes the required explanation, user-facing changes, rationale, testing details, visual proof, remote considerations, and checklist. The linked issue is…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No critical issues — two doc wordings worth a look.

Reviewed changes

  • Read-only card mode: WorktreeCard gains readOnly + agentRows; toReadOnlyCardProps allowlists display-only props, and useWorktreeCardController is the single resolution point for interactive, stripped cardProps, no sleep/delete/cache state, and reviewInBadges.
  • Resume dialog renders the real card: NativeChatResumeOnRestartGroups draws each workspace with the sidebar's WorktreeCard, nests children by the sidebar's lineage rule, and passes the resume chats through agentRows.
  • Shared lineage rule: getSidebarLineageParent/getSidebarLineageAncestors extracted from row-builders.ts; nestResumeWorkspaces builds the dialog forest with cycle cutting.
  • Layout/token tweaks: wider dialog (sm:max-w-3xl), bg-worktree-sidebar surface, "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, whereas nestResumeWorkspaces promotes 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.

Pullfrog  | Fix it ➔ | View workflow run | Using 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.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

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.tsx drops the inline isMultiSelected class branch and leans on the pre-existing [data-worktree-card-selected] rule in main.css:1301; the interactive gating on the cursor, hover class and onClick is unchanged.
  • Read-only contract test extended: WorktreeCard.read-only-contract.test.tsx asserts a read-only card never carries data-worktree-card-selected, and drops the now-unused CLOSE_ALL_CONTEXT_MENUS_EVENT from the WorktreeContextMenu mock.

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.

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

@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


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e0b5c623-616e-4bd1-86a0-0b73d91ab5d5
📥 Commits

Reviewing files that changed from the base of the PR and between 5e73d7e and cf86c0b.

📒 Files selected for processing (18)
  • src/renderer/src/components/NativeChatResumeOnRestartGroups.test.tsx
  • src/renderer/src/components/NativeChatResumeOnRestartGroups.tsx
  • src/renderer/src/components/NativeChatResumeOnRestartModal.test.tsx
  • src/renderer/src/components/NativeChatResumeOnRestartModal.tsx
  • src/renderer/src/components/activity/activity-thread-hover-card.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.affiliate-list-mode.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.lineage.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.read-only-contract.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCardStatusSlot.tsx
  • src/renderer/src/components/sidebar/use-worktree-card-controller.ts
  • src/renderer/src/components/sidebar/use-worktree-card-secondary-details.store-subscriptions.test.tsx
  • src/renderer/src/components/sidebar/use-worktree-card-secondary-details.ts
  • src/renderer/src/components/sidebar/worktree-card-model.ts
  • src/renderer/src/components/sidebar/worktree-card-parent-content.tsx
  • src/renderer/src/components/sidebar/worktree-card-presentation.tsx
  • src/renderer/src/components/sidebar/worktree-card-secondary-rows.tsx
  • src/renderer/src/components/sidebar/worktree-list/rows/item-row.tsx
  • src/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.

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

Copy link
Copy Markdown
Contributor Author

Visual proof: the resume dialog is now a checkbox list

What changed for the user. After a restart with chats mid-reply, the "Resume interrupted chats?" dialog is now a checkbox list:

  • Every checkbox sits in one column on the left: Select all, then one per workspace, then one per chat.
  • A workspace checkbox selects every chat in it, including chats in its nested child workspaces. It shows a dash when only some are selected, and "x of y" on the right.
  • Nesting indents only the text, never the checkbox. A divider separates every row, and there are no vertical guide lines.
  • Ticking several chats is a straight vertical move down one column, instead of hunting across sidebar cards.

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

Before (this PR's previous design): read-only sidebar cards, with checkboxes at different indents.

Before: read-only sidebar cards

After, all four chats selected (dark):

After: all 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: mixed selection

After, light theme:

After: light theme

After, window narrower than 640px (checkboxes stay in one column; nothing clipped):

After: narrow window

Verified in the live run (isolated dev build of 9e4f9b717f3 on a second Mac, fake Codex, driven over the Chrome DevTools Protocol):

  • Checkbox column: all eight list checkboxes share one x position (508 CSS px). Content steps 20px per nesting level.
  • Dividers: every row after Select all has a divider, and there is no vertical guide line.
  • Mixed selection: unticking two chats by clicking their row text gave the states above. Checkbox states were read from the page (aria-checked).
  • Workspace checkbox: clicking "Make native chat work on remote" selected all three chats under it, including the child workspace's chat.
  • Select all from a mixed state: the first click selects every chat and the second clears them, the standard behavior for a mixed checkbox.
  • Resume: with one chat unticked, "Resume 3 chats" resumed exactly those three; the fake Codex's log shows no resume for the fourth.

Since the capture (head f762e684740; nothing in these screenshots changes):

  • An SSH workspace's chip shows the machine's saved name instead of its raw id.
  • The new strings are translated into es, fr, ja, ko and zh.
  • Main is merged in.

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.

brennanb2025 added a commit that referenced this pull request Oct 7, 2026
…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).
brennanb2025 added a commit that referenced this pull request Oct 7, 2026
…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").
…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.
brennanb2025 added a commit that referenced this pull request Oct 7, 2026
…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.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Visual proof: grouped checkbox list with selectable projects

What changed since the last screenshots. The resume dialog keeps one checkbox column on the left, and is now drawn as a standard grouped list:

  • Projects: each project (repo) row is a tinted band with its own checkbox. It selects every chat in that project and shows a dash and "x of y" when partly selected.
  • Workspaces: each workspace row is a full-width tinted band with its own checkbox, which also covers its nested child workspaces. A child workspace gets a lighter band at its indent.
  • Chats: chats sit under their workspace, split by plain full-width hairlines. There are no gaps between groups and no vertical lines.
  • Accessibility: the list is now a named group (role="group"), which clears a React Doctor warning about the list's arrow-key handling.
  • Unknown project: a workspace whose project Orca can't identify (for example, its machine is still connecting) gets no nameless project row. Select all still covers its chats.

Before (main): narrow dialog, bare workspace names.

Before: main

Before (this PR's previous version): one checkbox column, but every row looked the same, so workspaces didn't visibly contain their chats.

Before: flat checkbox list

After, all five chats selected (dark):

After: all selected

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

After, light theme:

After: light

After, window 600px wide ("Don't ask again" moves above the buttons; nothing clipped):

After: narrow

Verified in the live run (isolated dev build of 73d18749154 on a second Mac, fake Codex, driven over the Chrome DevTools Protocol):

  • Every list checkbox sits at one x position.
  • The counts and checkbox states above were read from the page (aria-checked).
  • Clicking a chat's row text toggles it.
  • Light theme and a real 600px viewport (window.innerWidth === 600) render correctly.
  • In the earlier run of this design (4b922736478), with one chat unticked, "Resume 4 chats" resumed exactly those four; the fake Codex's log shows no resume for the fifth.
  • Hashes of the second Mac's real Codex and Claude config files matched before and after the run, except one trust entry added by another session's worktree.

Not verified live:

  • Clicking a project's checkbox: unit tests cover it, and the earlier run checked the counts.
  • SSH and folder workspaces (unit tests only).
  • Windows and Linux rendering.
  • Keyboard Up/Down.

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.
brennanb2025 added a commit that referenced this pull request Oct 7, 2026
…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.
brennanb2025 added a commit that referenced this pull request Oct 8, 2026
…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.
brennanb2025 added a commit that referenced this pull request Oct 8, 2026
…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.
brennanb2025 added a commit that referenced this pull request Oct 8, 2026
… 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.
@brennanb2025

Copy link
Copy Markdown
Contributor Author

Visual proof: the resume dialog is now a tree

What changed. The "Resume interrupted chats?" dialog is now a tree: machine → project → workspace → chat.

  • Checkboxes: every node has one, in a single column on the left. It selects everything under the node and shows a dash and "x of y" when only part is selected. Select all sits at the top.
  • Containment: shown by indentation and disclosure arrows, the way a file tree shows folders. A child workspace is a node inside its parent workspace, after the parent's chats, with its own chats one level deeper.
  • Collapsing: each branch collapses and expands, starting expanded, and collapsing keeps the selection.
  • Levels: told apart by icon and weight: monitor and bold for a machine, folder for a project, branch icon for a workspace, agent icon and lighter text for a chat. There are no boxes, bands or row dividers.
  • Machine level: appears only when a chat lives on another machine (an SSH host or a paired Orca server), or the chats span machines. With everything on this computer, the tree starts at projects. SSH machines get an "SSH" chip.
  • Keyboard: Up and Down move between checkboxes, Left collapses, Right expands, and Space toggles. It is a real role="tree" with leveled tree items.

Before (main): a narrow dialog with bare workspace names.

Before: main

After, all five chats selected:

After: tree, all 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: tree, mixed

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: tree, collapsed

After, light theme:

After: tree, light

After, a 600px-wide window:

After: tree, narrow

Verified in the live run (isolated dev build of 25cefbc5db1 on a second Mac, fake Codex, driven over the Chrome DevTools Protocol):

  • Scene: five chats across two projects, one of them in a child workspace. They were left mid-reply, Orca restarted, and the dialog opened by itself.
  • Counts and states: read from the page (aria-checked): all selected, then mixed after clicking two chats' row text, then collapse keeping "2 of 3" and expand restoring the tree.
  • Light theme and narrow window: render correctly at a real 600px viewport.
  • Isolation: the second Mac's real Codex and Claude config files were unchanged by the run. The only change was one trust entry another session's automation added.

Not verified live:

  • Machine level: the demo was all on one computer. Tests cover SSH hosts, paired-server hosts and several hosts.
  • Keyboard navigation: unit tests only.
  • Platforms: Windows and Linux rendering.

@brennanb2025
brennanb2025 merged commit 4bd4f8c into main Oct 8, 2026
35 checks passed
brennanb2025 added a commit that referenced this pull request Oct 8, 2026
… 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.
brennanb2025 added a commit that referenced this pull request Oct 8, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant