Repository navigation
feat(native-chat): show each chat's resume as it happens, and start more at once - #26361
Conversation
…ore at once Resuming interrupted chats sent one request for the whole batch, and the host answered only after every agent had replied, so "Resuming 21 chats" stayed up until the slowest chat answered and the dialog could only say "Resuming…" for every row. The host also started 3 agents at a time. The desktop app now sends one request per chat, so each chat's result lands as soon as it has one. The host keeps one start limit across all of those requests, sized to the machine's cores instead of a fixed 3. The status bar reads "Resuming chats 9/21". Reopening the dialog mid-run shows a gray spinner where each resuming chat's checkbox was, with its step (waiting to start, starting, waiting for a reply) and time in the tooltip, then a check or the failure row when it settles. A line above the list counts where the chats stand, with filters for In progress, Resumed and Need you.
…hats-live-progress
Resolve resume dialog and locale conflicts while preserving the landed machine/project/workspace tree and per-chat progress in the checkbox column. Keep retained finished summaries, current failure actions, and group selection of current eligible chats; union translations with main's wording.
Review and QA statusThe problem. After Orca restarted with many interrupted chats, the status bar said "Resuming 21 chats" for up to a minute and clicking it showed nothing per chat. Two causes: the host started only 3 agents at a time, and it answered the app once, after the slowest chat. What changes for you.
What review changed. The first version sent one request per chat. Review proved that repeated the host's whole bookkeeping for every chat: 21 chats meant 84 saves of the recovery file instead of 4, and under slow disk reads some selected chats were silently skipped. It also kept a second copy of each chat's result that went stale (a dismissed failure stayed under "Need you"; the toast and the dialog disagreed). It now sends one request per resume, and the host publishes each chat's progress, in memory only, on the status updates it already sends. Later rounds fixed:
Live testing then showed that after a run finished with the dialog closed you saw only the failures, never the summary; Brennan chose to keep the summary, and that is fixed too. All fixes are covered by tests: 28 files, 292 tests, typecheck, and the repo's static checks. A final pre-release review (network, crashes and retries, performance, cross-platform, security, compatibility including the phone app) found nothing blocking. Deferred (not blocking):
Verified.
Not verified.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (50)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughThe host now publishes per-session restart-resume phases, reports skipped sessions, and shares a start limit across resume requests. The renderer tracks run progress from status-feed updates and displays per-chat status, summary counts, filters, and completed-run views. Resume actions now send explicit session IDs. Tests and translations were updated for the new progress and outcome flows. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to This change adds per-chat progress and summaries for resuming interrupted chats, and lets the host start more resumes at once. No concrete defect was identified, so the change appears ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 45.07% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 71 functions across 44 files. (6 skipped: 6 unsupported.)
✨ 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 |
Fits the paired-server resume work onto #26361's live per-chat resume progress: each machine keeps its own resume run (main's run model, now per machine), the dialog's run panel and the status bar's done/total count sum across machines, main's offered-chat watch replaces the PR's copy, and main's target-based chat opening carries the PR's pairing fence.
ELI5
When Orca restarts, it offers to resume the chats that were working. Until now it started only three agents at a time and said nothing until every chat had answered, so you saw "Resuming 21 chats" for a long time with no idea which ones were done. Now more agents start at once, the status bar counts up ("Resuming chats 9/21"), and clicking it opens the dialog showing where every chat stands.
What Changed
Before
After
Mechanism
agentSession.restartContinuefor the whole selection, exactly as before, and the host still reserves, checks and settles the chats as one action.restartResume.phase:queued(waiting for a start slot),starting, thencontinued,refusedorunconfirmed, orskippedfor a chat the host left out. It exists only while the action runs and is never saved; the host clears it when the action returns, and it is dropped if the app loses contact with the host. The reply also lists the skipped chats, in case a status update was missed.StructuredAgentSessionResumeAdmission), sized toos.availableParallelism(). A chat holds its slot only until its agent takes the message.Why
How this compares with the common pattern for recovering agent sessions
Linked Issue
N/A (maintainer change; no issue)
Visual Proof
Before: status bar during a resume (no per-chat information anywhere):
After — all taken on commit
26484ecd928(this PR's head) in the real app, run hidden on macOS, with 8 chats interrupted by a real quit and relaunch. Only the agent was replaced by a test stand-in (5 quick chats, 1 slow, 1 that refuses, 1 that never confirms); everything else is the real app. The rawfolder:…heading is the test's folder workspace, not part of this change.Status bar while resuming:
The offer after the relaunch:
Dialog reopened mid-run from the status bar — a spinner where the slow chat's checkbox is, checks for the resumed ones, failure icons for the two that need you:
Hovering a chat's spinner says where it is ("Starting · 5s"):
The run finished while the dialog was closed; clicking the status bar opens the summary — "Resumed 6 of 8 chats", the two that need you keep their guidance, Retry, Open chat and dismiss:
After that summary is closed, the status bar opens the usual list of chats still needing you:
Testing
vitest: every resume test, host and app side (28 files, 292 tests). New tests cover:pnpm tc:node,pnpm tc:webandorca-ci-checkspass, except one oxlintmax-lineserror intests/e2e/cross-version-wire/structured-agent-session-surface-manifest.ts. That error is already on main; this PR doesn't touch the file.Review probes ran the real host, recovery file, status feed and dialog together for a 21-chat resume with mixed results.
Live app check (macOS, hidden window, commit
26484ecd928): real quit/relaunch with 8 interrupted chats, agent replaced by a test stand-in. Passed: the offer; the status bar only counting up (0/8 → 6/8 → 7/8 → done); the mid-run dialog (spinner in the checkbox slot, counts, filters); the hover and keyboard-focus tooltip; closing and reopening mid-run; the "Resumed 6 of 8" summary from the status bar after the run finished with the dialog closed; and the usual list after that summary was closed. An earlier build of this PR also passed dismissing a failure and retry showing only the new result.Not verified live: clicking the toast's Show (the toast had closed before the check reached it; unit tests cover it), Windows and Linux (the Windows attempt could not create interrupted chats over the remote connection), real Claude/Codex agents, and a speed measurement with real agents.
I manually tested these changes locally (hidden app with a test stand-in agent; see above)
Automated tests added/updated
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
os.availableParallelism()exists on every supported platform. On a 2-core machine the limit is 2 (it was 3).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)