Skip to content

Apply agent defaults to AI Vault resume - #6299

Merged
Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/bug-agent-session-history-resume-ignores-configu
Jun 25, 2026
Merged

Jinwoo-H merged 2 commits into
mainfrom
Jinwoo-H/bug-agent-session-history-resume-ignores-configu

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Route resumable AI Vault session history launches through the normal agent resume startup planner
  • Carry configured default args/env plus durable launchConfig into click and drag/drop resume
  • Preserve existing cwd, Codex home, Windows, and WSL command wrapping with fallback behavior for legacy AI Vault agents

Fixes #6281

Screenshots

No visual change.

Testing

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/launch-ai-vault-session.test.ts src/renderer/src/lib/ai-vault-resume-command.test.ts src/renderer/src/lib/ai-vault-session-drag.test.ts src/main/ai-vault/session-scanner.test.ts
  • pnpm run typecheck:web
  • git diff --check

Note: pnpm run typecheck:web prints 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

  • Launched this branch as a separate Orca dev app over CDP with an isolated user-data directory.
  • Added a disposable temp git repo and disposable Claude transcript, opened the visible Agent Session History panel, switched to All scope, and confirmed the row Electron e2e resume defaults 6299 rendered.
  • Clicked the visible row's Resume Claude session action and captured the queued startup payload: command included --dangerously-skip-permissions --effort max before --resume, env included ANTHROPIC_BASE_URL, and launchConfig was present.
  • Clicked the visible Copy Resume Command menu item and verified clipboard text matched the effective resume command with configured args.
  • Screenshot captured locally at /tmp/orca-6299-ai-vault-e2e.png for validation evidence; not committed.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The PR description matches the template well, but the AI Review Report does not explicitly confirm cross-platform checks for macOS, Linux, and Windows. Add an explicit AI Review Report note confirming review of macOS, Linux, and Windows behavior, including shortcuts, labels, paths, shell wrapping, and Electron-specific differences.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and clearly describes the main change: applying agent defaults to AI Vault resume.
Linked Issues check ✅ Passed The changes implement the linked issue’s resume-startup flow, including default args/env, durable launchConfig, and matching resume command behavior.
Out of Scope Changes check ✅ Passed The changes appear scoped to AI Vault resume behavior, supporting tests, and related drag/drop plumbing with no clear unrelated additions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@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: 2

🧹 Nitpick comments (1)
src/renderer/src/lib/ai-vault-session-drag.ts (1)

15-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between cfb7de4 and 82ed2a6.

📒 Files selected for processing (11)
  • src/renderer/src/components/right-sidebar/AiVaultPanel.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionRow.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionVirtualList.tsx
  • src/renderer/src/components/tab-group/AiVaultSessionDropLayer.tsx
  • src/renderer/src/lib/ai-vault-resume-command.test.ts
  • src/renderer/src/lib/ai-vault-resume-command.ts
  • src/renderer/src/lib/ai-vault-session-drag.test.ts
  • src/renderer/src/lib/ai-vault-session-drag.ts
  • src/renderer/src/lib/launch-ai-vault-session.test.ts
  • src/renderer/src/lib/launch-ai-vault-session.ts
  • src/shared/ai-vault-types.ts

@Jinwoo-H
Jinwoo-H merged commit 19b0174 into main Jun 25, 2026
1 check passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/bug-agent-session-history-resume-ignores-configu branch June 25, 2026 00:42
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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.

[Bug]: Agent Session History Resume Ignores Configured Agent Profile

1 participant