docs: reconcile the docs with the code after wave 1
An independent review checked every factual claim in the docs against the code at22d43b2, after eight PRs landed in one wave. This applies its replacement text. context/repo-map.md - gotcha 44 rewritten: the cache DOES frame the grid now (improvise-anr9, AxisFrame/FrameEntry/header_level_widths). The surviving half — the TUI builds at offsets zero, so a cache position is absolute — is kept, because four code comments cite gotcha 44 for exactly that. - gotcha 45: ClientFrame::Save exists (improvise-368h); MarkDirty is gone and dirtiness is read off EffectKind::Model(_); Rc<T>: Storage lives in improvise-io (improvise-hmws); OpfsFs::list joins dir (improvise-vhcz); OpfsFs is run by harness/ and bindings.rs is now the dark corner. - gotcha 47: Host::commands answers the frame whole (improvise-955n); the open hole is clause 4, not a per-command Checked. set_viewport "must" -> "does". - gotcha 43: the frame, not the command, is what is answered; two of three tiers hoist. - gotcha 21 widened: three effects abort, and tidy-up goes at the head. - gotcha 48: web/app.js is executed by harness/tests/shell.spec.js; improvise-m18f -> improvise-taxx (fixed); the open half is improvise-xps8. - gotcha 42: the never-rendered / improvise-hwpi sentence pair deleted. - gotcha 18: live_records and analyze_records are both decided now. - gotcha 1: the records columns are [coords…, +cat, measures…, +]. - AppMode is 17 variants, ModeKey is 17, eight text-entry modes; the keymap table moved to improvise-protocol/src/keymap.rs (six references). - the Wasm section: the mirror is gone; the wasm gate covers eight crates. - the File Inventory regenerated rather than patched (57/79 rows were stale); the duplicate ws-server/host.rs collapsed to a pointer at the 23-line shim; harness/, protocol keymap.rs/viewmodel.rs, improvise-gp fit.rs/dataset.rs, cmd/fit.rs, model/record.rs and the integration tests added. - the suite speed re-measured rather than re-asserted. README.md — the four "no browser here" sites narrowed to what is still true; 17 modes; the browser section names the Playwright harness. AGENTS.md — the dead-ID audit recipe was itself defective: two paths, a character class blind to a commit SHA, and a two-name exclusion list. Widened, made runnable under the worktree shell guard, and its own prose no longer spells any id. prolog-sessions/kb.pl — seven invariants replaced in place (they were false), five location/3 facts re-sited plus three new, six doctrines and seven invariants added. doctrine 48->54, invariant 44->51, decision 47 unchanged, location 31->34. kb_consistent passes. Comment-only Rust changes: a duplicated sentence in worker.rs, records_columns' doc omitting NewCategory, improvise-709f2df -> commit709f2df, and three more copies of "OpfsFs has never been run". cargo test --workspace: 1309 passed, 0 failed, 2 ignored — unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -199,6 +199,14 @@ To run the same page locally:
|
||||
python3 -m http.server 8080 --directory web
|
||||
```
|
||||
|
||||
The page and the OPFS backend are exercised by a Playwright harness in
|
||||
`harness/` — `npm ci` and `./harness/build.sh`, then `npx playwright test` from
|
||||
that directory. `tests/shell.spec.js` runs `web/app.js` under Chromium against a
|
||||
mocked peer; `tests/opfs.spec.js` runs the `Storage` contract against a real
|
||||
`OpfsFs` in a real Web Worker under Chromium and Firefox (WebKit provides no
|
||||
OPFS and is skipped on a runtime probe). CI's `browser` job runs both and can
|
||||
fail the build.
|
||||
|
||||
To open a document hosted by a separate process instead — which is how a
|
||||
document open in the TUI is shared — start the websocket server and pass
|
||||
`?ws=`:
|
||||
@@ -232,7 +240,8 @@ from a public-network origin to a loopback or private-network address behind a
|
||||
permission prompt; per Chrome's own documentation WebSockets were **not yet**
|
||||
covered when the prompt began shipping, with coverage planned, so whether a
|
||||
given browser and version gates *this* socket is not something this project can
|
||||
state — and there is no browser here to test it in. Two gaps are structural
|
||||
state — and nothing here can test it: the Playwright harness serves a loopback
|
||||
origin, so Local Network Access never engages in it. Two gaps are structural
|
||||
rather than version-dependent: it is a Chromium feature, so other browsers need
|
||||
not behave the same; and it only engages for a **public** origin, so the
|
||||
locally-served page this section is about is outside it entirely.
|
||||
@@ -310,8 +319,8 @@ So the honest controls are the ones that need **no credential from the page**:
|
||||
own hostname, which the handshake then carries by itself; so it needs the
|
||||
user to visit that hostname first, and it is
|
||||
subject to the browser's third-party-cookie rules. Plausible and *not
|
||||
verified here* — there is no browser in this repository — so it is named, not
|
||||
written out as a recipe.
|
||||
verified here* — the Playwright harness mocks its peer and reaches no
|
||||
identity-aware proxy — so it is named, not written out as a recipe.
|
||||
|
||||
What would make this genuinely easy is a **token in the URL**, because the URL
|
||||
is the one place the page can put a credential *deliberately* — everything else
|
||||
@@ -352,7 +361,8 @@ caddy run # terminates TLS, proxies to
|
||||
```
|
||||
|
||||
On the same terms as the browser caveat below: **this configuration has not
|
||||
been executed in this repository** — there is no Caddy and no browser here. It
|
||||
been executed in this repository** — there is no Caddy here, and the browser
|
||||
harness that does exist never puts a proxy in front of the socket. It
|
||||
is the form Caddy documents for `remote_ip`, and the reasoning about what a
|
||||
browser can satisfy is checked against `web/app.js`, which opens
|
||||
`new WebSocket(url)` and can therefore send no header. Verify the deny actually
|
||||
@@ -412,10 +422,10 @@ binary whose job is a pivot table". If sharing a TUI-hosted document to a
|
||||
remote browser ever becomes a common case rather than an occasional one, this
|
||||
is worth revisiting on that evidence.
|
||||
|
||||
Caveat worth stating plainly: **no line of the browser JavaScript has ever
|
||||
run.** There is no browser and no headless DOM in the development environment,
|
||||
so `web/app.js`, `web/worker.js` and the OPFS backend are compile-checked,
|
||||
syntax-checked and read, never executed.
|
||||
Caveat, narrowed: `harness/` runs `web/app.js` under Chromium and `OpfsFs` under
|
||||
Chromium and Firefox, in CI. What is still never executed is `bindings.rs`, the
|
||||
grouped and multi-level DOM, the CSS and the `ResizeObserver` arithmetic — and
|
||||
Safari, whose Playwright build provides no OPFS at all.
|
||||
|
||||
## What's interesting about the architecture
|
||||
|
||||
@@ -426,7 +436,7 @@ things that mutate app state, and each one is a small, debuggable struct.
|
||||
This means commands are testable without a terminal, effects can be logged or
|
||||
replayed, and the 40+ commands and 50+ effect types are all polymorphic —
|
||||
dispatched through trait objects and a registry, not a central match block.
|
||||
The keybinding system gives each of the 14 modes its own keymap, with
|
||||
The keybinding system gives each of the 17 modes (`ModeKey`) its own keymap, with
|
||||
Emacs-style prefix keys for multi-stroke sequences.
|
||||
|
||||
## Expectations
|
||||
|
||||
Reference in New Issue
Block a user