Shell: one-shot #spec-<payload> link consumed at startup

This commit is contained in:
2026-07-04 19:42:42 +03:00
parent e4ff442219
commit 194177c0c5
5 changed files with 86 additions and 28 deletions
+10 -8
View File
@@ -51,14 +51,16 @@ picks a dataset itself when any exist, so the derived view immediately
self-corrects to the `dataset-build` form.
**One-shot action links are not view states.** A hash form that _requests an
action_ (`#example-<id>`: add that gallery example and open it — spec §01E)
stays out of the `ViewState` union: it is parsed by its own function in
`url-hash.ts`, consumed once at startup (`orchestration/startup.ts`, after
persistence wiring so the created record write-throughs, before `startRouting`),
and then routing's settle step replaces the hash with the resulting view. It
never serializes back and never participates in Back/Forward; `parseHash`
degrades it like any unknown hash. Any future action link (e.g. a spec-payload
link) follows the same shape rather than growing the view-state union.
action_ `#example-<id>` (add that gallery example) and `#spec-<payload>` (add
the spec carried in the payload; `@core/spec-link` owns the base64url encoding,
shared with the learn pages that build such links) — stays out of the
`ViewState` union: each is parsed by its own function in `url-hash.ts`,
consumed once at startup (`orchestration/startup.ts`, after persistence wiring
so the created record write-throughs, before `startRouting`), and then
routing's settle step replaces the hash with the resulting view. Action links
never serialize back and never participate in Back/Forward; `parseHash`
degrades them like any unknown hash. Any future action link follows the same
shape rather than growing the view-state union.
### 1.2 The adapter: `infrastructure/url-hash.ts`