Skip to content

fix(ai-vault): make SSH session history host-aware - #7367

Merged
AmethystLiang merged 5 commits into
stablyai:mainfrom
AvichalDwivedi2205:fix/ssh-ai-vault-session-history
Jul 5, 2026
Merged

AmethystLiang merged 5 commits into
stablyai:mainfrom
AvichalDwivedi2205:fix/ssh-ai-vault-session-history

Conversation

@AvichalDwivedi2205

@AvichalDwivedi2205 AvichalDwivedi2205 commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #7164.

Agent Session History is now host-aware for SSH worktrees. The AI Vault session scan can target Local, the active SSH host, or All hosts; SSH worktrees default to their remote host; and Codex resume actions launch against the correct local or SSH execution host.

The remote scan is intentionally Codex-first for this PR. It reads the default remote Codex history directory and Orca-managed remote Codex runtime home, while leaving broader remote scanning for other agents as follow-up work.

Screenshots

Before: SSH worktree session history only scanned local history, so the remote Codex session was missing.

ai-vault-before

After: SSH worktree defaults to the SSH host scope and shows the remote Codex session, with Local / SSH / All host controls available.

ai-vault-after

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

Additional validation:

  • ORCA_E2E_FORWARD_APP_LOGS=1 ORCA_E2E_SSH_DOCKER=1 ORCA_E2E_SSH_DOCKER_IMAGE=orca-e2e-ssh-ai-vault-relay:8dbb1d2f4eb4 pnpm exec playwright test tests/e2e/ssh-ai-vault-session-history.spec.ts --config tests/playwright.config.ts --project electron-headless
  • pnpm test:e2e:ssh-codex-artifacts-repro
  • pnpm test:e2e

Notes on non-green local checks:

  • pnpm test was run and failed in unrelated local renderer test-environment failures where window.localStorage.getItem/removeItem/clear were unavailable. The failing files were PR comments/sidebar tests, not AI Vault.
  • pnpm test:e2e:ssh-codex-artifacts-repro was run and failed an existing Codex artifact-display assertion, unrelated to session history.
  • pnpm test:e2e was run and failed across unrelated existing UI/worktree/onboarding/source-control/terminal specs. The focused SSH AI Vault E2E passed separately.

AI Review Report

The AI review checked that the change stays scoped to #7164 and only touches AI Vault session scanning, host-aware IPC/routing, SSH relay metadata, AI Vault UI controls, resume/drop routing, i18n labels, and targeted tests.

Cross-platform compatibility was reviewed for macOS, Linux, and Windows. The change avoids new shortcuts or platform-specific labels, keeps path handling in the main/remote scanner rather than assuming local filesystem paths, and uses the remote platform when building Codex resume commands. SSH/local compatibility was checked by keeping local scans on the existing scanner path, adding explicit ssh:<target> host scoping, and returning scan issues instead of crashing when an SSH target is disconnected. Agent compatibility was reviewed by keeping remote scanning Codex-specific and not changing non-Codex local session parsing. Performance risk was checked by preserving scoped scans and cache keys so host changes do not reuse stale results. UI quality was checked manually with before/after screenshots and by keeping the host control compact beside the existing session scope controls.

Security Audit

Reviewed IPC and command/path handling touched by this PR. The new host scope is an explicit enum-like value (local, ssh:<target>, all) and disconnected/unknown SSH targets return scan issues rather than falling through to arbitrary local paths. Remote session scanning is limited to known Codex history locations under the remote home and Orca-managed remote runtime home. Resume commands continue to be generated through the existing AI Vault launch path, with remote CODEX_HOME and shell quoting selected from the remote platform. No new dependencies, credential handling, auth flows, network listeners, or secret persistence are added.

Notes

Remote scanning in this PR covers Codex history only. Broader non-Codex remote agent discovery can be added later without expanding this bug fix.

