Notechondria
Version: 0.1.24 Build Date: 2026-04-18T01:00
What's Changed
Editor — note-view local-category delete + pull-then-merge on login
-
Local-category delete when logged out was already functionally correct —
_deleteCategoryhandled local courses at lines 1762-1799 (reassigns drafts to the local default Inbox, removes the course from_localCourses, persists). No auth gate blocked this for local courses;is_default == true(Inbox) was already the only guard. No code change was required for this part. -
Pull-then-merge on login was already the
_applyAuthPayloadflow:_loadInitialData()(pulls remote) followed by_syncAllLocalData()(pushes remaining local courses/drafts, re-pulls). No code change was required for the high-level flow. -
Bug fix: draft orphan on local-Inbox-to-remote-Inbox swap. When
_loadInitialDatadetected that the server has a default (Inbox) category, it dropped the local default from_localCoursesbut did NOT remap drafts that pointed at the local Inbox's negative ID. Those drafts would subsequently be synced with the stale negativecourse_id, which the server would silently ignore or reject.Fixed by extending the "drop local default" block in
_loadInitialDatato also iterate_localDraftsand call_remapDraftCourseId(draft, localDefaultId, remoteDefaultId)for every draft whosecourse_idmatches the old local Inbox. Both_localDraftsand_localCoursesare persisted in the same pass so state stays consistent.
Files Changed
Modified
frontend/editor_app/lib/app_shell.dart—_loadInitialData: extended the remote-default-replaces-local-default block to remap orphaned drafts before persisting.VERSION— 0.1.23 -> 0.1.24.docs/TODO.md— "Allow user to delete local category" item removed.docs/versions/0.1.24.md(this file).
Verification
flutter analyzeoneditor_app— 33 issues, all pre-existing (same count as 0.1.23).flutter test test/smoke_test.dart -r compact— passes.
Notes / follow-ups
- Planner and portal do not expose category delete yet; this change is editor-only.
- The 0.1.20 invalid-token session-clear + bind-without-token
short-circuit still need replicating into planner / portal
app_shell.dart(pre-existing bug fromdocs/TODO.md).