feat(web): add global app status surface (#1869)

* feat(web): add app status bar

* feat(web): add app status bar visibility toggle

* feat(web): persist status bar item order

* fix(web): refine app status bar behavior

* fix(web): polish app status bar presentation

* test(web): split plugin slot coverage groups

* fix(web): address status surface review feedback

* fix(web): stabilize status bar overlay tests
This commit is contained in:
José Almeida
2026-07-23 12:28:54 +01:00
committed by GitHub
parent 7de788ceed
commit 9c16d337a2
141 changed files with 4727 additions and 771 deletions
+18 -2
View File
@@ -487,8 +487,14 @@ Mattermost-webapp model), not iframes. The full contract lives in
`api.fetch`, a curated `@kandev/ui` subset, and the theme — so a plugin can build
a page indistinguishable from first-party UI (e.g. a native `/jira` page).
- **Registry surface:** `registerRoute(path, C)`, `registerNavItem(item)`,
`registerSettingsRoute(path, C)`, `registerComponent(slot, C)` (slots:
`task-sidebar`, `settings-nav`, ...), `registerWsHandler(action, fn)`.
`registerSettingsRoute(path, C)`, `registerComponent(slot, C)` (including
`app-status-bar-left` and `app-status-bar-right`), `registerWsHandler(action, fn)`.
Status-slot components receive the exact `AppStatusBarSlotProps` contract in
`PLUGIN-API.md`: current path/context plus placement and presentation. The host
renders one responsive presentation at once — 24 px bar on tablet/desktop or
phone Status drawer — so a plugin must tolerate remounting and adapt its own UI.
A status slot chooses the contribution's default side; portable user order may
move either contribution across the desktop spacer and determines drawer order.
Registrations are namespaced per plugin and bulk-revoked on disable/uninstall.
- **Isolation (v1):** only active, operator-installed plugins load; a failing
bundle/`initialize` is caught and never breaks boot; slot components render behind
@@ -647,6 +653,16 @@ restart with backoff (max 5 attempts, then `error`). Next successful handshake/`
without `include_ephemeral`, **THEN** quick-chat ephemeral tasks are excluded from
the results.
- **GIVEN** an active plugin registers `app-status-bar-left` or
`app-status-bar-right`, **WHEN** Kandev switches between desktop/tablet and phone,
**THEN** the plugin receives the exact slot props for the active bar or Status
drawer presentation, and only that presentation is mounted.
- **GIVEN** a user has moved a registered status contribution, **WHEN** the plugin
disables and later enables or Kandev restarts, **THEN** its deterministic
plugin/slot/ordinal identity restores the saved position; the original slot
remains its default side rather than overriding user order.
- **GIVEN** a plugin whose manifest declares `api_write: ["tasks"]` in this phase,
**WHEN** it calls `CreateTask`, **THEN** kandev returns gRPC status `Unimplemented`
(write RPCs are deferred), and declaring the capability has no other effect.