Repository navigation
fix(plugins): wire the plugin service on a headless serve, and turn plugins on from the CLI - #36838
Merged
Merged
Conversation
…lugins on from the CLI
…dropped the shared helper
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 10 minutes. View limit details
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. |
This was referenced Nov 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
On a headless
orca serve, plugins never fully started: the plugin service was wired up only when a window opened, and a headless host never opens one. There was also no way to turn plugins on without the Settings screen. Now the wiring happens at startup for every host, andorca plugin system on|offturns plugins on or off from the CLI.Thanks to @jutaz, who reported this and wrote the fix. Their commit is carried here with authorship intact, rebased onto current main.
What Changed
initializeMainProcessPlugins, which runs on both desktop and headless hosts. They used to live in the IPC handler registration, which runs only when a window opens. Desktop still gets both, and the listener is registered exactly once instead of once perregisterCoreHandlerscall.plugins.setSystemEnabledRPC (host-admin) andorca plugin system on|offCLI command. It only flips the plugin system switch, so only plugins approved earlier run. It never approves anything.orca-cliskill guide document the new command.Why
Wiring the service where it starts, not where a window registers its IPC, fixes this for every windowless host. It doesn't need a separate headless path. A new CLI talking to an older host gets the existing "update Orca on that host" error. An older CLI is unaffected.
Linked Issue
Fixes #36709
Supersedes #35184
Visual Proof
N/A. This is a host startup wiring fix plus a CLI command; the UI doesn't change.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New tests check that a host with no window binds the runtime and exactly one settings-refresh listener, and that the switch is admin-only and approves nothing. Both fail on main's source and pass here.
Every test file that imports a changed module (34 files, 327 tests) passes.
Static checks pass locally: format, lint, typecheck, ratchets and the RPC params catalog.
Codex review and an independent review both came back with no blocking findings.
During the rebase,
src/main/ipc/plugins.test.tskept main's new cases and dropped the listener test, since that listener moved out of the IPC handlers.Review
Agent skill upstream boundary
Notes
This works the same on macOS, Linux and Windows, and over SSH or other remote hosts. The new RPC is optional for older clients. Mobile isn't affected.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)