# Simple Count Down

A stack of countdowns for a second screen or spare phone: add the times that matter today (12 am, lunch, a meeting) and each one shows its clock time, name, the countdown to it, and the time since your day started, with a progress bar. Live at `/simple-count-down` on the toolbox. Read `info.md` for the behavior as a visitor sees it.

## Layout

- `index.html`, `manifest.webmanifest`, `icons/icon.svg` — the page, with relative paths only so it works under `/simple-count-down/`.
- `assets/app.css` — all styling. Themes and colors are tokens on `:root`; the Stack and Focus views are sized by JavaScript, the rest by CSS.
- `assets/js/time.js` — pure time logic (day start, targets, sorting, formatting). No DOM, takes `now` as an argument, unit tested.
- `assets/js/model.js` — saved data: defaults, normalizers, load and save, import and export. Unit tested.
- `assets/js/ui.js` — tiny DOM helpers and icons. `h()` drops falsy children.
- `assets/js/main.js` — the main screen: top bar, the stack, the one-second update, and the stack layout.
- `assets/js/settings.js` — the `#/settings` sub-page.
- `assets/js/app.js` — boot, hash routing, saving, the add/edit dialog, full screen, wake lock.
- `tests/unit/` and `tests/e2e/smoke.mjs` — tests.

## Tests

```
node --test tools/public/simple-count-down/tests/unit/*.test.mjs
npm run dev    # in another terminal
node tools/public/simple-count-down/tests/e2e/smoke.mjs --shots <dir>
```

The end-to-end test needs Playwright. Look at the screenshots as well as the pass count.

## Ideas not built yet

- Installable offline use (a service worker) for the spare-phone case.
- A sound or flash at the moment a timer passes.
- Timers that repeat only on some weekdays.
- Dragging timers to reorder in Manual sort (there are arrows in Settings now).
- Cross-device sync, once the toolbox has an account system (see `BACKLOG.md` at the repo root).
