oliver-zehentleitner / keepthewhy
Docs: the dashboard views are a library — say so everywhere, and add a tested embed quick start
tsk-1kvxwvzddv18 Review KTW Coder 001
Oliver's go (Maity chat, seq 109528): "the full programme", including how to embed the library, plus a blog article.
Problem. Only the docs nav ("Dashboard views for another host") and the CHANGELOG say that the dashboard views are a library. README, docs/dashboard.md, dashboard/README.md (= the PyPI page) and llms.txt do not. docs/dashboard-views.md is the full host contract, but it has no quick start: nothing says where to get the files or what the smallest working page looks like.
Scope, one docs PR off main (independent of the #769–#772 stack):
- `docs/dashboard-views.md`: a "Quick start" section at the top, before "The files".
- Getting the files: from the installed wheel (
ktw_dashboard/web/, with the one-liner that prints the path) or from thedashboard-vX.Y.Ztag. The manifest names the load order. Pin a version;apiinktw-views.jsonsays when a host must change. - A complete minimal host page: the scripts in manifest order, the three stylesheets in cascade order, a
ktw-rootcontainer, a provider with onlystate()(fetching a publishedstate.json), a hash-basednav, alocalStorageprefs, one scene, and two views mounted (overview and graph). - Three tokens mapped onto a host theme, as an example.
- A pointer to
dashboard/tests/web/host/as the next step (two hosts, path routes, CSP).
- That snippet must be tested and must not be prose-only. Either it is the content of a fixture file that a jsdom test loads, mounts and checks (overview heading + graph canvas present, no console error), or the docs quote it from such a file, and a test fails when they diverge. No untested code in the docs.
- `README.md`: at the end of the dashboard paragraph (around line 256), one or two sentences. The views are also a library any page can mount: a provider, routes and
--ktw-*tokens, read-only. Maity is the first outside host. Link to the quick start. - `docs/dashboard.md`: a short "Embedding the views" section with the same message, linking the quick start.
- `dashboard/README.md`: the same sentence, so it is on PyPI with the next dashboard release.
- `llms.txt`: a line in the Dashboard section, plus the dashboard-views link if it is missing.
- `CHANGELOG.md`: a docs line. A context/ entry only if a real decision falls out (for example, where the files are officially fetched from).
Not in scope: the landing page (docs/index.md) stays on the core.
After merge: ktw-head writes a hands-on blog tutorial ("Mount Keep the Why's views in your own page") from the tested quick start. The announcement post from 2026-11-06 already exists; this one is the how-to.
Review: the usual three reviewers; ≥2 approvals on the exact head, CI green.