SSH-specific behavior tested with the Docker SSH fixture: create a remote Codex transcript, open an SSH worktree, open Agent Session History, switch Local / SSH / All host scopes, and resume the remote session into the SSH worktree.

X handle: @Avichal2205

@AvichalDwivedi2205
AvichalDwivedi2205 marked this pull request as ready for review July 4, 2026 20:50
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 438f7709-9623-46c0-9e61-ba67f602064f

📥 Commits

Reviewing files that changed from the base of the PR and between fbda84d and d38388f.

📒 Files selected for processing (1)
  • src/main/ssh/ssh-relay-session.ts

📝 Walkthrough

Walkthrough

This PR threads execution-host identity through AI Vault session scanning, remote SSH scanning, IPC host-scope routing, and renderer resume/display flows. Shared AI Vault types now carry host fields, scanners and parsers preserve host metadata, and remote scans are sourced from SSH filesystem providers. The UI adds host-scope selection, refresh logic is scoped by host, and resume/drag/drop checks now compare session and target execution hosts. An e2e test covers SSH session history filtering and resume behavior.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: making AI Vault session history host-aware for SSH worktrees.
Description check ✅ Passed All required sections are present, including summary, screenshots, testing, AI review, security audit, and notes.
Linked Issues check ✅ Passed The PR matches #7164 by adding local/SSH/all host scoping, defaulting SSH worktrees to remote history, and routing Codex resume to the remote host.
Out of Scope Changes check ✅ Passed The added UI, scanner, resume, and test changes stay focused on host-aware AI Vault session history and related Codex remote support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/ipc/ai-vault.ts (1)

42-77: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

In-flight scan tracking can be clobbered by concurrent different-scope requests.

The .finally() callback unconditionally nulls the module-level inflightKey/inflightList regardless of whether they still refer to this request. Now that the cache/in-flight key includes executionHostScope, concurrent requests for different scopes (e.g. rapid Local/SSH/All switching in the UI) are expected. If request A settles while request B (a different key) is still in-flight, A's finally wipes B's tracking, so a subsequent request matching B's key won't dedupe against the still-running B and triggers a redundant duplicate transcript scan.

🔧 Proposed fix: only clear tracking if it still matches this request's key
   inflightList = scanAiVaultSessionsByHostScope(args, executionHostScope)
     .then((result) => {
       cachedList = {
         key,
         result,
         expiresAt: Date.now() + AI_VAULT_CACHE_TTL_MS
       }
       return result
     })
     .finally(() => {
-      inflightKey = null
-      inflightList = null
+      if (inflightKey === key) {
+        inflightKey = null
+        inflightList = null
+      }
     })
🧹 Nitpick comments (5)
src/renderer/src/lib/ai-vault-resume-target.ts (1)

103-127: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate worktree/folder-resolution logic vs. the existing TargetStatus twins.

getAiVaultResumeWorkspaceExecutionHostId/getAiVaultResumeFolderExecutionHostId re-implement the same worktree lookup (Object.values(state.worktreesByRepo ?? {}).flat().find(...)) and folder-group/connection resolution order already present in getAiVaultResumeWorkspaceTargetStatus/getAiVaultResumeFolderTargetStatus. Keeping two parallel implementations risks them drifting out of sync (e.g., if the worktree/folder match criteria change in one but not the other).

Consider extracting a shared findWorktreeById(state, worktreeId) helper (and reusing the same host/connection resolution order) so both status and host-id resolution stay consistent.

Also applies to: 180-202

src/renderer/src/lib/ai-vault-resume-target.test.ts (1)

72-98: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the WSL exception when both host ids are known.

The new tests cover exact-match and mismatch cases for canResumeAiVaultSessionOnTarget when both sessionExecutionHostId/targetExecutionHostId are supplied, but there's no test for the WSL carve-out in that same branch (Lines 60-64 of ai-vault-resume-target.ts): a local-tagged, WSL-stored session with an explicit targetExecutionHostId set to an SSH host that doesn't match sessionExecutionHostId. This is exactly the newly introduced non-obvious branch and warrants direct coverage.

✅ Suggested additional test
it('allows WSL-stored local sessions on any SSH target even with explicit host ids', () => {
  expect(
    canResumeAiVaultSessionOnTarget({
      sessionFilePath: wslSessionFile,
      sessionExecutionHostId: 'local',
      targetStatus: 'ssh',
      targetExecutionHostId: 'ssh:dev-box'
    })
  ).toBe(true)
})
src/renderer/src/lib/ai-vault-resume-command.ts (1)

22-28: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add unit test coverage for the new bypass branch.

This is a significant behavioral fork (skips the entire getAiVaultResumePlatform/buildAgentResumeStartupPlan pipeline) but no test changes are included for ai-vault-resume-command.ts in this diff. Given the branch's conditions are somewhat intricate (executionHostId truthy + non-local + resumeCommand truthy + no/blank override), direct unit tests would guard against regressions.

Also applies to: 55-78

tests/e2e/ssh-ai-vault-session-history.spec.ts (1)

96-98: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Fragile positional locator for the SSH host menu item.

orcaPage.getByRole('menuitemradio').nth(1) selects by index rather than by an accessible name, unlike the adjacent Local/All hosts selections (Lines 89, 93) which match by text. If the host-scope menu's item order ever changes (e.g., a new scope inserted), this click silently targets the wrong item and the test would fail with a confusing assertion mismatch rather than a clear locator error.

🔧 Suggested more robust locator
-      await hostButton.click()
-      await orcaPage.getByRole('menuitemradio').nth(1).click()
+      await hostButton.click()
+      await orcaPage
+        .getByRole('menuitemradio')
+        .filter({ hasNotText: /Local|All hosts/ })
+        .click()
src/renderer/src/components/right-sidebar/ai-vault-host-scope.ts (1)

32-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add a short "why" comment for the reset-vs-preserve host-scope logic.

