Repository navigation
Conversation
|
Hi @brennanb2025 — this PR is ready for review. It adds a session-bound Quick summary of what's included:
Validation performed:
This is a generic plugin capability (not a one-off hook), so future plugins displaying local indexes, databases, or computed data can use it too. I've also published a reference plugin (Syfyivan/orca-codex-history-viewer) that depends on this bridge. Happy to adjust anything — thanks! |
📝 WalkthroughWalkthroughThe change adds the 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e389b6b9-9ddb-4a0d-a19e-7f899fd49521
📥 Commits
Reviewing files that changed from the base of the PR and between aa03e24 and cd35070ba3903b45da2f17521e4a094a6b7ddac0.
📒 Files selected for processing (7)
examples/plugins/hello-orca/panel.htmlsrc/main/plugins/plugin-panel-controller.test.tssrc/main/plugins/plugin-panel-controller.tssrc/main/plugins/plugin-service.tssrc/renderer/src/components/right-sidebar/plugin-panel-bridge-host.test.tssrc/shared/plugins/plugin-panel-bridge.tstests/e2e/plugin-demo.spec.ts
Plugin panels could call host actions but could not query commands registered by their own worker, which made dynamic local-data panels impossible. Bind command dispatch to the opaque panel session owner and keep validation, rate limits, and result-size limits in the main process. Constraint: Panel callers never supply a plugin key; dispatch always uses the session-bound owner. Rejected: Direct filesystem access from the panel | the sandboxed iframe intentionally has no Node authority. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep same-plugin command invocation bound to the opaque panel session and preserve the result-size cap. Tested: 23 targeted Vitest tests; plugin demo Electron E2E; Node and web typechecks; oxfmt; oxlint --deny-warnings; electron-vite production build.
cd35070 to
78dfd32
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. |
|
I verified this change against the current Results:
The session-bound, same-plugin command dispatch still fits the current panel and worker-command architecture without widening panel access to arbitrary host APIs. Is there any remaining design or maintenance concern blocking review or merge? I am happy to help refresh the branch or address follow-up feedback. |
|
We'd use this for a plugin with a launcher and live agent dashboard in the sidebar panel. The only workaround today is routing actions through a terminal and rewriting the panel HTML to push state. FYI it no longer applies cleanly on main: small conflicts in |
- ui/index.html: findings grouped by lane (needs attention, quick, decide, scope, dig, needs research) with complexity and confidence meters, lane-specific primary actions, bulk accept for quick, expandable detail (background, why it matters, options with blast radius and pros and cons, discussion, review comments, commit history), reply approval, reopen, light and dark themes. Redraws only when data changes. - docket ui [--open]: local HTTP server on 127.0.0.1. Writes need an x-docket header and a same-origin request. src/api.ts is the action layer shared with the Orca worker; dispatch launches agent terminals through the Orca CLI, reuses a live applier, resumes discussions by session id, and keeps a quick-fix decision even when the applier cannot start. - orca-plugin/: "Docket: Open" command (starts a detached server with Orca's own runtime and opens the worktree in Orca's browser), a right sidebar panel that uses the same page, and a worker API for when Orca lets panels call their worker (stablyai/orca#12229 is unmerged; today the panel is a launcher). - scripts/demo.mjs: throwaway fixture with every lane and state. Verified: 9 server tests (40 total, against source and bundle); the worker runs inside Orca's Electron with a scrubbed PATH; the UI was exercised in a browser (decide, acknowledge, quick fix without Orca, reply approval, narrow width, light mode). Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
What is the status on this? Will this eventually be merged? Can I help in any way? |
|
@Syfyivan Thank you for this, and sorry it sat so long. Panel-to-worker calls landed in #37013 (merged), which takes a slightly different shape: a panel calls |
Summary
plugin.command.invokepanel action so a plugin panel can call commands registered by its own workerhello-orcaexample and Electron E2E coverage to exercise the complete panel-to-worker pathWhy
Plugin panels can currently call a small set of host actions, but they cannot consume data or logic owned by their plugin worker. That prevents sandboxed panels from presenting dynamic plugin data such as local indexes, databases, or computed history unless Orca adds a dedicated host API for every use case.
This change keeps the iframe sandbox intact. Main derives the plugin identity from the opaque panel session and routes only to a command contributed and registered by that same enabled plugin.
Security boundaries
commandIdand optionalargs; extra fields such aspluginKeyfail validationTesting
pnpm run typecheck:nodepnpm run typecheck:weboxfmt --checkon all changed filesoxlint --deny-warningson changed TypeScript filespnpm run build:electron-vitepnpm run test:e2e -- tests/e2e/plugin-demo.spec.ts --workers=1