Skip to content

feat: generate README screenshots from the build - #53

Merged
ReinaldoAssis merged 4 commits into
mainfrom
feat/readme-screenshots
Oct 23, 2026
Merged

ReinaldoAssis merged 4 commits into
mainfrom
feat/readme-screenshots

Conversation

@ReinaldoAssis

Copy link
Copy Markdown
Owner

Why

The README still had placeholders for the logo, banner and screenshots, and manual captures would drift and mix languages. This adds a reproducible harness and wires the generated assets into both READMEs.

What

  • npm run shots (tools/shots.mjs): builds the static app if needed, serves it, drives headless Chrome over CDP (no new dependency), boots test mode in English and captures time, notes, finances (desktop) plus dashboard and habits (mobile).
  • Composes the 1600×640 banner (time desktop + habits mobile, blurred, wordmark) and the 512×512 typographic logo from the same run.
  • Localizes demo fixtures through demo_* message keys so test mode follows the UI language; adds habit history and a richer sample note.
  • Fixes remaining hardcoded Portuguese weekday/month labels in the planner, dashboard and habit strips.
  • Replaces README placeholders with the logo, banner and a desktop/mobile gallery.

Verification

  • npm run check — 0 errors
  • npm test — 284 tests passed
  • npm run build — ok
  • npm run csp:check — 23/23 checks ok
  • npm run shots — 5 screenshots + banner + logo regenerated and visually checked

Notes

  • Needs Google Chrome on the machine (ATLAS_CHROME overrides the path).
  • The harness uses the test database/localStorage; real data is never touched.

- The planner, dashboard heat strip and habit week strip still used
  hardcoded Portuguese abbreviations in the English UI.
- Build the labels from the active locale (Intl for month/weekday names)
  so range headers and day initials follow the language switch.
- Test mode seeded Portuguese habits, transactions, notes and graph nodes
  even when the interface was in English, so screenshots and manual QA
  mixed languages.
- Move the demo copy to `demo_*` message keys in both catalogs and read
  them through Paraglide, the same pattern already used by categories and
  domains.
- Add habit history and a richer sample note so the test database shows
  streaks, a completed day goal and a meaningful note preview.
- The README needs desktop and mobile images that stay reproducible and
  never touch real data.
- `npm run shots` checks/builds the static bundle, serves it locally and
  drives headless Chrome over CDP (same approach as the CSP harness, no
  new dependency).
- Boots test mode with the English UI, navigates the app, hides dev-only
  chrome and captures the five states, then composes the 1600×640 banner
  and the 512×512 typographic logo.
- Replace the image placeholders with the logo, banner and the five
  screenshots produced by `npm run shots`.
- Group the gallery as a desktop row (time, notes, finances) and a mobile
  row (dashboard, habits), with localized captions in both READMEs.
- Point the docs index at the versioned `docs/assets/` directory.
@ReinaldoAssis
ReinaldoAssis merged commit f16a2b1 into main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant