dashboard: build-and-serve — the web dashboard becomes a real served artifact #199

Closed
opened 2026-07-30 23:19:54 +00:00 by ben · 1 comment
Owner

Parent

Shell spec #22 (the DN resting frame, ADR 0094). Gap audit 2026-07-30 (post #191–#195 sweep of the composition roots and both app shells). Filed per the #191–#195 precedent: a close-out blocker of #183 found while preparing the run, confirmed by Ben.

What's true today

  • The transport tier is genuinely done: every slot of the dashboard's production composition is a live HTTP client (#128–#159) — no fake survives in the deps value.
  • But nothing can run it. The dashboard package has no build entry (no html entry, no bundler config; its build script typechecks only), no URL routing, and the production bootstrap is called only by tests. The control plane serves no static files. The package's own description promises "builds to static files served by the control plane" — neither half exists.
  • Every dashboard evidence leg of #183 (A·2, B·2–B·7) is downstream of this.

What to build

  1. A real SPA build — an entry html + bundler config producing static assets; the production bootstrap over the real deps becomes the served entry; each of the six tabs reachable by URL (the chrome's own nav may suffice — bring in a router library only if genuinely needed; deep-linkability is the bar, DDR 0101's open-recovery-readiness deep-link presumes it).
  2. The control plane serves the assets — the gateway is the community's one public entry; the dashboard arrives over it.
  3. A serve seam proof — the built page boots against a running control plane and the six tabs mount over the live transports.

Acceptance criteria

  • Given a built control plane, When an operator browses to the gateway, Then the dashboard loads from it and the nav chrome mounts the six tabs over the live transports — no fake constructed in the composition path
  • Given a tab's URL, When the page is loaded or reloaded, Then the same surface mounts (deep-linkable)
  • Given the resting control plane, When the dashboard loads, Then the honest resting reads render (never a fabricated fleet)

Task manifest

task: dashboard:build-and-serve
implements_seam: "shell spec #22 (DN resting frame, ADR 0094) + ADR 0100"
interface: "the dashboard served at the gateway's public entry"
seam: "a build+serve seam test: built assets served by the control plane, tabs mount over live transports"
acceptance:
  - given: a built control plane; when: an operator browses to the gateway; then: the dashboard serves and every tab mounts live with no fake in the path
depends_on: []
out_of_scope: [Quasar component migration (ADR 0108 defers it), new surfaces or transports, authentication posture changes (rides what the platform has)]
needs_human_decision: []

Blocks

#183 — every dashboard evidence leg: A·2's walk, B·2's Fleet view, B·3's revision on dashboard, B·4's coverage map, B·5's member on dashboard, B·6's monitoring screen, B·7's watching-again.

## Parent Shell spec #22 (the DN resting frame, ADR 0094). Gap audit 2026-07-30 (post #191–#195 sweep of the composition roots and both app shells). Filed per the #191–#195 precedent: a close-out blocker of #183 found while preparing the run, confirmed by Ben. ## What's true today - The transport tier is genuinely done: every slot of the dashboard's production composition is a live HTTP client (#128–#159) — no fake survives in the deps value. - But nothing can run it. The dashboard package has no build entry (no html entry, no bundler config; its `build` script typechecks only), no URL routing, and the production bootstrap is called only by tests. The control plane serves no static files. The package's own description promises "builds to static files served by the control plane" — neither half exists. - Every dashboard evidence leg of #183 (A·2, B·2–B·7) is downstream of this. ## What to build 1. **A real SPA build** — an entry html + bundler config producing static assets; the production bootstrap over the real deps becomes the served entry; each of the six tabs reachable by URL (the chrome's own nav may suffice — bring in a router library only if genuinely needed; deep-linkability is the bar, DDR 0101's `open-recovery-readiness` deep-link presumes it). 2. **The control plane serves the assets** — the gateway is the community's one public entry; the dashboard arrives over it. 3. **A serve seam proof** — the built page boots against a running control plane and the six tabs mount over the live transports. ## Acceptance criteria - [ ] Given a built control plane, When an operator browses to the gateway, Then the dashboard loads from it and the nav chrome mounts the six tabs over the live transports — no fake constructed in the composition path - [ ] Given a tab's URL, When the page is loaded or reloaded, Then the same surface mounts (deep-linkable) - [ ] Given the resting control plane, When the dashboard loads, Then the honest resting reads render (never a fabricated fleet) ## Task manifest ```yaml task: dashboard:build-and-serve implements_seam: "shell spec #22 (DN resting frame, ADR 0094) + ADR 0100" interface: "the dashboard served at the gateway's public entry" seam: "a build+serve seam test: built assets served by the control plane, tabs mount over live transports" acceptance: - given: a built control plane; when: an operator browses to the gateway; then: the dashboard serves and every tab mounts live with no fake in the path depends_on: [] out_of_scope: [Quasar component migration (ADR 0108 defers it), new surfaces or transports, authentication posture changes (rides what the platform has)] needs_human_decision: [] ``` ## Blocks #183 — every dashboard evidence leg: A·2's walk, B·2's Fleet view, B·3's revision on dashboard, B·4's coverage map, B·5's member on dashboard, B·6's monitoring screen, B·7's watching-again.
Author
Owner

