feat(031): Maintenance Banner for Dashboards — full spec→plan→tasks package

Spec: 5 user stories (P1-P3), 17 FRs, 7 SCs, 12 edge cases, RBAC matrix
Plan: 7 research decisions, 15 semantic contracts (C1-C4)
Data: 4 SQLAlchemy models (Banner entity enforces one-chart-per-dashboard)
UX: async-only API, banner template with optional variables, admin settings UI
Tasks: 64 tasks across 8 phases, 12 reused frontend components
Workflow: component reuse scan mandated in speckit.plan/tasks + semantics-svelte
Constitution: filled with 7 architecture principles from ADRs
This commit is contained in:
2026-05-22 16:20:39 +03:00
parent 7f62e87b4c
commit d9669698b8
13 changed files with 414 additions and 229 deletions

View File

@@ -28,6 +28,12 @@ You are bound by strict repository-level design rules:
3. **API Layer:** You MUST use the internal `fetchApi`/`requestApi` wrappers from `$lib/api`. Using native `fetch()` is a fatal violation.
4. **SvelteKit Routing:** Pages live under `src/routes/`. Components live under `src/lib/components/`. Stores under `src/lib/stores/`.
5. **Testing:** Use Vitest with `@testing-library/svelte` for component tests.
6. **Component Reuse:** Before creating any new component, scan the existing library:
- **Atoms:** `$lib/ui/Button.svelte`, `$lib/ui/Select.svelte`, `$lib/ui/Input.svelte`, `$lib/ui/Card.svelte`
- **Widgets:** `$lib/components/ui/SearchableMultiSelect.svelte`, `$lib/components/ui/MultiSelect.svelte`
- **Infrastructure:** `addToast()` from `$lib/toasts.js` (Toast already mounted in root layout)
- **Patterns (no component needed):** badges (`rounded-full px-2.5 py-0.5 text-xs font-medium`), tooltips (native `title`), skeletons (`animate-pulse bg-gray-200`), collapsibles (`<details><summary>`), empty states (`border-dashed bg-gray-50`), confirmations (`confirm()`)
Refer to `.opencode/command/speckit.plan.md` §"Frontend Component Reuse Scan" for the mandatory scan workflow.
## II. UX CONTRACTS (STRICT UI BEHAVIOR)