Repository navigation
feat(devin): managed hooks, sleeping resume, AI Vault - #5380
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request integrates the Devin CLI as a fully supported agent in Orca. It registers 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 4
🧹 Nitpick comments (1)
src/main/devin/hook-settings.ts (1)
30-31: ⚡ Quick winUse Node path utilities for remote path composition.
Line 31 hardcodes
/in a constructed path. Please switch this topath.posix.join(...)and mirror the same approach for the remote script path construction insrc/main/devin/hook-service.ts(Line 195).As per coding guidelines, "Use
path.joinor Electron/Node path utilities for file paths — never assume/or\for cross-platform compatibility".♻️ Suggested patch
-import { join } from 'path' +import { join, posix as pathPosix } from 'path' ... export function getDevinRemoteConfigPath(remoteHome: string): string { - return `${remoteHome.replace(/\/$/, '')}/.config/devin/config.json` + return pathPosix.join(remoteHome, '.config', 'devin', 'config.json') }Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 85bad9e0-2f7b-48e2-ae77-162a6a03d43f
📥 Commits
Reviewing files that changed from the base of the PR and between 98806ff and 98f8fae7425ee0e208bc1e3fc99393b05a7e6df1.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (37)
config/tsconfig.cli.jsonpackage.jsonplans/001-add-devin-cli-agent.mdplans/002-devin-managed-agent-hooks.mdplans/003-devin-sleeping-agent-resume.mdplans/004-devin-ui-polish-and-completion.mdplans/005-devin-ai-vault-spike.mdplans/README.mdsrc/main/agent-hooks/managed-agent-hook-controls.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/ai-vault/session-scanner-devin-parser.test.tssrc/main/ai-vault/session-scanner-devin-parser.tssrc/main/ai-vault/session-scanner-types.tssrc/main/ai-vault/session-scanner.test.tssrc/main/ai-vault/session-scanner.tssrc/main/devin/hook-config-json.test.tssrc/main/devin/hook-config-json.tssrc/main/devin/hook-service.test.tssrc/main/devin/hook-service.tssrc/main/devin/hook-settings.tssrc/main/ipc/agent-hooks.test.tssrc/main/ipc/agent-hooks.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/settings/general-search.tssrc/renderer/src/components/sidebar/worktree-title-derived-agent-rows.tssrc/renderer/src/components/terminal-pane/agent-completion-coordinator.test.tssrc/renderer/src/components/terminal-pane/title-agent-identity.tssrc/renderer/src/lib/use-tab-agent.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-hook-listener.tssrc/shared/agent-hook-relay.tssrc/shared/agent-hook-types.tssrc/shared/agent-session-resume.test.tssrc/shared/agent-session-resume.tssrc/shared/ai-vault-types.tssrc/shared/tui-agent-config.ts
3805de8 to
279539d
Compare
|
@Jinwoo-H All 4 CodeRabbit inline comments have been addressed in the latest push (
CodeRabbit's inline comments are pinned to an older commit and haven't re-scanned, but the diffs in When you have time, a light re-review would be appreciated. No rush — happy to squash or split if you prefer. |
Jinwoo-H
left a comment
There was a problem hiding this comment.
Thanks for the PR. I found and fixed a few integration edge cases before landing:
- tightened Devin JSONC parsing and managed hook event/matcher handling
- prevented imported Claude hooks from double-posting inside Devin
- added Devin-aware status/title detection across local and remote paths
- filled AI Vault and sleeping-session compatibility gaps
- added focused coverage for hook config, parsing, titles, resume, and SSH/remote status handling
Validated with typecheck, lint, relay build, focused Vitest, Electron UI verification, and a Docker-backed SSH relay round trip.
|
Ready to review this PR? Stage has broken it down into 11 individual chapters for you: Chapters generated by Stage for commit 5fa0711 on Jun 18, 2026 1:10am UTC. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/devin/hook-settings.ts (1)
47-49:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winUse Node path utilities for remote config path construction.
Line 48 hardcodes
/via string interpolation. This bypasses centralized path normalization and violates the repo’s cross-platform path construction rule.🛠️ Suggested fix
diff --git a/src/main/devin/hook-settings.ts b/src/main/devin/hook-settings.ts @@ -import { join } from 'path' +import { join, posix as pathPosix } from 'path' @@ export function getDevinRemoteConfigPath(remoteHome: string): string { - return `${remoteHome.replace(/\/$/, '')}/.config/devin/config.json` + const normalizedHome = remoteHome.replace(/\/+$/, '') || '/' + return pathPosix.join(normalizedHome, '.config', 'devin', 'config.json') }As per coding guidelines, “Use
path.joinor Electron/Node path utilities for file paths — never assume/or\for cross-platform compatibility.”Source: Coding guidelines
🧹 Nitpick comments (1)
src/shared/agent-hook-listener.ts (1)
3019-3019: ⚡ Quick winAdd direct route coverage for the new Devin endpoint.
Line 3019 introduces a new path mapping, but the route-resolution test list doesn’t explicitly assert
'/hook/devin'. A single assertion would prevent silent regressions.🧪 Suggested test addition
diff --git a/src/shared/agent-hook-listener.test.ts b/src/shared/agent-hook-listener.test.ts @@ expect(resolveHookSource('/hook/grok')).toBe('grok') expect(resolveHookSource('/hook/hermes')).toBe('hermes') + expect(resolveHookSource('/hook/devin')).toBe('devin') expect(resolveHookSource('/hook/pi')).toBe('pi')
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b440d785-76f2-48a7-940d-f131d003329c
📥 Commits
Reviewing files that changed from the base of the PR and between 279539dfa8876e3cd1e60e8ab5edd1d6a1ec6eaf and 5ce885511eabb1606672466c289a1f800cdd49b9.
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (30)
package.jsonsrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/ai-vault/session-scanner-agent-parser.tssrc/main/ai-vault/session-scanner-devin-parser.test.tssrc/main/ai-vault/session-scanner-devin-parser.tssrc/main/ai-vault/session-scanner.tssrc/main/claude/hook-service.test.tssrc/main/claude/hook-service.tssrc/main/devin/hook-config-json.test.tssrc/main/devin/hook-config-json.tssrc/main/devin/hook-service.test.tssrc/main/devin/hook-service.tssrc/main/devin/hook-settings.tssrc/renderer/src/components/terminal-pane/pty-connection.test.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/components/terminal-pane/title-agent-identity.test.tssrc/renderer/src/components/terminal-pane/title-agent-identity.tssrc/renderer/src/lib/agent-status-terminal-title.test.tssrc/renderer/src/lib/agent-status.test.tssrc/renderer/src/lib/resume-sleeping-agent-session.test.tssrc/renderer/src/lib/resume-sleeping-agent-session.tssrc/shared/agent-detection.tssrc/shared/agent-hook-listener.test.tssrc/shared/agent-hook-listener.tssrc/shared/agent-name-token-match.tssrc/shared/agent-session-resume.tssrc/shared/synthetic-agent-title.test.tssrc/shared/synthetic-agent-title.tssrc/shared/workspace-session-schema.test.tssrc/shared/workspace-session-schema.ts
✅ Files skipped from review due to trivial changes (3)
- src/renderer/src/components/terminal-pane/title-agent-identity.test.ts
- src/shared/synthetic-agent-title.ts
- src/main/claude/hook-service.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- package.json
- src/main/devin/hook-service.test.ts
- src/main/devin/hook-service.ts
Jinwoo-H
left a comment
There was a problem hiding this comment.
Re-approved after resolving the merge conflict and repairing the base test drift that failed verify.
…tablyai#1302) Clicking a worktree card whose row lies outside the sidebar viewport caused an instant jump when scrolling it into view. Switching `scrollToIndex` to `behavior: 'smooth'` turns that minimum-distance scroll into an animated slide while keeping `align: 'auto'` so visible cards still no-op (no re-centering). Co-authored-by: Orca <[email protected]>
…i#4815) The cut job checks out main, bumps package.json's version, and fast-forwards main. On a fork with Actions enabled, the scheduled RC cut runs against the fork's main and diverges it on the version line every slot, so that contributor's PRs back to upstream conflict on package.json even when their change never touches it. Gate the job to github.repository == 'stablyai/orca' so it (and the jobs that depend on it) no-op on forks. Canonical scheduled and manual cuts are unaffected.
- Parse Devin config.json as JSONC; warn on read_config_from overlap - Windows hook command uses forward slashes; APPDATA fallback - Add devin to sleeping-agent resume and UI registries (plan 003/004) - Add hook-service and hook-config-json tests Closes follow-up for plans 002–004 on feat/add-devin-agent.
Register devin in AI_VAULT_AGENTS, discover ~/.local/share/devin/cli/transcripts (or DEVIN_HOME), parse ATIF JSON sessions, and build devin --resume commands.
- installRemote: replace readHooksJsonRemote (JSON.parse) with readTextFileRemote + parseJsonc for JSONC compatibility on SSH - Add partial status test (some hooks missing → state:'partial') - Add Windows APPDATA config path test with fallback
…c errors, comment, i18n
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
7708cba to
5fa0711
Compare
* Revert "fix(terminal): add proportional scroll fallback for sidebar resize" (stablyai#937) * fix(sidebar): smoothly animate off-screen worktree reveal on click (stablyai#1302) Clicking a worktree card whose row lies outside the sidebar viewport caused an instant jump when scrolling it into view. Switching `scrollToIndex` to `behavior: 'smooth'` turns that minimum-distance scroll into an animated slide while keeping `align: 'auto'` so visible cards still no-op (no re-centering). Co-authored-by: Orca <[email protected]> * Avoid local scrollback serialization on shutdown (stablyai#1821) * Fix PR refresh coordinator test arguments (stablyai#2545) * release: v1.4.31 * release: v1.4.31 * release: v1.4.31 * release: v1.4.31 * release: v1.4.31 * release: v1.4.31 * release: v1.4.31 * release: v1.4.36-rc.6 * release: v1.4.36-rc.6 * release: v1.4.36-rc.6 * ci: gate release-cut to the canonical repo so it skips forks (stablyai#4815) The cut job checks out main, bumps package.json's version, and fast-forwards main. On a fork with Actions enabled, the scheduled RC cut runs against the fork's main and diverges it on the version line every slot, so that contributor's PRs back to upstream conflict on package.json even when their change never touches it. Gate the job to github.repository == 'stablyai/orca' so it (and the jobs that depend on it) no-op on forks. Canonical scheduled and manual cuts are unaffected. * feat(hooks): install Devin managed status hooks * feat(devin): address hook review, resume, and UI polish - Parse Devin config.json as JSONC; warn on read_config_from overlap - Windows hook command uses forward slashes; APPDATA fallback - Add devin to sleeping-agent resume and UI registries (plan 003/004) - Add hook-service and hook-config-json tests Closes follow-up for plans 002–004 on feat/add-devin-agent. * feat(devin): scan ATIF transcripts for AI Vault Register devin in AI_VAULT_AGENTS, discover ~/.local/share/devin/cli/transcripts (or DEVIN_HOME), parse ATIF JSON sessions, and build devin --resume commands. * docs(devin): clarify stdin-after-start vs bracketed paste * fix(devin): use JSONC for remote install, add partial+APPDATA tests - installRemote: replace readHooksJsonRemote (JSON.parse) with readTextFileRemote + parseJsonc for JSONC compatibility on SSH - Add partial status test (some hooks missing → state:'partial') - Add Windows APPDATA config path test with fallback * fix(devin): address CodeRabbit review — sessionId fallback, parseJsonc errors, comment, i18n * Fix Devin integration edge cases Co-authored-by: Orca <[email protected]> * Package Devin JSONC parser dependency Co-authored-by: Orca <[email protected]> --------- Co-authored-by: Neil <[email protected]> Co-authored-by: Brennan Benson <[email protected]> Co-authored-by: Orca <[email protected]> Co-authored-by: Jinjing <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Trevin Chow <[email protected]> Co-authored-by: Jinwoo-H <[email protected]>
Summary
Follow-up to #5282 (merged into v1.4.68), which added baseline Devin CLI support (catalog entry,
stdin-after-start,--permission-mode bypass, startup tests).This PR adds the remaining deep integration for Devin as a first-class TUI agent: managed hooks, sleeping-agent resume, AI Vault session scanning, and UI polish.
Closes #5246 (full scope).
What's in this PR
Managed hooks
src/main/devin/—hook-settings.ts(config path,%APPDATA%Windows fallback),hook-service.ts(install/remove/status/installRemote),hook-config-json.ts(JSONC viajsonc-parser)/hook/devin;normalizeDevinEventinagent-hook-listener.tsdevinStatus()IPC bridge (src/preload/index.ts,api-types.ts)installRemoteusesparseJsoncinstead ofJSON.parse(Devin config.json is JSONC)Sleeping-agent resume
devininRESUMABLE_TUI_AGENTS;getAgentResumeArgv('devin', ...)returns['devin', '--resume', id]extractAgentProviderSession('devin')readssession_id/sessionIdfrom transcriptUI polish
devinadded to:title-agent-identity.ts,general-search.ts,worktree-title-derived-agent-rows.ts,use-tab-agent.ts,agent-completion-coordinator.test.tsAI Vault
devininAI_VAULT_AGENTS;session-scanner-devin-parser.tsparses ATIF JSON transcripts~/.local/share/devin/cli/transcripts(orDEVIN_HOME); buildsdevin --resumecopy commandsCode review fixes
parseJsonc(wasJSON.parse) — SSH users with comments in~/.config/devin/config.jsonwould see silent parse failurespartialstatus test + WindowsAPPDATAconfig path testContext
74e2c952f)stdin-after-start,--permission-mode bypass, startup testsVerification
tsgo --noEmitacross all 3 tsconfigs: passsrc/main/devin/,src/main/ai-vault/session-scanner*,src/shared/agent-session-resume.test.ts,src/shared/tui-agent-startup.test.tsdevinCLI available (consistent with feat: add Devin CLI as supported TUI agent #5282 reviewer note); PTY E2E requires manual QA after install