c53f699714
- go plugin backends ship as release tarballs (per-platform binaries, checksums) that kandev installs from url/upload or filesystem sideload+sync, then spawns and supervises via hashicorp/go-plugin (unix socket / loopback tcp+automtls) - strict typed grpc contract (kandev.plugin.v1): DeliverEvent/InvokeTool/HandleWebhook plus a capability-gated host service (state, secrets, emit); author sdk in pkg/pluginsdk; packaging cli in cmd/plugin-pack - native frontend bundles: window.registerKandevPlugin + registry/host loader with dynamic routes, nav items, slots and ws handlers; plugins settings page with install dialog, sync button and enable/disable/uninstall - gated behind the plugins feature flag (prod off, dev/e2e on); covered by unit and integration tests plus playwright e2e against a real packaged fixture plugin Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
id, title, status, wave, depends_on, plan
| id | title | status | wave | depends_on | plan | |
|---|---|---|---|---|---|---|
| task-13 | Plugin detail view with sandboxed iframe UI pages | pending | 3 |
|
docs/plans/plugins/plan.md |
Plugin detail view with sandboxed iframe UI pages
Title
A plugin detail route rendering the plugin's declared ui.pages as sandboxed
iframes served via the UI proxy, with a minimal postMessage theme/context bridge.
Inputs
- Detail route
/settings/plugins/:id(linked from task-12); register insrc/settings-routes.tsxlike the[id]-style routes there. - UI proxy endpoint (task-08/09): iframe
src={/api/plugins/${id}/ui${page.path}}. ui.pages[]come from the plugin record (task-11 types):{key,title,path,surface}.- Theme source: existing theme store/hook (grep
useTheme/themein apps/web).
Acceptance
apps/web/app/settings/plugins/[id]/page.tsx: header (name, status, config summary), a tab/section perui.pagesentry withsurface: settings, each rendering<iframe sandbox="allow-scripts allow-forms allow-same-origin" src="/api/plugins/{id}/ui{page.path}">.- A small bridge: on iframe load and on theme change,
postMessage{type:"kandev:context", theme, pluginId}to the iframe; listen for{type:"kandev:resize", height}to size the iframe. Ignore messages whoseevent.sourceisn't the iframe's contentWindow. - Gated on
useFeature("plugins"). - Detail shows enable/disable/uninstall + config edit (JSON/textarea against
config_schema— a simple textarea is acceptable for v1).
Files
apps/web/app/settings/plugins/[id]/page.tsx(+plugin-ui-frame.tsxchild)- edits:
apps/web/src/settings-routes.tsx apps/web/app/settings/plugins/[id]/plugin-ui-frame.test.tsx(postMessage bridge: origin/source guarding + resize handling with a mocked iframe ref)
Verification
cd apps/web && pnpm run typecheck && pnpm lint && pnpm test -- plugin
Output contract
Report: route registration, iframe sandbox attributes, postMessage bridge contract (message types + source guarding), mobile behavior. Follow /mobile-parity.
Dependencies
task-12.