Trey t 8e1c9b6bf1 Make textbook data self-heal after widget schema wipes
Root cause of the repeatedly-disappearing textbook: both widget timeline
providers were opening the shared local SwiftData store with a schema
that omitted TextbookChapter. On each widget refresh SwiftData
destructively migrated the store to match the widget's narrower schema,
dropping the ZTEXTBOOKCHAPTER rows (and sometimes the table itself).
The app then re-created an empty table on next open, but
refreshTextbookDataIfNeeded skipped re-seeding because the UserDefaults
version flag was already current — leaving the store empty indefinitely.

Three changes:

1. Widgets (CombinedWidget, WordOfDayWidget): added TextbookChapter to
   both schema arrays so they match the main app. Widget refreshes will
   no longer drop the entity.

2. DataLoader.refreshTextbookDataIfNeeded: trigger now considers BOTH
   the version flag and the actual on-disk row count. If rows are
   missing for any reason (past wipes, future subset-schema openers,
   corruption), the next launch re-seeds. Eliminates the class of bug
   where a version flag lies about what's really in the store.

3. StoreInspector: reports ZTEXTBOOKCHAPTER row count alongside the
   other entities so we can confirm state from logs.

Bumped textbookDataVersion to 12 so devices that were stuck in the
silent-failure state re-seed on next launch regardless of prior flag
value.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 23:31:14 -05:00

Conjuga

A Spanish verb conjugation learning app for iOS. Practice all 20 tenses with spaced repetition, handwriting recognition, and vocabulary courses.

Features

  • Conjugation Practice — Flashcards, typing, multiple choice, handwriting, sentence building, and full table modes
  • Spaced Repetition — SM-2 algorithm tracks what you know and surfaces what you don't
  • 1,750 Verbs — From basic to expert, with irregular form highlighting
  • 20 Tenses — Every indicative, subjunctive, conditional, and imperative tense
  • Grammar Guide — 20 tense guides with conjugation tables + 20 grammar topic notes (Ser vs Estar, Por vs Para, etc.)
  • Vocabulary Courses — Weekly decks with example sentences
  • Progress Tracking — Streaks, daily goals, accuracy stats, and achievement badges
  • CloudKit Sync — Review progress syncs across devices
  • Widgets — Daily progress, word of the day, and weekly stats
  • Text-to-Speech — Hear any verb pronounced in Spanish

Architecture

  • SwiftUI + SwiftData with a dual-store configuration:
    • Local store — Reference data (verbs, forms, guides) seeded from JSON on first launch
    • Cloud store — User data (review cards, progress, streaks) synced via CloudKit
  • SharedModels package shared between the app and widget extension

Requirements

  • iOS 18+
  • Xcode 16+

Building

Open Conjuga/Conjuga.xcodeproj in Xcode and run on a simulator or device. Data seeds automatically on first launch.

Description
No description provided
Readme 14 MiB
Languages
Swift 85.5%
Python 11.9%
HTML 2.4%
Shell 0.2%