Record permalinks
A link opens the record it names. #/app?type=comments&id=<uuid> opens that comment's View form; &mode=edit requests Edit. id and mode join the existing list params in the hash grammar, ride the login seed, and open through openEditForm. Close on a cold link shows the unscoped list — do not seed a scope the URL does not mention. id must not occupy or erase the scope dimension "Embedded child region" adds, and Best Link copies type + id only, never the current list scope. The label is "Best Link": the URL you hand someone, which is the clean hash here and /p/ once public pages exist. The address bar is the worse link whenever it carries list state.
One grade. A comment link does not open the parent post, expand a region row, or scroll. That was the dropped Grade 2 (2026-10-27): it latches the address bar to a record the screen may no longer show, and it fights the public-pages decision that a child gets its own URL. Reachability is clicks, not a smarter landing: the comment's post field is a link to the post, the region's "All N comments »" reaches the other comments, and the chip's × widens to every comment. Expand-and-scroll, if the paging cost matters, is a later Post MVP item — not a hook in this grammar.
A :target field on a View form renders as a link to the referenced record, built from a sibling "<field>-id" the record payload grows. The field's own value stays the display string, so list-cell filter chips are untouched, and list cells keep filtering. Ambiguous shapes fail closed and render as text: two :target fields aimed at one table, or a self-FK — a link that says "Mary" and opens John is worse than no link. A target type or row the viewer cannot see renders as text or the record error and leaks nothing. Markdown links the same hash; no special router. The expanded-region-row copy control waits on "Embedded child region".
Depends on "Row click replaces View/Edit icons" (DONE — the open choke point). No dependency on the embedded region. :frontend:backend: because the sibling id is a backend change.
Implemented per the plan. Backend (model.lisp, backend.lisp): :target fields grow a sibling "<field>-id" record key carrying the pristine UUID ([] when NULL) through the alias-global conversion exclusion, a target wire property on fe-fields, and a compile-time synthetic-key collision guard (:reference spellings included); the view SQL is untouched; self-FK / shared-target / cross-source shapes fail closed to text. Frontend (App.tsx, urlState.ts): id / mode join the hash grammar and the login seed; openEditForm went strict (mismatched type, nonexistent or inaccessible id, and read-only mode=edit rejected — no fallback to the supplied row); navigation fences per plan (generation clock, list sequence guard with synchronous commit-site invalidation, echo-replace rule with push precedence and the parked-history latch, the stale-envelope single type-key interactivity gate, navGen-fenced submit / delete / action refreshes); View-form FK links build from the sibling id while list cells keep filtering; Best Link copies the canonical URL. Fixture models/test/record-permalink-test.lisp, suite tests/record-permalink-tests.lisp (+ run-record-permalink-tests in tests/helpers.lisp), npm run test:url-state for the pure URL grammar.
Browser matrix (plan steps 36–38, runbook ~/workbench/record-permalinks-browser-matrix.org): Passes 1–3 fully green across admin / viewer / incognito windows, final pass 2026-11-01. Two findings along the way: (2026-11-04, fixed) returnToLanding's async /api/info continuation raced the settings auto-open effect — Cancel / Home from the auto-opened form reopened it and deadened Home; the suppression latch now arms synchronously on settings exit and resetListQuery clears it (frontend-only, rebuilt, no re-seed). (2026-11-01, pinned gap, not a failure) the self-FK display join is degenerate — suppression (b) exactly as the plan pins it; self-join aliasing stays Post MVP. Remaining exposure is the runbook's Part 4 only: the one-batch pending-cause orderings and the fixture-shape legs (guest login, no-view / no-edit / no-list types, markdown link, action-during-navigation) need scripted browser instrumentation or a shadow-model fixture — to be filed as new items if wanted.
Plan: record-permalinks-plan.org
- Slot
- 3800
- Status
- 60 Done
- Tags
- mvp, backend, frontend, blog
- Contributors
- Donnie, Rose, Kimi
- Plans
- Record permalinks, Record permalinks — implementation plan, Record Permalinks Implementation Plan