Data UI Backlog

Public p rendering for page types (C)

Drafted 2026-11-29 from the code and docs — the item was a bare title. Everything under "Decisions still to make" is a default, not a ruling; change any of them by editing this description.

The ask. Give a page type (:page t, an editable content page: About, Home, the style guide) a crawlable, script-free document under /p/, the way a guest-readable row type already has one.

Where it stands. Page types are shut out of /p/ on purpose: public-type-p (lisp/public-pages.lisp) excludes :phase-a-shape :page, and docs/model-reference.md → Page types → Runtime closes with "crawlable rendering of a page is a later item". This is that item. In production, backlog.demo.data-ui.com/p/ lists Items, Tags, States, and Authors, while /p/about/ and /p/pages/ are both 404. The backlog's own :about (models/backlog.lisp) declares :type-roles ("public"), so that prose has no anonymous URL. SceneBook (models/scenebook.lisp, :guest-allowed t) has the same shape: :home and :about are public and :script is reader/editor only.

Why the existing path does not fit.

The design point. public-type-p is the one eligibility predicate behind routing, the root index, the footer, the sitemap, the feed, the guest reads, and both :public-url decorators. Pages must be admitted to the first four and stay out of the rest, so the predicate splits (a sibling, say public-page-type-p) rather than widens. Beyond that the backend work is one render function and its route arms.

Decisions still to make. The default is in parentheses.

  1. URL. (/p/<page>/ is the page document itself; /p/<page> stays a 301 to it; /p/<page>/<uuid> and /p/<page>/rss.xml are 404.)
  2. Eligibility. (A :guest-allowed model plus guest read on the page's own type resource, and no row check on the content row — the API rule that a page is public by projection. SceneBook's :script stays 404.)
  3. No content row matches the page's :filter. (404, not a 200 "not written yet", and left out of the sitemap, which must not advertise a URL that 404s — so the sitemap render runs each page's query once.)
  4. Head. (og:type website, a canonical, a description from the markdown body's plain text, WebPage JSON-LD, and no article: times, author, feed link, or visible meta line — the SPA page body shows none. No <lastmod> in the sitemap unless record-timestamps learns the page table.)
  5. Body. (The page's :view-form in form order, mirroring the SPA page body in web/src/App.tsx: the :heading field is the h1, with the type label when the page declares none; markdown goes through the existing walker; the scalar widgets — :textbox, :checkbox, :stars, :select — render as a labelled <dl>.) Two open questions inside this one: are :textarea and :code fields <dl> rows or preformatted blocks, and does the :styling heading slot reach the public h1? site-chrome reads only banner and footer today, while the SPA lifts that slot's style onto the page headline.
  6. Wire. (Does the page's one record in /api/list carry public-url?) The decorators do a row-level guest check on the content row, which the guest may not hold, so this cannot ride on widening public-type-p — it needs its own branch or a no.
  7. Frontend — unknown. The item carries the frontend tag, but /p/ is server-rendered and the only SPA surface found is the Public Link control (copyBestLink in the view-form button row), which the page tab does not render — the page body branch replaces the record surfaces. Is the intent a copy-link control on the page tab, or something else?

Also in scope. Docs: docs/model-reference.md → Page types → Runtime and → Public pages, plus docs/rest.md if the wire key changes. Tests: tests/public-pages-tests.lisp (it already holds the renderer, route, wire, and live-HTTP suites) against a fixture that has both a public row type and a page; the page fixtures are in models/test/page-type-test.lisp.

Slot
7188
Status
10 Open
Tags
mvp, backend, frontend, docs, blog
Contributors
Donnie