Read-only record view form
Implemented per view-record-plan.org — frontend-only, web/src/App.tsx (2026-09-24):
formViewingstate:openEditForm(record, viewing)sets it alongsideeditRecord; everysetEditRecord(reset site clears it (closeForm,changeType,switchViewMode,resetSessionState, the Add button handler).submitFormhas a defensiveif (formViewing) return.- View mode renders every field through
renderReadOnlyField(image grids + lightbox, static stars, formatted text);password/file/button/hiddenfields are skipped (nothing displayable). Status companions render through their own read-only branch. - New
code/textarearead-only branches withpre-wrap(monospace forcode) — newlines survive, modelbank's:modelis the point. Blast radius on existing read-only fields of those shapes: empty (no demo model had one). - Stars read-only handles array values (write-through rating as
[]for a raterless viewer) — renders the em dash, not NaN. - Action column: eye (👁 View, always) + pencil (✏️ Edit, gated on
data.result.update), both icon links withtitle/aria-labeland no row-click handler (cell text stays selectable). The column header is now unconditional — guests gain it. - Form chrome in view mode: heading
View {type-key}, a single Close button top and bottom (reuseshandleCancel; settings mode returns to landing). - Settings auto-open routes on
data.result.update— read-only users get the view form, not a doomed Update button. - Rollup fallback: when the list payload has no
update-form(rollup types), the view form readslist-formfield meta. Note:/api/itemis 400 on rollup types server-side ("only list reads supported"), so the view form falls back to the list record — populated, minus nothing the list already carried. The 3s status poll mirrors the same form choice.
web/dist rebuilt (index-BaxhfZNq.js); demo units
dataui@modelbank / @books / @todos restarted and serving it;
verified live on https://modelbank.demo.data-ui.com as guest
(eye link, model source with newlines via /api/item, 12 images,
guest flags all false, no pencil). No Lisp changes; no API
changes. Deviation from plan: none material — the rollup fallback
quietly degrades to the list record because /api/item rejects
rollups; noted above.
Plan: view-record-plan.org (complete <span class="timestamp-wrapper"><span class="timestamp">[2026-09-23 Wed]</span></span>; awaiting go-ahead).
- Slot
- 28100
- Status
- 60 Done
- Tags
- mvp, frontend, polish
- Contributors
- Donnie