feat(layouts): two more ready-made page backgrounds - #64
Conversation
Summary: - add two ready-made page backgrounds to the layout background picker, built only from locked rectangles and circles - show the picker as a two-column grid so four options stay readable - derive the analytics background_id from BackgroundPresetId so it cannot drift from the offered presets - cover the new presets with unit and end-to-end assertions and add before/after evidence for issue 63 Rationale: - organizers previously had one decorated starting point, so pages were either bare or repeated the same collage - both presets are axis-aligned: the browser rotates shapes around their top-left corner and the PDF export around the bottom-left, so rotation-free compositions print the way they preview - rules are thin filled rectangles rather than stroked outlines because the PDF renderer paints a "transparent" fill as black - every element stays inside the media box, so neither preset triggers a bleed warning Tests: - bun run format:check, lint, typecheck - bun run test (216 passed) - SAKEKEEP_E2E_PORT=3100 bun run test:e2e (20 passed, 2 skipped) - bun run build, docker compose config, check-production-compose Related to #63 AI-Assisted-By: Codex AI-Assisted: true AI-Agent: claude-code AI-Model: anthropic/claude-opus-5
|
CI on this branch fails at To prove this change itself is green, I pushed a throwaway branch with this commit plus #61's fix and ran full CI on it: https://github.com/patriksimms/sakekeep/actions/runs/32188127162 — This PR will go green on its own once #61 lands on |
|
Merged That fixed the original failure. CI now clears the steps that previously blew up — It now stalls on the next step, Full Leaving the reruns in flight. If the runners keep hanging, worth considering a |
Problem
Organizers had one decorated starting point when creating a page layout, so books were either bare pages or the same geometric collage repeated.
Solution
Two more backgrounds in the "Choose a background" dialog:
Both are locked, axis-aligned rectangles and circles only, so they preview and print identically and can be unlocked like the existing collage. The picker moved to two columns so four options stay readable, and the analytics
background_idnow derives fromBackgroundPresetIdinstead of a hand-kept union.Two constraints shaped the shapes, both noted in code:
transparentfill as blackEvery element stays inside the media box, so neither preset triggers a bleed warning.
Evidence
Before and after of the background picker, plus both new pages at full size, are in
visual-artifacts/issues/63/.Validation
bun run verifyequivalent run locally: format check, lint, typecheck, 216 unit tests, 20 e2e (2 skipped), build, compose checks.No configuration outside the repository is required.
Closes #63
Changes made with Claude Code (harness) using Claude Opus 5 (1M context).