docs(ui-spec): record as-built deviations and additions
The Stage-0 ui-spec (ADR-011) predated multi-user and several UX features. Appended a "Deviations and additions (as-built)" table — without rewriting the spec — recording each feature shipped beyond it (multi-user+RLS, registration gate, per-user YouTube connect, account management, immediate web summarization, charmbracelet spinner, auto/manual mode, public landing page) with the why and the commit/ADR that covers each. Preserves the intent-vs-reality split. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -147,3 +147,28 @@ Gate (lane A) commits first; B/C/D follow.
|
||||
|
||||
`task check` green per lane; B/C/D rebase on A. Deploy (D) lands last, after the binary serves
|
||||
locally.
|
||||
|
||||
---
|
||||
|
||||
## Deviations and additions (as-built)
|
||||
|
||||
This spec describes the **Stage-0 single-user reader** (ADR-011). What actually shipped through
|
||||
v0.4.0 went further — Stage 1 (ADR-012) opened multi-user, and several UX features were added on
|
||||
top. Recorded here (append-only; the spec above is left intact) so intent and reality stay
|
||||
distinguishable.
|
||||
|
||||
| As-built feature | What it is | Why | Covered by |
|
||||
|------------------|-----------|-----|------------|
|
||||
| **Multi-user + RLS isolation** | Several Dex users per deployment; isolation enforced by Postgres RLS, not the single-subject allowlist of §6. | Maintainer opened Stage 1 ahead of the formal Stage-0 gate, with DB-enforced isolation as the guardrail that keeps it safe. | ADR-012; migration 003 (`6775e5f`, `f28fdc0`, `2ae66da`) |
|
||||
| **Registration gate** | A Dex subject with no `users` row is routed to `/register`, which creates the `users` row + a `user_identities` mapping. (§2 listed "sign-up / user CRUD" as a non-goal.) | Explicit registration is how a multi-user surface stays honest — no just-in-time row creation. | ADR-012; `f396e01` |
|
||||
| **Per-user YouTube web connect** | `/oauth/youtube/connect` → `/oauth/youtube/callback` stores a per-user refresh-token ref + a `video_connections` row. (The spec assumed a host-side `tapir auth` only.) | Multi-user means each user connects their own account from the browser. | ADR-006, ADR-012; migration 005 (`0c9531a`, `2aad79b`) |
|
||||
| **Account management** | `/account` page with **disconnect** and **delete account**; delete removes only Tapir-side state and leaves the Dex identity intact. (§2 listed isolation/CRUD as non-goals.) | A real account needs a way out; deletion semantics are deliberately Tapir-side only. | ADR-013; `22eafcf`, `c7624d9`, `17d5e8c` |
|
||||
| **Immediate web summarization** | A "Summarize" button (`POST /v/{id}/summarize`) runs the engine in a background goroutine inside `serve`; the page HTMX-polls `GET /v/{id}/status`. (§2 said "triggering runs from the browser … do NOT build".) | Reading a list you can't act on is half a product; on-demand summarize closes the loop without waiting for a batch `tapir run`. | ADR-012, ADR-014; `25215cb`, `8c6c7ca` |
|
||||
| **Charmbracelet tapir spinner** | An animated in-flight indicator (charm palette) shown while a summarize is processing; an honest "queued/waiting" state under rate-limiting rather than a stuck spinner. | The spinner must tell the truth when the timedtext endpoint rate-limits (429), not imply imminence. | ADR-014; `25215cb`, `a4aeb5e` |
|
||||
| **Auto/manual summarization mode** | Per-user `auto_summarize`; manual (default) lists new videos unsummarized and queues via `summarize_requested`; a mode toggle at `/account/summarize-mode`. | Control over compute/noise — only summarize what the user cares about. | migration 006 (`748d5eb`, `bdbdce7`, `3014ee0`, `a269d4a`) |
|
||||
| **Public landing page** | `/welcome` mounted **outside** the auth guard; unauthenticated `/` redirects there; logout returns there (not `/auth/login`). (The spec guarded everything except `/healthz` and `/auth/*`.) | A first-time visitor needs a public "what is this / get started" page before the login wall. | `d83943c`, `0fdf2f7`, `3a27bf1`, `d208110`, `8ca374e`, `f15f57f` |
|
||||
|
||||
The original Stage-0 goals (read summaries, record watch/skip/save actions, Dex login, GitOps
|
||||
deploy) still hold — these are additions over that base, not replacements. The architecture
|
||||
stance is unchanged: every item above is web-surface or store work; the engine/ports/sinks core
|
||||
was not modified (ADR-003).
|
||||
|
||||
Reference in New Issue
Block a user