Automations fixes and lane-wide UX/runtime polish#321
Conversation
Ship the automations rework alongside related ADE CLI TUI, desktop chat, PTY, IPC, runtime, and docs updates accumulated on this lane. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (11)
📒 Files selected for processing (95)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
| // Vertical offset of the first selectable roster row in the rendered chat-info | ||
| // pane (header + status + plan + goal occupy the preceding lines). Used only by | ||
| // the mouse-click → row mapper. | ||
| const SUBAGENT_PANE_TABLE_START_LINE = 4; |
There was a problem hiding this comment.
SUBAGENT_PANE_TABLE_START_LINE is defined but never referenced in this file and is not exported. The comment references a mouse-click row mapper that does not exist here. Either export the constant for the TUI consumer or remove it.
| // Vertical offset of the first selectable roster row in the rendered chat-info | |
| // pane (header + status + plan + goal occupy the preceding lines). Used only by | |
| // the mouse-click → row mapper. | |
| const SUBAGENT_PANE_TABLE_START_LINE = 4; | |
| // Vertical offset of the first selectable roster row in the rendered chat-info | |
| // pane (header + status + plan + goal occupy the preceding lines). Used only by | |
| // the mouse-click → row mapper. | |
| export const SUBAGENT_PANE_TABLE_START_LINE = 4; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/shared/chatSubagents.ts
Line: 45-48
Comment:
`SUBAGENT_PANE_TABLE_START_LINE` is defined but never referenced in this file and is not exported. The comment references a mouse-click row mapper that does not exist here. Either export the constant for the TUI consumer or remove it.
```suggestion
// Vertical offset of the first selectable roster row in the rendered chat-info
// pane (header + status + plan + goal occupy the preceding lines). Used only by
// the mouse-click → row mapper.
export const SUBAGENT_PANE_TABLE_START_LINE = 4;
```
How can I resolve this? If you propose a fix, please make it concise.| runtime.webSearchActionsByItemId.clear(); | ||
| runtime.itemTurnIdByItemId.clear(); | ||
| runtime.agentMessageScopeByTurn.clear(); | ||
| runtime.codexAgentIndexByTurn.delete(turnId); |
There was a problem hiding this comment.
Turn-level Codex agent-index maps cleared globally on interruption
runtime.codexAgentIndexByTurn.delete(turnId) correctly removes only the finished turn at normal completion, but the interrupted-turn handler calls runtime.codexAgentIndexByTurn.clear(), removing every turn's index map at once. If parallel Codex collab agents span multiple concurrent turns, an interrupt in one turn erases counter state for all others — subsequent agents restart numbering from #1 and may produce duplicate Agent #N labels.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/main/services/chat/agentChatService.ts
Line: 12929-12932
Comment:
**Turn-level Codex agent-index maps cleared globally on interruption**
`runtime.codexAgentIndexByTurn.delete(turnId)` correctly removes only the finished turn at normal completion, but the interrupted-turn handler calls `runtime.codexAgentIndexByTurn.clear()`, removing every turn's index map at once. If parallel Codex collab agents span multiple concurrent turns, an interrupt in one turn erases counter state for all others — subsequent agents restart numbering from `#1` and may produce duplicate `Agent #N` labels.
How can I resolve this? If you propose a fix, please make it concise.
Summary
Test plan
@copilot please review.
Greptile Summary
This PR delivers a broad platform polish pass: multi-project tab support (per-project Zustand stores, stale-while-revalidate lane/session caches, restored selections on tab switch), subagent drill-in with per-runtime transcript fetching, terminal replay mode for disposed chat-CLI sessions, Codex
codexFastModepropagation through automations, PTY auto-reattach on dead chat-CLI terminals, and a runtime compatibility guard that preserves live work instead of force-shutting mismatched services.appStore.ts,App.tsx): singleton Zustand store replaced by per-project stores with anAppStoreProvidercontext;ProjectTabHostmounts up to 8 project surfaces simultaneously, keeping agent runtimes alive across switches.chatSubagents.ts,agentChatService.ts): new shared snapshot builder,Agent #NCodex labelling, Task-tool input stashing for richeragentTypeenrichment, andgetSubagentTranscriptIPC for drill-in view.TerminalView.tsx): disposed chat-CLI sessions load a flattened ANSI transcript with alt-screen sequences stripped;disposeStaleRuntimesnarrowed to avoid evicting runtimes for other open project tabs.Confidence Score: 4/5
The core chat, mission, and PTY flows are additive on top of an established architecture; the multi-project store refactor has deliberate fallbacks and good test coverage.
The new per-project store model correctly routes preference updates through the root store. Two areas warrant attention before the tab-switching feature sees wide use: disposeStaleRuntimes no longer evicts xterm runtimes for closed project tabs (memory accumulation with heavy cycling), and the fallback cacheKey in sessionListCache reads from the root store, trapping future callers that omit the projectRoot option. Neither causes immediate user-visible breakage on the happy path.
apps/desktop/src/renderer/components/terminals/TerminalView.tsx (stale-runtime eviction gap) and apps/desktop/src/renderer/lib/sessionListCache.ts (root-store fallback in cacheKey).
Important Files Changed
Comments Outside Diff (2)
apps/desktop/src/renderer/lib/sessionListCache.ts, line 24-31 (link)cacheKeyalways callsuseAppStore.getState(), which is hard-wired torootAppStore. When aProjectSurfacefor a non-active project tab callslistSessionsCachedwithout the newoptions.projectRootargument, the key will contain the globally-active project root rather than the tab's own project root — all tabs hitting this path share a single cache bucket.useWorkSessionspassesprojectRootexplicitly so the hot path is safe, but any caller that omits the option will silently get sessions for the wrong project.Prompt To Fix With AI
apps/desktop/src/renderer/components/terminals/TerminalView.tsx, line 547-555 (link)Before this PR,
disposeStaleRuntimestore down any non-live runtime whoseprojectRootdiffered from the active one. The new condition requiresruntime.projectRoot === activeProjectRoot, so runtimes from other project roots are silently skipped. When a tab is pruned frommountedProjectsand itsProjectSurfaceunmounts, the entries in the module-levelruntimeCacheMap are never scheduled for disposal. Replay-mode runtimes withREPLAY_SCROLLBACK_LINES = 100_000can accumulate meaningfully over extended sessions.Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "Automations fixes and lane-wide UX/runti..." | Re-trigger Greptile