Skip to content

Bookmarkable URLs: #app/<token>, sealed under a user route key - #178

Merged
lannbot merged 3 commits into
mainfrom
routing/bookmarkable-fragment
Sep 8, 2026
Merged

Bookmarkable URLs: #app/<token>, sealed under a user route key#178
lannbot merged 3 commits into
mainfrom
routing/bookmarkable-fragment

Conversation

@lannbot

@lannbot lannbot commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

The page fragment gains one grammar, app/<token>, so "this app, here"
can be bookmarked. The token is deterministic AES-256-GCM (SIV-style
nonce) over install-id ‖ route, zero-padded to 256 bytes, under a
user-level route key: equal state is equal URL, the route is unreadable
off the page, and a route that decrypts is one this user's visor wrote.

  • engine: a visor-owned document rides the app-document machinery under
    the reserved id polyvisor:visor (keyhive-sealed, synced, checkpointed
    for free) and holds the route key and the install table.
  • kernel: route.rs owns grammar and crypto; apps.route-encode /
    route-decode in internal.wit; no new dependencies.
  • glue: shell.open-frame(session, route) writes the fragment
    (replaceState only), close-frame clears it, and the frame serves
    polyvisor:app/route locally, relaying set for the glue to encode.
  • visor: consumes shell.fragment once per page load, after unseal.
  • TodoMVC keeps its filter in the route.
  • docs/design.md "Routing" records the construction, the accepted
    residual channel (update timing and state equality), and why sharing
    is foreclosed here by construction.

e2e: bookmark-round-trip; reload-with-app-open sites now wait for the
fragment restore instead of pressing Open.

Gates: just ci green; just e2e 18/18 (new: bookmark-round-trip).

Automerge is armed.

…der a user route key

The page fragment gains one grammar, `app/<token>`, so "this app, here"
can be bookmarked. The token is deterministic AES-256-GCM (SIV-style
nonce) over `install-id ‖ route`, zero-padded to 256 bytes, under a
user-level route key: equal state is equal URL, the route is unreadable
off the page, and a route that decrypts is one this user's visor wrote.

- engine: a visor-owned document rides the app-document machinery under
  the reserved id `polyvisor:visor` (keyhive-sealed, synced, checkpointed
  for free) and holds the route key and the install table.
- kernel: `route.rs` owns grammar and crypto; `apps.route-encode` /
  `route-decode` in internal.wit; no new dependencies.
- glue: `shell.open-frame(session, route)` writes the fragment
  (`replaceState` only), `close-frame` clears it, and the frame serves
  `polyvisor:app/route` locally, relaying `set` for the glue to encode.
- visor: consumes `shell.fragment` once per page load, after unseal.
- TodoMVC keeps its filter in the route.
- docs/design.md "Routing" records the construction, the accepted
  residual channel (update timing and state equality), and why sharing
  is foreclosed here by construction.

e2e: bookmark-round-trip; reload-with-app-open sites now wait for the
fragment restore instead of pressing Open.
@lannbot
lannbot enabled auto-merge September 8, 2026 01:23
@lannbot
lannbot merged commit 8237562 into main Sep 8, 2026
2 checks passed
@lannbot
lannbot deleted the routing/bookmarkable-fragment branch September 8, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants