Skip to content

Add OMP sessions to AI Vault#7255

Open
gatsby74 wants to merge 2 commits into
stablyai:mainfrom
gatsby74:feat/ai-vault-omp-sessions
Open

Add OMP sessions to AI Vault#7255
gatsby74 wants to merge 2 commits into
stablyai:mainfrom
gatsby74:feat/ai-vault-omp-sessions

Conversation

@gatsby74

@gatsby74 gatsby74 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds OMP to the AI Vault/Agents session catalog so historical .omp/agent/sessions/**/*.jsonl transcripts can be discovered from the right-sidebar session browser.
  • Parses OMP JSONL/message-graph records through the same session scanner path used for Pi/OpenCode-style transcripts, including WSL home roots and per-agent scan limits.
  • Generates OMP resume commands with omp --resume <absolute-jsonl-path> because OMP's CLI rejects Orca's internal JSON session ids for these records.
  • Fixes the Agents session row layout so long worktree/repo chips truncate inside the pill instead of widening the whole right sidebar.

Screenshot

image

Verification

Run with Node 24.18.0 via fnm exec and a sanitized test environment that clears live Orca hook vars from WSLENV/SSH_ASKPASS:

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build

Targeted checks also passed:

  • pnpm exec vitest run --config config/vitest.config.ts src/main/ai-vault/session-scanner.test.ts src/main/ai-vault/session-scanner-codex-workers.test.ts src/main/ai-vault/session-scanner-opencode-sqlite-coexistence.test.ts src/shared/ai-vault-resume-command.test.ts
  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/right-sidebar/ai-vault-session-display.test.ts src/renderer/src/components/right-sidebar/ai-vault-session-projects.test.ts src/renderer/src/components/right-sidebar/ai-vault-session-worktree.test.ts

AI-agent review summary

  • Cross-platform: OMP discovery follows existing local/WSL root handling; resume quoting goes through the existing platform-aware shell command builder.
  • SSH/remote: historical scanner changes are source-directory driven and do not assume a local-only terminal pane; the right-sidebar layout fix is renderer-only.
  • Git provider compatibility: no GitHub-specific source-control behavior added.
  • Performance: discovery reuses the existing per-agent limit and sorted-source scan path; no broad unbounded traversal beyond the explicit OMP session roots.
  • UI quality: row chips now remain content-sized and shrink-safe, preventing horizontal sidebar overflow on long repo/worktree labels.
  • Security: no secrets or user transcript contents are embedded; the screenshot uses sanitized mock data and was not committed.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds "omp" support to AI Vault session handling across shared types, session directory normalization, discovery, parsing, and scanner tests. It also updates resume-command generation so omp resumes use resumeFilePath. Separately, it adjusts sidebar overflow styling and adds failedUnnestWorkspace locale entries in five languages, while removing two SSH label strings from en.json.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding OMP sessions to AI Vault.
Description check ✅ Passed It covers summary, screenshots, testing, AI review, and security audit; only the Notes section is missing.

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: 1

🧹 Nitpick comments (2)
src/shared/ai-vault-resume-command.test.ts (1)

43-57: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider covering the omp fallback path.

Only the "resumeFilePath provided" case is tested for omp. A test for resumeFilePath omitted/empty (falling back to sessionId) would close the coverage gap for the resumeTarget branch in buildAiVaultResumeCommand.

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

73-80: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider a short comment on why resumeFilePath is threaded through.

The reasoning (OMP's CLI resumes via an explicit .jsonl path rather than Orca's internal session ID) isn't evident from this function alone.

📝 Proposed comment
     resumeCommand: buildAiVaultResumeCommand({
       agent: accumulator.agent,
       sessionId,
+      // Why: omp's CLI resumes via an explicit .jsonl path, not Orca's
+      // internal session id; other agents ignore this field.
       resumeFilePath: accumulator.filePath,
       cwd: accumulator.cwd,
       platform,
       codexHome: options.codexHome
     })
As per coding guidelines, "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."

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9503ac87-7a17-4220-bd58-312157e6df6f

📥 Commits

Reviewing files that changed from the base of the PR and between 1403467 and 5086acd.

📒 Files selected for processing (17)
  • src/main/ai-vault/session-scanner-accumulator.ts
  • src/main/ai-vault/session-scanner-agent-parser.ts
  • src/main/ai-vault/session-scanner-codex-workers.test.ts
  • src/main/ai-vault/session-scanner-graph-parsers.ts
  • src/main/ai-vault/session-scanner-opencode-sqlite-coexistence.test.ts
  • src/main/ai-vault/session-scanner-source-discovery.ts
  • src/main/ai-vault/session-scanner-types.ts
  • src/main/ai-vault/session-scanner.test.ts
  • src/renderer/src/components/right-sidebar/AiVaultSessionRow.tsx
  • src/renderer/src/components/right-sidebar/AiVaultSessionVirtualList.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/shared/ai-vault-resume-command.test.ts
  • src/shared/ai-vault-types.ts

Comment thread src/main/ai-vault/session-scanner-source-discovery.ts Outdated
@gatsby74

gatsby74 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Fixed CodeRabbit's OMP root normalization note in 3f72448. OMP now uses the shared agent-session root normalizer with '.omp', so OMP_CODING_AGENT_DIR=/path/to/.omp expands to /path/to/.omp/agent/sessions. Added regression coverage in session-scanner-values.test.ts and reran lint, typecheck, and targeted scanner tests.

@gatsby74

gatsby74 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

1 participant