Repository navigation
Apply agent defaults to AI Vault resume - #6299
Conversation
Co-authored-by: Orca <[email protected]>
📝 WalkthroughWalkthroughThe PR adds a resume startup object, passes it through drag payloads and tab launch flows, and updates the right-sidebar resume flow to build and use startup data instead of only a command string. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/renderer/src/lib/ai-vault-session-drag.ts (1)
15-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a short
Why:comment for the extra payload fields.Carrying both the rendered command and durable startup metadata is not obvious from the type alone. A brief note here would make it clearer that drag/drop resume must preserve planned env/default args, not just a shell string.
Suggested comment
export type AiVaultSessionDragPayload = { agent: AiVaultAgent sessionId: string title: string command: string + // Why: drag/drop resume must carry the planned startup metadata too, so the + // resumed tab keeps default env/args and a durable launchConfig. env?: Record<string, string> launchConfig?: SleepingAgentLaunchConfig }Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6680530a-2a45-47b0-bc62-433ea5a9fd31
📒 Files selected for processing (11)
src/renderer/src/components/right-sidebar/AiVaultPanel.tsxsrc/renderer/src/components/right-sidebar/AiVaultSessionRow.tsxsrc/renderer/src/components/right-sidebar/AiVaultSessionVirtualList.tsxsrc/renderer/src/components/tab-group/AiVaultSessionDropLayer.tsxsrc/renderer/src/lib/ai-vault-resume-command.test.tssrc/renderer/src/lib/ai-vault-resume-command.tssrc/renderer/src/lib/ai-vault-session-drag.test.tssrc/renderer/src/lib/ai-vault-session-drag.tssrc/renderer/src/lib/launch-ai-vault-session.test.tssrc/renderer/src/lib/launch-ai-vault-session.tssrc/shared/ai-vault-types.ts
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Summary
Fixes #6281
Screenshots
No visual change.
Testing
Note:
pnpm run typecheck:webprints the existing Node engine warning because this shell is on Node v26.0.0 while the repo wants Node 24, but the command passes.AI Review Report
Addressed CodeRabbit feedback by subscribing the AI Vault panel to settings changes before precomputing drag resume startup metadata, rejecting array-shaped drag env records, and adding the requested why comment.
Security Audit
No new external inputs or privileges. Drag payload parsing now rejects array-shaped env records so only object-shaped
Record<string, string>metadata crosses the drag/drop boundary.Notes
This is scoped to Agent Session History / AI Vault resume behavior.
Electron E2E Validation
Electron e2e resume defaults 6299rendered.Resume Claude sessionaction and captured the queued startup payload: command included--dangerously-skip-permissions --effort maxbefore--resume, env includedANTHROPIC_BASE_URL, andlaunchConfigwas present.Copy Resume Commandmenu item and verified clipboard text matched the effective resume command with configured args./tmp/orca-6299-ai-vault-e2e.pngfor validation evidence; not committed.