The effect encodes a non-obvious rule: a manually chosen scope (e.g. "All") survives incidental rerenders, but resets to the new default once it becomes invalid for the active host. As per coding guidelines, **/*.{ts,tsx,js,jsx}: "When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does."

📝 Proposed comment
   useEffect(() => {
+    // Why: preserve an explicit user choice (e.g. "All") across incidental
+    // rerenders, but reset to the new default once that choice no longer
+    // applies to the active worktree's host.
     const allowedScopes = new Set<ExecutionHostScope>([

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: dd246e54-ade4-4774-bf2e-42fe32de22be

📥 Commits

Reviewing files that changed from the base of the PR and between ac8d365 and ea35b06.

📒 Files selected for processing (32)
  • src/main/ai-vault/remote-codex-session-scanner.test.ts
  • src/main/ai-vault/remote-codex-session-scanner.ts
  • src/main/ai-vault/session-scanner-accumulator.ts
  • src/main/ai-vault/session-scanner-codex-parser.ts
  • src/main/ai-vault/session-scanner-types.ts
  • src/main/ai-vault/session-scanner.ts
  • src/main/ipc/ai-vault.test.ts
  • src/main/ipc/ai-vault.ts
  • src/main/ipc/ssh.ts
  • src/main/ssh/ssh-relay-session.ts
  • src/renderer/src/components/right-sidebar/AiVaultPanel.tsx
  • src/renderer/src/components/right-sidebar/AiVaultPanelControls.tsx
  • src/renderer/src/components/right-sidebar/AiVaultPanelHeader.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionRow.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-host-scope.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-host-scope.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-launch-actions.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-resume.ts
  • src/renderer/src/components/tab-group/AiVaultSessionDropLayer.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/ai-vault-resume-command.ts
  • src/renderer/src/lib/ai-vault-resume-target.test.ts
  • src/renderer/src/lib/ai-vault-resume-target.ts
  • src/renderer/src/lib/ai-vault-session-drag.ts
  • src/shared/ai-vault-types.ts
  • tests/e2e/ssh-ai-vault-session-history.spec.ts

Replace the Codex-only remote SSH session history scanner with a
unified scanner supporting all registered agents. This ensures remote
transcripts for Claude, Gemini, Devin, Droid, and others are scanned
and listed alongside local history.

- Propagate host metadata (host ID and platform) to scanned sessions
- Scope remote actions by host, disabling local OS path actions on
  remote session logs
- Resolve ambiguous project/worktree matching for overlapping paths
  by verifying matching host setup IDs
- Update tests and E2E specs to validate multi-agent remote scanning
@AmethystLiang
AmethystLiang force-pushed the fix/ssh-ai-vault-session-history branch from 61003f3 to fbda84d Compare July 5, 2026 05:50

@AmethystLiang AmethystLiang 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.

Approved. I reviewed the latest stack of commits, including the maintainer follow-up that broadens the original SSH AI Vault fix.

What changed across the PR:

  • The original commits make Agent Session History host-aware: local, active SSH host, and all-host scopes are routed through IPC, SSH worktrees default to their remote host history, and resume/drop actions are gated by the session/workspace execution host.
  • SSH relay sessions now expose the remote home and platform needed for remote history scanning and platform-correct resume commands.
  • The maintainer commit generalizes the remote scanner from Codex-only to all registered AI Vault file-backed agents by splitting remote scanner sources/types/index handling and adding remote content parsers for Claude, Gemini, Copilot, Cursor, Hermes, Devin, Droid, Pi/OpenClaw, and Codex.
  • Remote sessions now carry host metadata, local-only path actions are hidden for remote log paths, and project/worktree attribution is host-aware so overlapping local/SSH paths do not steal each other's sessions.
  • Review fixes cover cache/in-flight host-scope behavior and stale renderer scan results when switching scopes mid-scan.

Validation I ran locally:

  • Targeted scanner, IPC, refresh, resume, target/worktree/project/filter/original-pane/drag Vitest suites.
  • pnpm run typecheck
  • pnpm run lint (passed with unrelated existing warnings)
  • localization catalog and coverage checks
  • git diff --check

Looks good to land once the current merge conflict with main is resolved and CI is green.

…ion-history

# Conflicts:
#	src/renderer/src/i18n/locales/es.json
#	src/renderer/src/i18n/locales/zh.json
@AmethystLiang
AmethystLiang merged commit e94c83d into stablyai:main Jul 5, 2026
1 check passed

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

🧹 Nitpick comments (3)
src/main/ai-vault/session-scanner-devin-parser.ts (1)

21-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate ParserSessionOptions type across 5 parser files.

The exact same type (executionHostId?: ExecutionHostId; executionHostPlatform?: NodeJS.Platform | null) is redeclared identically in session-scanner-devin-parser.ts, session-scanner-droid-parser.ts, session-scanner-graph-parsers.ts, session-scanner-primary-parsers.ts, and session-scanner-secondary-parsers.ts. This shape also mirrors the inline options type on finalizeSession and RemoteParserOptions. Consider hoisting a single shared type (e.g. into session-scanner-types.ts) and importing it everywhere to avoid future drift between these definitions.

♻️ Proposed consolidation
-type ParserSessionOptions = {
-  executionHostId?: ExecutionHostId
-  executionHostPlatform?: NodeJS.Platform | null
-}
+import type { ParserSessionOptions } from './session-scanner-types'

(repeat the import in the other 4 files and remove their local declarations; export ParserSessionOptions from session-scanner-types.ts once)

src/main/ai-vault/remote-session-scanner-sources.ts (1)

219-221: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Unnecessary indirection through normalizePiSessionsDir.

remotePiSessionsSegments() feeds a hardcoded literal into normalizePiSessionsDir just to split it back into segments — equivalent to writing ['.pi', 'agent', 'sessions'] directly. normalizePiSessionsDir exists to normalize a user-configurable raw path (per its usage elsewhere), so routing a fixed constant through it here adds confusion without benefit.

♻️ Proposed simplification
 function remotePiSessionsSegments(): string[] {
-  return normalizePiSessionsDir('/.pi/agent/sessions').split('/').filter(Boolean)
+  return ['.pi', 'agent', 'sessions']
 }
src/main/ai-vault/remote-session-scanner.ts (1)

99-129: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Consider parallelizing subdirectory walks for latency.

Each subdirectory recursion (walkRemoteSessionFiles) is awaited sequentially inside the for loop over entries. Since every readDir call is a network round trip over the SSH relay, directory trees with many session-source subfolders (e.g. .cursor/projects/**, .claude/projects/**) will be walked one directory at a time, compounding latency. Only the outer per-source fan-out uses mapRemoteScanConcurrently.

Consider batching subdirectory recursion through mapRemoteScanConcurrently (or similar) to bound round trips per depth level rather than per whole subtree.

♻️ Proposed parallelization of subdirectory recursion
-  const extensions = new Set(source.extensions)
-  const files: string[] = []
-  for (const entry of entries) {
-    const fullPath = joinRemotePath(hostPlatform, dirPath, entry.name)
-    if (entry.isDirectory && !entry.isSymlink) {
-      files.push(...(await walkRemoteSessionFiles(source, provider, hostPlatform, fullPath)))
-      continue
-    }
-    if (
-      !entry.isSymlink &&
-      extensions.has(extname(entry.name).toLowerCase()) &&
-      (source.filePredicate?.(fullPath) ?? true)
-    ) {
-      files.push(fullPath)
-    }
-  }
-  return files
+  const extensions = new Set(source.extensions)
+  const files: string[] = []
+  const subdirPaths: string[] = []
+  for (const entry of entries) {
+    const fullPath = joinRemotePath(hostPlatform, dirPath, entry.name)
+    if (entry.isDirectory && !entry.isSymlink) {
+      subdirPaths.push(fullPath)
+      continue
+    }
+    if (
+      !entry.isSymlink &&
+      extensions.has(extname(entry.name).toLowerCase()) &&
+      (source.filePredicate?.(fullPath) ?? true)
+    ) {
+      files.push(fullPath)
+    }
+  }
+  const nested = await mapRemoteScanConcurrently(subdirPaths, (subdirPath) =>
+    walkRemoteSessionFiles(source, provider, hostPlatform, subdirPath)
+  )
+  files.push(...nested.flat())
+  return files

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cb0e1f7c-d66e-414d-8536-1c18da5f88bb

📥 Commits

Reviewing files that changed from the base of the PR and between 61003f3dec9118d9805fe31b58d474e252c597f4 and fbda84d.

📒 Files selected for processing (47)
  • src/main/ai-vault/remote-session-scanner-codex-index.ts
  • src/main/ai-vault/remote-session-scanner-sources.ts
  • src/main/ai-vault/remote-session-scanner-types.ts
  • src/main/ai-vault/remote-session-scanner.test.ts
  • src/main/ai-vault/remote-session-scanner.ts
  • src/main/ai-vault/session-scanner-accumulator.ts
  • src/main/ai-vault/session-scanner-agent-parser.ts
  • src/main/ai-vault/session-scanner-codex-parser.ts
  • src/main/ai-vault/session-scanner-devin-parser.ts
  • src/main/ai-vault/session-scanner-droid-parser.ts
  • src/main/ai-vault/session-scanner-graph-parsers.ts
  • src/main/ai-vault/session-scanner-primary-parsers.ts
  • src/main/ai-vault/session-scanner-secondary-parsers.ts
  • src/main/ipc/ai-vault.test.ts
  • src/main/ipc/ai-vault.ts
  • src/main/ipc/ssh.ts
  • src/renderer/src/components/right-sidebar/AiVaultPanel.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionActionMenuItems.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionDetails.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionRow.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionVirtualList.tsx
  • src/renderer/src/components/right-sidebar/SessionRowTrailingActions.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-host-scope.ts
  • src/renderer/src/components/right-sidebar/ai-vault-original-pane.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-display.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-filters.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-launch-actions.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-path-actions.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-path-actions.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-projects.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-projects.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-worktree.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-worktree.ts
  • src/renderer/src/components/tab-group/AiVaultSessionDropLayer.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • 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-resume-target.test.ts
  • src/renderer/src/lib/ai-vault-resume-target.ts
  • src/shared/ai-vault-types.ts
  • tests/e2e/ssh-ai-vault-session-history.spec.ts
✅ Files skipped from review due to trivial changes (7)
  • src/renderer/src/components/right-sidebar/ai-vault-session-path-actions.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-filters.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-display.test.ts
  • src/main/ai-vault/session-scanner-agent-parser.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (16)
  • src/renderer/src/components/right-sidebar/ai-vault-original-pane.test.ts
  • src/main/ipc/ssh.ts
  • src/renderer/src/components/right-sidebar/ai-vault-host-scope.ts
  • src/main/ai-vault/session-scanner-accumulator.ts
  • src/renderer/src/lib/ai-vault-resume-target.test.ts
  • src/renderer/src/components/right-sidebar/ai-vault-session-projects.test.ts
  • src/renderer/src/lib/ai-vault-resume-command.ts
  • src/shared/ai-vault-types.ts
  • src/renderer/src/components/right-sidebar/AiVaultPanel.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-session-launch-actions.ts
  • src/main/ipc/ai-vault.test.ts
  • src/main/ai-vault/session-scanner-codex-parser.ts
  • src/renderer/src/components/tab-group/AiVaultSessionDropLayer.tsx
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.ts
  • tests/e2e/ssh-ai-vault-session-history.spec.ts
  • src/main/ipc/ai-vault.ts

@AvichalDwivedi2205
AvichalDwivedi2205 deleted the fix/ssh-ai-vault-session-history branch July 5, 2026 12:19
brennanb2025 added a commit that referenced this pull request Jul 10, 2026
…ts-to-mobile

Reconciles the mobile aiVault.listSessions RPC with main's runtime-host
scanning (#7631), OMP sessions (#7618/#7628), host-aware attribution
(#7367), and zero-turn recovery (#7889):

- One aiVault.listSessions serves mobile (no executionHostId), the desktop
  parent, and web clients: bounded params kept, results served from the
  shared host-local cache and restamped per-caller at the RPC edge.
- Desktop's runtime-host RPC client caps scopePaths to the shared bound so
  large desktops degrade gracefully instead of failing validation.
- Desktop IPC local scope delegates to the shared cache module (single
  cache with the RPC path); ssh/runtime/all merges keep main's outer cache.
- Main's zero-turn empty-session semantics and ExecutionHostId-typed
  project attribution replayed onto the /shared lifted filter core.
- Mobile resume forwards session.filePath so OMP resumes by absolute
  transcript path (desktop parity).

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* fix(ai-vault): scan sessions by execution host

* fix(ai-vault): route history resume by host

* test(e2e): cover SSH AI Vault history

* Generalize remote session scanning for all AI Vault agents

Replace the Codex-only remote SSH session history scanner with a
unified scanner supporting all registered agents. This ensures remote
transcripts for Claude, Gemini, Devin, Droid, and others are scanned
and listed alongside local history.

- Propagate host metadata (host ID and platform) to scanned sessions
- Scope remote actions by host, disabling local OS path actions on
  remote session logs
- Resolve ambiguous project/worktree matching for overlapping paths
  by verifying matching host setup IDs
- Update tests and E2E specs to validate multi-agent remote scanning

---------

Co-authored-by: Jinjing <[email protected]>
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 should be host-aware for SSH worktrees

2 participants