Skip to content

Web: surface new uploads, timezone-aware streak, ink-on-paper redesign - #8

Merged
watchmesink merged 2 commits into
codex/flashcards-sm2pp-uploadfrom
web/scheduler-streak-ink-paper
Sep 5, 2026
Merged

watchmesink merged 2 commits into
codex/flashcards-sm2pp-uploadfrom
web/scheduler-streak-ink-paper

Conversation

@watchmesink

Copy link
Copy Markdown
Owner

What

Three changes to the flashcards web app, found while debugging "my uploaded words never show up":

1. New uploads now appear in the very next batch

The ring scheduler walks the deck in file-name order and a batch only completes when every card is rated Easy — cards from a fresh upload sat up to a full rotation away. Verified against live data: 147 German cards (every summer upload) had never been shown once, some ~38 completed batches behind the pointer.

Each new batch now reserves up to half its slots for never-reviewed cards from the newest files (by file mtime). The ring pointer advances only past ring cards actually consumed, so no card is skipped. Fresh decks batch exactly like the firmware; progress state stays byte-compatible with the device bin.

2. Timezone-aware, honest streaks

Study days were counted in server UTC (day flips at 02:00 in Berlin), so studying after midnight created phantom gap days; and a lapsed streak kept displaying its stale value until the next rating silently reset it to 1. Now: the server counts days in STREAK_TZ (env, IANA name; already set to Europe/Berlin on Railway), the offline PWA uses the browser's own calendar, and a lapsed streak reports 0.

3. Ink-on-paper redesign

Applied the design process from Lenny's Newsletter "How to turn your AI into a world-class designer" (Anshu Chimala): pick a specific identity instead of AI defaults, then cut the tells. The app mirrors an e-ink reader, so the UI is set like a page — serif headwords (system Iowan/Palatino stack), mono device-status labels, hairline rules instead of nested cards, letterpress keys, one oxblood accent, warm paper + night themes. Removed eyebrow labels, the three-color button row, pill badges, flag emoji, and container-in-container layout; copy rewritten by hand. Service-worker cache bumped to v5 so installed PWAs update.

Testing

  • node test/test.js: 26 pass (23 existing + 3 new: newest-first top-up, firmware parity on fresh decks, explicit-day streak).
  • Byte-identical round-trip of the production German progress bin through the codec.
  • Full-flow smoke on a local server with production deck data (rate → streak → next card), plus light/dark screenshots of every screen.
  • Deployed to Railway from this branch and verified live.

🤖 Generated with Claude Code

watchmesink and others added 2 commits September 5, 2026 22:56
Uploaded words never appeared: the firmware-mirror ring batch walks the whole
deck in file-name order and a batch only completes when every card is rated
Easy, so cards from a new upload sat up to a full rotation away (weeks on a
~600-card deck; verified against live data — 147 German cards had never been
shown). Each new batch now reserves up to half its slots for never-reviewed
cards from the newest files (by file mtime); the ring pointer advances only
past ring cards actually consumed, so nothing is skipped. Fresh decks batch
exactly as before, byte-compatible progress state.

Streaks counted days in server UTC and kept displaying a stale run after it
lapsed. Study days now use STREAK_TZ on the server and the browser's own
calendar in the offline app, and a lapsed streak reports 0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The app mirrors an e-ink reader, so the UI is now set like a page: serif
headwords on paper (system Iowan/Palatino stack), a mono face for device
status, hairline rules instead of nested cards, letterpress-style keys, one
oxblood accent, warm paper + night themes. Removed the AI-default tells:
eyebrow labels, three-color button row, pill badges, flag emoji, container-
in-container layout. Copy rewritten by hand. Service worker cache bumped to
v5 so installed PWAs pick the new shell up.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@watchmesink
watchmesink merged commit a0bccde into codex/flashcards-sm2pp-upload Sep 5, 2026
1 of 6 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