diff --git a/.gitignore b/.gitignore index ae6134c..fa6b585 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ target/ *.sqlite out/ .env +dev/ +node_modules/ diff --git a/docs/plans/briefs/web-dashboard-v2/00-shared.md b/docs/plans/briefs/web-dashboard-v2/00-shared.md new file mode 100644 index 0000000..da00dd7 --- /dev/null +++ b/docs/plans/briefs/web-dashboard-v2/00-shared.md @@ -0,0 +1,188 @@ +# Shared brief — web dashboard v2 (design pass + fixes) + +The web site and operator dashboard planned in `docs/plans/2026-09-03-web-dashboard.md` +is implemented and deployed (see `docs/plans/briefs/web-dashboard/handoff-step*.md`). +This second pass, requested by the operator on 2026-09-03, does six things: + +1. Replaces the hand-written `src/web/static/app.css` with a **Tailwind CSS v4** + setup and a fresh, more refined design that keeps the simple newspaper feel. +2. Adds a **light/dark theme** that follows the system by default and can be + overridden by the reader (persisted in `localStorage`). +3. **Public** issue pages now show each article's AI summary and its + "Why it's here" line (a deliberate reversal of plan §7.1's "no generated text"; + article bodies, The Brief, the World Briefing and comments stay private). +4. Signed-in issue pages get a **table-of-contents sidebar** (chapters = articles) + that collapses into a hamburger menu on mobile and shows where the reader is. +5. Signed-in issue pages always offer the **World Briefing** and **Behind the paper** + chapters, including for issues published before `issues.issue_json` existed. +6. The **Colophon** on those legacy issues shows real numbers instead of zeros. + +Items 5–6 have one root cause: `web::issue::load` falls back to a reduced +`Issue` (default `Colophon`, no `world_briefing`, default `BehindThePaper`, +`from_json == false`) whenever `issues.issue_json` is NULL — which is every +issue published before migration `0004_web.sql` ran (2026-09-03). + +Each step below has its own brief (`01`…`04`). Read the original plan's §4, §7, +§8 and §16 and `docs/plans/2026-08-15-implementation-notes.md` for conventions: +runtime sqlx queries with manual row mapping, `jiff` timestamps, `thiserror`/`anyhow` +errors, askama 0.16 templates, no network in tests, rustfmt defaults, no `unwrap()` +outside tests. + +## Ground rules + +- You work in the git worktree named in your brief. **Never touch the main + checkout** at `/home/thallada/workspace/the-daily-epub`. Finish by committing + **one** commit on your worktree's branch (message prefix `Web dashboard v2 step N:`). +- Do not edit migrations. Do not change routes, auth, or the security headers + (`web::security_headers`) — in particular the CSP stays + `default-src 'self'; img-src * data:; style-src 'self'; script-src 'self'; …`, + so **no inline `