spaces: procedural covers for the home page and gallery cards - #448
Open
nyblnet wants to merge 1 commit into
Open
spaces: procedural covers for the home page and gallery cards#448nyblnet wants to merge 1 commit into
nyblnet wants to merge 1 commit into
Conversation
A page with no cover gets a generated one where the cover would go: a gradient plus one of six geometric figures, seeded from the page id in the new spaces/src/procedural.ts, drawn at render time and never written to the document. Only the home page and coverless gallery cards draw it — two hundred notes are not two hundred posters — and nothing procedural reaches paper or the file-manager thumbnail. A real cover always wins; a removed cover gets the procedural one back. The decision is one pure function so the model rig pins every branch; contrast was measured on rasterised pixels across 400 ids in both themes (card mark >= 4.29:1 light / 3.28:1 dark, disc glyph 9.94 / 9.30). Theme presets were asked for alongside this and are deliberately not built: doc.theme's colours are painted by nothing in the live app (ruled 2026-08-22), so a preset would change only the thumbnail. Recorded in docs/DECISIONS.md.
Build size
Updated: |
nyblnet
added a commit
that referenced
this pull request
Sep 12, 2026
Merges spaces-starter-merged (the PM and visual passes reconciled into one starter by a dedicated agent rather than by both-sides resolution, which had duplicated content) and spaces-visual (#448, procedural covers). Three append conflicts, no seams this time. A preview for testing, never a merge candidate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Procedural covers (bento/spaces)
A page with no
covergets a generated one where the cover would go — a gradient plus one of six geometric figures (orbs, bands, dot lattice, rings, facets, waves), seeded from the page id in the newspaces/src/procedural.ts. Render-time only: nothing is written to the document,coverabsent stays absent, an older build sees no cover, a saved file does not grow.Where it draws: the home page (
doc.home) and every coverless gallery card. Not every page — a cover is a 150–320px full-bleed band that lifts the icon into a disc, and on a space of two hundred plain notes that is two hundred posters. The gallery already tinted bare cards on an id-derived hue; this is that tint with a figure on it. Never on paper, never in the file-manager thumbnail (both passprinting: true).Rules: same id → same SVG (byte for byte); a real cover always wins; a removed cover gets the procedural one back; a remote cover (already refused by
coverSrc) counts as none.Measured on rasterised pixels over each theme's ground, 400 ids × all 8 hues × all 6 figures:
Shell: 277,769 → 279,181 B (+1,412), built side by side with
origin/main.Rig:
scripts/test-spaces-model.tsgains 15 checks on the generator and the decision function (949/949). Each gate was sabotaged in turn and failed exactly its own assertion: Math.random seed, constant seed, real-cover gate, home-only gate, printing gate, page-vs-card strength.Not verified here: phone width (the browser pane ignored
resize_window; the procedural cover shares.sp-cover's geometry with a real cover, which was verified on phones when covers shipped) and an actual print dialog (the gate is asserted in the rig, not observed on paper).Theme presets — deliberately not built
Asked for in the same brief. In this app
doc.theme.background/color/accent/fontFamilyare painted by nothing in the live app — onlypreview.tsreads the colours; onlymeasure/dirreach the reading column. That is the 2026-08-22 ruling (theme follows the reader; "if it ever changes it changes with the FORMAT"), and the cross-app dark-mode mechanism is an open maintainer question on the board. A "Dark" preset would change the thumbnail and nothing a reader can see; paintingdoc.themeonto the column is a ruling reversal, not a zone change. Written up indocs/DECISIONS.mdwith what an honest smaller version would be (typography presets).