Skip to content

feat(plugins): add consent settings and demo workflow - #8462

Closed
nwparker wants to merge 1 commit into
nwparker/plugins-p0-panel-hostfrom
nwparker/plugins-p0-settings-demo
Closed

nwparker wants to merge 1 commit into
nwparker/plugins-p0-panel-hostfrom
nwparker/plugins-p0-settings-demo

Conversation

@nwparker

Copy link
Copy Markdown
Contributor

Summary

Completes the experimental Phase 0 stack on top of #8461:

  • Settings → Plugins installed list, feature-flag toggle, enable/disable, errored state, removal, structured logs, refresh, and local development paths.
  • Consent/install preview shows source, pinned commit, trust tier, plain-language capabilities, and the required warning that capabilities gate Orca APIs rather than operating-system access.
  • Keep Disabled is the default consent action; capability-set changes require structural re-consent through the hash-keyed fingerprint.
  • Actionable plugin errors and status indicators use localized strings, design tokens, and accessible labels across all five locale catalogs.
  • Demo plugin combines a CSP panel, lazy worker command, host call, worktree lifecycle event subscription, and development hot reload.
  • Feature-flag shutdown immediately unmounts iframe content while preserving routes for later re-enable.

Everything remains behind the feature flag and every extension point is experimental.

End-to-end evidence

Serialized Electron 43.1.0 validation on macOS proved:

  • Install preview and visible consent with source, trust tier, capabilities, OS-access disclaimer, and Keep Disabled default.
  • Consent-gated hello-orca command activation and host API call.
  • Worktree event delivery to the lazy worker.
  • Panel rendering in Orca's right sidebar under the host-generated CSP shell.
  • Development panel hot reload.
  • Hostile-panel CSP/navigation/bridge containment and busy-loop suspension.
  • Stable launch with 20 approved inert plugins and zero plugin code before a trigger.

Command:

pnpm exec playwright test tests/e2e/plugin-demo.spec.ts tests/e2e/plugin-panel-containment.spec.ts tests/e2e/plugin-startup-budget.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1

Result: 4 passed in 1.1 minutes.

The approved screenshot uploader could not obtain a GitHub upload token. The reproducible transcript is included instead, and screenshots were not committed. Signed packaged-app and Windows/Linux live evidence remain CI/follow-up work.

Validation

  • pnpm typecheck — passed.
  • pnpm lint — passed; only pre-existing warnings outside this stack.
  • Reliability gates, max-lines ratchet, localization parity, and localization coverage — passed.
  • Plugin/seam Vitest matrix — 55 files, 315 tests passed.
  • Settings-schema regressions — 2 files, 107 tests passed.
  • Startup unit gate — 20 samples, P95 2.63 ms, budget under 50 ms.
  • Real Electron acceptance — 4 passed in 1.1 minutes.

Deferred scope

Relay provisioning/distribution remains deferred and fail-closed. Paired web/mobile plugin UI is deferred and intentionally receives no plugin surface. The architecture uses <publisher>.<id>/<content-hash> install directories.

Prior art credit

The stack credits community PR #7506 by @s546126 and selected work from community PR #5801 by @gsxdsm. No comments were posted on those community PRs.

Stack

  1. feat(plugins): add experimental Phase 0 kernel #8460 — main-process kernel and enforcement.
  2. feat(plugins): add sandboxed panel host and renderer #8461 — sandboxed panel host and renderer.
  3. This PR: consent/settings UI and demo workflow.

Draft only — do not merge.

@nwparker
nwparker force-pushed the nwparker/plugins-p0-panel-host branch from f5f0752 to 731a034 Compare July 13, 2026 03:06
@nwparker
nwparker force-pushed the nwparker/plugins-p0-settings-demo branch from 54fe5a3 to 4cbbaaf Compare July 13, 2026 03:06
@nwparker
nwparker force-pushed the nwparker/plugins-p0-panel-host branch from 731a034 to 695b4ad Compare July 13, 2026 10:32
@nwparker
nwparker force-pushed the nwparker/plugins-p0-settings-demo branch from 4cbbaaf to 0515b72 Compare July 13, 2026 10:32
@nwparker

Copy link
Copy Markdown
Contributor Author

Superseded by #8549, which condenses the whole plugin-system stack into a single PR against main.

@nwparker nwparker closed this Jul 20, 2026
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