Declarative plugin UI and slots #45

Closed
opened 2026-10-07 19:44:15 +02:00 by SBDeveloper · 1 comment
Owner

Parent

Part of #32

What to build

A Plugin can describe UI declaratively as a JSON tree (text, list, button, image, Track list and similar primitives) and handle events. The host renders it with native components so it matches the theme. It requires the UI capability in the manifest and consent. Three slots: overlay tab, sidebar entry (own routed page), settings section. A Plugin's UI receives the playback events it needs (current Track, position). A failing Plugin affects only its own view. Add an ADR recording the rendering model and why a sandboxed iframe was rejected.

This replaces the UI-view half of #21.

Acceptance criteria

  • Core tests: Plugin returns a UI tree and gets event round-trips; UI denied without consent; failure contained to the view
  • Host renders all primitives; unknown primitives are ignored safely
  • A test Plugin shows one view in each slot
  • ADR written

Blocked by

  • #41 (overlay tabs)
  • #44 (sidebar and settings slots, old UI removed)
  • #19 (capability enforcement and consent)
## Parent Part of #32 ## What to build A Plugin can describe UI declaratively as a JSON tree (text, list, button, image, Track list and similar primitives) and handle events. The host renders it with native components so it matches the theme. It requires the UI capability in the manifest and consent. Three slots: overlay tab, sidebar entry (own routed page), settings section. A Plugin's UI receives the playback events it needs (current Track, position). A failing Plugin affects only its own view. Add an ADR recording the rendering model and why a sandboxed iframe was rejected. This replaces the UI-view half of #21. ## Acceptance criteria - [ ] Core tests: Plugin returns a UI tree and gets event round-trips; UI denied without consent; failure contained to the view - [ ] Host renders all primitives; unknown primitives are ignored safely - [ ] A test Plugin shows one view in each slot - [ ] ADR written ## Blocked by - #41 (overlay tabs) - #44 (sidebar and settings slots, old UI removed) - #19 (capability enforcement and consent)
Author
Owner

Implemented in fbcb448: ui capability and views for three slots, ui_view/ui_event contract, host-side tree sanitising, native rendering, failure containment, ADR 0005, core tests in crates/core/tests/plugin_ui.rs.

Implemented in fbcb448: ui capability and [[views]] for three slots, ui_view/ui_event contract, host-side tree sanitising, native rendering, failure containment, ADR 0005, core tests in crates/core/tests/plugin_ui.rs.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SBDeveloper/medley#45
No description provided.