Repository navigation
refactor(agents): remove dead hook IPC and derive shared agent defaults - #16089
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (7)
🚧 Files skipped from review as they are similar to previous changes (5)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change centralizes TUI agent configuration defaults and reuses shared ordering, labels, validation, enablement, and selection logic in mobile code. Mobile catalog tests now validate shared configuration and display names. Provider-specific hook status IPC handlers, preload types, preload bindings, and web fallback APIs were removed. Generic agent status handling remains. Configuration tests cover defaults and explicit command overrides. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description is detailed and on-topic. It explains the changes, rationale, compatibility impact, verification, visual evidence, mobile limitations, and AI use. However, it omits the required linked issue, does not use several required template sections, and does not include the checklist confirmations. Resolution Add a valid issue reference under Linked Issue, such as 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 |
|
Thanks for this — the audit behind it (recent agent additions touching 27–47 files, a third of those edits re-declaring facts already in The ask: drop Why just that oneMain moved under this PR while it was open.
The duplicate chains do still need to go. They come out as consumers migrate onto the evidence parser (#16237 is the first), so that cleanup arrives without publishing an ordered table in the meantime. The three to keep
Those are real reductions we'd otherwise have to write ourselves, and none of them are affected by the identity work. Practical noteThe branch needs a rebase regardless — Happy to take the rebase off your hands if you'd prefer — say the word and we'll land the three with credit to you. |
18e26e0 to
4930851
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Rebased onto current main ( The three keepers are now:
Re-verified on the new base: full 🤖 Generated with Claude Code |
No renderer, CLI, or mobile caller invoked window.api.agentHooks.*Status; main already reads install status through MANAGED_AGENT_HOOK_STATUS_READERS. The 14 handlers had also drifted (kimiStatus existed in main/preload but not in AgentHooksApi or the web stub). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…detectCmd 32 of 36 entries repeated the binary name three times. Entries are now authored in a source form where both default to detectCmd and resolved once at module load, so TUI_AGENT_CONFIG keeps its exact shape for consumers (verified equal to the previous table). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…/shared The mobile mirror (and its regex-over-desktop-source parity test) predates mobile importing runtime values from src/shared, which it now does in a dozen modules. Only the favicon-domain map stays mobile-local because desktop's lives in the renderer catalog next to bundled ?url imports. The parity test now imports the real registries and also checks label parity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4930851 to
feeea7d
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Review status: ready after required CIReviewed final head Changes made during review
Review result
Verification
Remaining gapNative iOS picker validation was attempted through the Orca-managed emulator, but the app hit an existing GitHub now reports the rebased PR as mergeable. Required checks have not populated for this pushed SHA yet, so the landing recommendation is: land after required CI passes. |
…ts (stablyai#16089) * refactor(agent-hooks): drop the unused per-agent hook status IPC surface No renderer, CLI, or mobile caller invoked window.api.agentHooks.*Status; main already reads install status through MANAGED_AGENT_HOOK_STATUS_READERS. The 14 handlers had also drifted (kimiStatus existed in main/preload but not in AgentHooksApi or the web stub). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(tui-agent-config): default launchCmd and expectedProcess to detectCmd 32 of 36 entries repeated the binary name three times. Entries are now authored in a source form where both default to detectCmd and resolved once at module load, so TUI_AGENT_CONFIG keeps its exact shape for consumers (verified equal to the previous table). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(mobile): derive the agent order, labels, and picker from src/shared The mobile mirror (and its regex-over-desktop-source parity test) predates mobile importing runtime values from src/shared, which it now does in a dozen modules. Only the favicon-domain map stays mobile-local because desktop's lives in the renderer catalog next to bundled ?url imports. The parity test now imports the real registries and also checks label parity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(web): align preload surface after hook IPC removal --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
Summary
This PR removes an unused per-agent hook-status IPC surface and consolidates two duplicated agent-registry behaviors without changing the exported desktop configuration shape:
window.api.agentHooks.*StatusIPC/preload/web surface. Existing agent launch/status tracking remains intact.launchCmdandexpectedProcessas optional source fields and resolves both fromdetectCmdonce at module initialization.The branch was rebased onto current
mainduring review. Final diff: 12 files, +93 / -592.Why
These facts were duplicated across desktop and mobile and could drift when agents were added or changed. The final implementation keeps one shared source for stable agent metadata while preserving existing consumer contracts and leaving broader registry consolidation out of scope.
Compatibility and risk
Object.hasOwn.Verification
pnpm typecheckpnpm lintpnpm buildElectron rendered QA
Validated this exact worktree with isolated user data and Playwright CDP. The real Create Worktree and New Tab agent pickers rendered the expected detected-agent labels/order; Codex was selected and launched successfully.
window.api.agentHookswas absent, whileagentStatusand launch/foreground tracking remained present. Renderer console had no errors.Native mobile QA
Native iOS validation was attempted on iPhone 17 Pro through the Orca-managed emulator and this worktree's Metro bundle. It was blocked before the agent picker by an existing home-screen
hosts.toSortedrender error outside this PR's diff. No web render was substituted for native evidence; the changed catalog remains covered by focused tests and the successful iOS Metro export.AI disclosure
The original implementation was AI-assisted. The final rebased head was reviewed by multiple independent agents plus a same-model fix/review loop, with only one meaningful regression found and fixed: the stale web preload surface assertion.