Done in b76996d (on origin/main).

Both halves land. The SPA build: dashboard/index.html + vite.config.ts emit static assets to dashboard/dist/; src/entry/served.ts (bootServedDashboard, the web counterpart to the app's bootPackagedApp) composes over the live control-plane transport at the same origin that served the page ('' base, ADR 0037), mounts the six-tab DN frame, reads the deep-linked tab from the URL, and rewrites the URL as the tab changes (a flat six-entry tab↔path map in src/lib/tabRouting.ts — no router library; Back/Forward walk the tabs). The control plane serves it: controlapi.WithDashboard(dir) serves the built assets at the gateway's public entry (ADR 0113) and SPA-falls-back every non-asset path to index.html so a reload of any tab mounts the same surface; the API (/api/v1/…) and install doorway (/get) keep their routes, an unknown /api/ path stays an honest JSON 404. Wired from OURCLOUD_DASHBOARD_DIR (resting when unset, ADR 0100).

Acceptance: AC1 — a built control plane serves the dashboard and mounts the six tabs over the live transports with no fake in the composed deps (verified in both seam tests). AC2 — every tab URL is deep-linkable and reload-stable (/backups boots Backups; SPA fallback). AC3 — the resting control plane raises no fabricated indicator/fleet.

Evidence: Go build+serve seam internal/controlapi/dashboard_test.go; TS serve seam dashboard/tests/unit/serveEntry.test.ts (4 tests). Verified locally: dashboard vue-tsc + vitest (702 pass) + vite build green, eslint + prettier clean. Go half verified by review (no Go toolchain in the sandbox, issue #198); the seam CI runs go build/vet/test + golangci-lint.

Scope notes: brand-bar community reads live over the existing Settings transport with a neutral honest fallback; operator label rests at the role (auth out of scope). The web DX→HOx open-operator-app effect is a documented best-effort (no web→app mechanism wired yet). Unblocks #183 dashboard legs A·2, B·2–B·7. STATUS.md updated.

Done in b76996d (on origin/main). **Both halves land.** The SPA build: `dashboard/index.html` + `vite.config.ts` emit static assets to `dashboard/dist/`; `src/entry/served.ts` (`bootServedDashboard`, the web counterpart to the app's `bootPackagedApp`) composes over the live control-plane transport at the same origin that served the page ('' base, ADR 0037), mounts the six-tab DN frame, reads the deep-linked tab from the URL, and rewrites the URL as the tab changes (a flat six-entry tab↔path map in `src/lib/tabRouting.ts` — no router library; Back/Forward walk the tabs). The control plane serves it: `controlapi.WithDashboard(dir)` serves the built assets at the gateway's public entry (ADR 0113) and SPA-falls-back every non-asset path to `index.html` so a reload of any tab mounts the same surface; the API (`/api/v1/…`) and install doorway (`/get`) keep their routes, an unknown `/api/` path stays an honest JSON 404. Wired from `OURCLOUD_DASHBOARD_DIR` (resting when unset, ADR 0100). **Acceptance:** AC1 — a built control plane serves the dashboard and mounts the six tabs over the live transports with no fake in the composed deps (verified in both seam tests). AC2 — every tab URL is deep-linkable and reload-stable (`/backups` boots Backups; SPA fallback). AC3 — the resting control plane raises no fabricated indicator/fleet. **Evidence:** Go build+serve seam `internal/controlapi/dashboard_test.go`; TS serve seam `dashboard/tests/unit/serveEntry.test.ts` (4 tests). Verified locally: dashboard `vue-tsc` + `vitest` (702 pass) + `vite build` green, eslint + prettier clean. Go half verified by review (no Go toolchain in the sandbox, issue #198); the seam CI runs go build/vet/test + golangci-lint. **Scope notes:** brand-bar community reads live over the existing Settings transport with a neutral honest fallback; operator label rests at the role (auth out of scope). The web DX→HOx open-operator-app effect is a documented best-effort (no web→app mechanism wired yet). Unblocks #183 dashboard legs A·2, B·2–B·7. STATUS.md updated.
ben closed this issue 2026-07-31 07:51:43 +00:00
Sign in to join this conversation.
No milestone
No project
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.

Reference
Matou/idss#199
No description provided.