Feat v0.10.0 panel manifest lifecycle (#84)
All checks were successful
CI/CD / detect-changes (push) Successful in 4s
CI/CD / test-runners (push) Has been skipped
CI/CD / e2e-smoke (push) Has been skipped
CI/CD / test-frontend (push) Successful in 6s
CI/CD / test-go-pg (push) Successful in 2m50s
CI/CD / test-sqlite (push) Successful in 3m9s
CI/CD / build-and-deploy (push) Successful in 1m1s

Co-authored-by: Jeffrey Smith <jasafpro@gmail.com>
Co-committed-by: Jeffrey Smith <jasafpro@gmail.com>
This commit was merged in pull request #84.
This commit is contained in:
2026-04-03 21:22:30 +00:00
committed by xcaliber
parent 414b2290ce
commit 33278d0d69
11 changed files with 619 additions and 83 deletions

View File

@@ -2,6 +2,45 @@
All notable changes to Armature are documented here.
## v0.10.0 — Panel Manifest + Lifecycle
First version in the Panels series. Adds the plumbing layer for
composable companion views — a new rendering tier between surfaces
(full-page) and block renderers (inline). No presentation UI ships
in this version; floating and docked chrome arrive in v0.10.1v0.10.2.
**Manifest: `panels` field (provider + consumer)**
- Provider form: packages declare panels as a map of `{ entry, title,
icon, description, min_width, min_height, default_width, default_height }`
- Consumer form: surfaces declare panel dependencies as an array of
`"package.panel"` strings (soft dependency — install succeeds even
if provider is missing)
- Validation enforces required `entry` and `title` for providers,
`pkg.panel` dot-format for consumers
**Backend: panel resolution at surface load**
- `PanelMeta` struct carries resolved panel metadata
- `resolvePanels()` resolves consumer references against installed and
enabled provider packages at surface render time
- `window.__PANELS__` injected into base template for extension surfaces
- Soft-dependency warning logged at install time for unresolved consumers
**Frontend: `sw.panels` SDK module**
- `sw.panels.open(panelId, opts)` — lazy-loads panel JS via dynamic
`import()`, mounts into container, caches module for reuse
- `sw.panels.close(panelId)` — calls cleanup, removes container
- `sw.panels.toggle(panelId, opts)` — open if closed, close if open
- `sw.panels.isOpen(panelId)` / `sw.panels.isAvailable(panelId)` — boolean queries
- `sw.panels.list()` / `sw.panels.active()` — registered and open panel IDs
- Events: `panels.opened` and `panels.closed` emitted on lifecycle transitions
- Mount context: `{ sw, params, panelId, close, resize }`
- Unstyled container (position:fixed div) — v0.10.1 adds FloatingPanel chrome
**Tests:** 10 new — 6 manifest validation, 4 panel resolution
## v0.9.9 — Surface Access via Roles
Surfaces can now gate access by team role. A manifest declaring