8000 Evolve cardbrick-py into a CardBrick-style Spanish study appliance by jmahmood · Pull Request #18 · jmahmood/CardBrick · GitHub
[go: up one dir, main page]

Skip to content

8000 Evolve cardbrick-py into a CardBrick-style Spanish study appliance - #18

Merged
jmahmood merged 1 commit into
masterfrom
claude/cardbrick-spanish-appliance-ww1san
Jul 4, 2026
Merged

jmahmood merged 1 commit into
masterfrom
claude/cardbrick-spanish-appliance-ww1san

Conversation

@jmahmood
@jmahmood jmahmood commented Jul 4, 2026
Copy link
Copy Markdown
Owner

Turn the proof-of-concept reviewer into a daily-use, child-safe study
appliance while keeping the original prototype (main.py review) intact.

New layers on top of the apkg -> SQLite -> py-fsrs -> pygame pipeline:

  • storage.py: versioned schema that migrates prototype DBs in place;
    adds suspended/buried card flags, an append-only review_log with
    before/after state snapshots, sessions, and child_profiles.
  • service.py: scheduler wrapper exposing get_due_cards / answer_card /
    undo_last_answer / bury_card / suspend_card with an injectable clock.
    Daily new/review caps are derived from the review log, so backlogs
    never flood the child and limits survive restarts; reviews queue
    before new cards; undo is an exact snapshot restore.
  • session.py: one-sitting runner with session card/time limits,
    intra-session learning-step requeue, and a concise summary
    (counts, pass rate, time, buried/suspended).
  • settings.py: JSON app settings with atomic writes.
  • app.py: controller-first state-machine UI (child start -> review ->
    summary; parent mode with .apkg import, category selection from Anki
    tags, daily limits, suspended-card recovery, 7-day progress, and
    study-direction toggle). Auto-play + replay audio with missing-audio
    fallback; SCALED logical 640x480 canvas; spec button roles
    (A=Good B=Again X=Easy Y=Hard, L=replay, R=bury, SELECT=menu,
    START=finish).
  • main.py: new default study command plus a profile command for
    CLI configuration; review, import, decks unchanged.
  • importer.py: per-card skip reasons and card timestamps.
  • tests/: 39 pytest cases covering daily limits (incl. backlog and
    midnight rollover with a fake clock), exact undo, bury/suspend, tag
    filtering, import, and crash/restart persistence.

Crash recovery: every answer commits log + state together; dangling
sessions are closed with aggregates on next boot.

Co-Authored-By: Claude Fable 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01X51wk4Xi1jmeu4Fddmsz3Y

Turn the proof-of-concept reviewer into a daily-use, child-safe study
appliance while keeping the original prototype (main.py review) intact.

New layers on top of the apkg -> SQLite -> py-fsrs -> pygame pipeline:

- storage.py: versioned schema that migrates prototype DBs in place;
  adds suspended/buried card flags, an append-only review_log with
  before/after state snapshots, sessions, and child_profiles.
- service.py: scheduler wrapper exposing get_due_cards / answer_card /
  undo_last_answer / bury_card / suspend_card with an injectable clock.
  Daily new/review caps are derived from the review log, so backlogs
  never flood the child and limits survive restarts; reviews queue
  before new cards; undo is an exact snapshot restore.
- session.py: one-sitting runner with session card/time limits,
  intra-session learning-step requeue, and a concise summary
  (counts, pass rate, time, buried/suspended).
- settings.py: JSON app settings with atomic writes.
- app.py: controller-first state-machine UI (child start -> review ->
  summary; parent mode with .apkg import, category selection from Anki
  tags, daily limits, suspended-card recovery, 7-day progress, and
  study-direction toggle). Auto-play + replay audio with missing-audio
  fallback; SCALED logical 640x480 canvas; spec button roles
  (A=Good B=Again X=Easy Y=Hard, L=replay, R=bury, SELECT=menu,
  START=finish).
- main.py: new default `study` command plus a `profile` command for
  CLI configuration; `review`, `import`, `decks` unchanged.
- importer.py: per-card skip reasons and card timestamps.
- tests/: 39 pytest cases covering daily limits (incl. backlog and
  midnight rollover with a fake clock), exact undo, bury/suspend, tag
  filtering, import, and crash/restart persistence.

Crash recovery: every answer commits log + state together; dangling
sessions are closed with aggregates on next boot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X51wk4Xi1jmeu4Fddmsz3Y
@jmahmood
jmahmood merged commit db99e72 into master Jul 4, 2026
1 of 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.

2 participants

0