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.3 KiB
2.3 KiB
id, title, status, wave, depends_on, plan
| id | title | status | wave | depends_on | plan | ||||
|---|---|---|---|---|---|---|---|---|---|
| task-14 | Playwright e2e for the plugin system | pending | 4 |
|
docs/plans/plugins/plan.md |
Playwright e2e for the plugin system
Title
End-to-end browser test: start the fixture plugin, register it, see it active in the Plugins settings UI, exercise enable/disable, render its iframe page, and verify event delivery on task creation.
Inputs
- Read
apps/web/e2e/README.mdandapps/web/e2e/fixtures/backend.ts(how the backend is booted for e2e; env scrubbing — see the KANDEV_* env leak guidance). - Fixture plugin binary from task-04 (
apps/backend/cmd/plugin-fixture, printsLISTENING <addr>,-secretflag,/_debug/deliveries). - Feature flag: e2e profile sets
KANDEV_FEATURES_PLUGINS=true(task-10). Confirm the e2e backend fixture picks it up. - Plugin registration/secret flow (clean, no pre-shared secret): (1) start the
fixture (health needs no secret); (2)
POST /api/plugins/registerwith a manifest whosebase_urlis the fixture's printed addr → kandev returns the generatedwebhook_secretand marks the plugin active after health; (3)POST {fixture}/_configwith{"secret": <returned webhook_secret>}so the fixture verifies future deliveries with kandev's secret; (4) trigger events and assert. task-04 exposes/_configfor exactly this.
Acceptance
apps/web/e2e/plugins.spec.ts(in the default project unless it needs Docker):- boots fixture plugin, registers it, reloads Plugins settings page → plugin
row shows status
active. - disable → badge
disabled; enable → back toactive. - open detail → iframe present; assert the fixture page's
#plugin-dashboardheading is visible inside the frame. - create a task (via UI or API) → poll fixture
/_debug/deliveriesuntil it containstask.created(event delivery works end-to-end).
- boots fixture plugin, registers it, reloads Plugins settings page → plugin
row shows status
- Test cleans up: uninstall plugin, stop fixture process.
Files
apps/web/e2e/plugins.spec.tsapps/web/e2e/helpers/plugin-fixture.ts(spawn/stop helper capturingLISTENING)
Verification
cd apps/web && pnpm e2e -g "plugin"
Output contract
Report: which project the spec runs in, and any flake mitigations (polling/timeouts).
Dependencies
task-09, task-12, task-13, task-04.