February 21st, 2026
Architecture Shift: Pre-calculated Task Instances & Backend Parity Today, we completely shifted the responsibility of complex recurrence scheduling out of the opaque native Android layer into a transparent, mathematically identical structure across our JavaScript frontend, local SQLite database, and Convex backend.-
Migrate to pre-calculated JavaScript task instances architecture:
- Added an
instancestable to the local SQLite DB (Version 3) with indexing on start/end times. - Created
lib/scheduler.tsto statically calculate exactly 1 year of timestamps from recurrence rules using dayjs. - Updated
final.tsxto batch insert 365 generated instances into the local DB automatically upon task creation or update. - Updated
useTaskActions.tsto explicitly delete all associated instances when a local task is deleted fromcommits.tsx, preventing ghost alarms. - Enhanced
DbDebugFabin_layout.tsxto fetch and pretty-print explicitly generated task instance timestamps (with titles) to improve debug visibility.
- Added an
-
Synchronize local SQLite instances explicitly with Convex backend:
- Updated backend
createandupdatemutations to return explicitinstancesrows. - Removed the duplicated client-side recurrence calculation (
lib/scheduler.ts). - Updated
final.tsxto insert the actual 365 backend instances directly into SQLiteinstances, preserving their exact Convex instance_idand timestamps. - Bumped the local DB
versionto 4, adding an explicittaskIdcolumn toinstancesviaALTER TABLEto avoid frontendJOINrequirements. - Updated
useTaskActions.tsdeletion logic using a nested SQL lookup to explicitly clear local instances during a task deletion.
- Updated backend