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 read. The
/p/record path isguest-record→be-rec→rec, andrecbuilds its SQL from:views :main :sql(lisp/backend.lisp). A page compiles with no table and no views; its row is reachable only throughpage-be-list, which reads the compiled:page-table/:page-columns/:page-where/:page-params.record-timestampshas the same hole — it queries:table-namedirectly, and a page has none. - The URLs. A page is not record-addressable; its address is the tab. The type index,
/p/<type>/<uuid>, and the per-type feed are all the wrong shape for it.
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.
- URL. (
/p/<page>/is the page document itself;/p/<page>stays a 301 to it;/p/<page>/<uuid>and/p/<page>/rss.xmlare 404.) - Eligibility. (A
:guest-allowedmodel 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:scriptstays 404.) - 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.) - Head. (
og:typewebsite, a canonical, a description from the markdown body's plain text,WebPageJSON-LD, and noarticle:times, author, feed link, or visible meta line — the SPA page body shows none. No<lastmod>in the sitemap unlessrecord-timestampslearns the page table.) - Body. (The page's
:view-formin form order, mirroring the SPA page body inweb/src/App.tsx: the:headingfield is theh1, 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:textareaand:codefields<dl>rows or preformatted blocks, and does the:stylingheadingslot reach the publich1?site-chromereads onlybannerandfootertoday, while the SPA lifts that slot's style onto the page headline. - Wire. (Does the page's one record in
/api/listcarrypublic-url?) The decorators do a row-level guest check on the content row, which the guest may not hold, so this cannot ride on wideningpublic-type-p— it needs its own branch or a no. - Frontend — unknown. The item carries the
frontendtag, but/p/is server-rendered and the only SPA surface found is the Public Link control (copyBestLinkin 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