Files and attachments for the backlog model
Motivation: a logo on the backlog app (Donnie's ask), with item attachments as the natural extension.
Add to models/backlog.lisp, following the Model Bank :images pattern (models/modelbank.lisp): a :files type — fs-backed leaf (:tree t :is-leaf t :parent-type :directories :fs-backed t), :file upload field, :name identity field with :path t, :widget :file-path, :directory-type :directories — plus the :directories type it structurally requires (fs-backed non-leaf tree, self-parented). Both behind the admin category (:category :system, the :pages precedent). The logo row is inserted with the public role (the items pattern) so it serves to guests through /p/files/. An :attachments M2M field on :items (:widget :image-list, join table, source :agg :distinct) turns items into attachment hosts.
The logo renders through the built-in :styling type: a banner row whose <img> src is the file's site-absolute /p/files/<type>/<path> URL (the styling grammar's only legal img source). The banner already replaces the SPA header's h1 and the public pages' site header — no frontend work. Display of non-image files rides "File-aware image widgets" (adjacent in the queue, ahead of this item) — a soft dependency: the logo works without it; non-image attachments degrade to a broken grid icon with working lightbox anchors until it lands.
Scope also includes documenting the recipe in docs/model-reference.md: directories + an fs-backed file type under admin is the standard logo/attachments shape — the built-in :styling banner grammar requires an fs-backed type for any img, so most models wanting a logo want these types. Production model with live data: additive types, the heal-model / migration.md path. Known gap: file update is unimplemented, so replacing an uploaded file means delete + re-add.
- Slot
- 7543
- Status
- 10 Open
- Tags
- mvp, model
- Contributors
- Donnie, Rose