0.1.102 — local Inbox stays pinned across boots
Tiny one-file fix on top of 0.1.101's Casdoor cutover. The local
"Inbox" reuse path in _seedStarterInboxAlongsideExisting was
dropping the is_default: true flag whenever it found an existing
"Inbox" row in _localCourses that had been created by something
other than the seeder itself — most commonly the manual offline-mode
"New category" path (_createCategory calls _buildLocalCourse,
which defaults is_default: false).
Symptoms:
- The sidebar's pinned-categories filter
(
_allCategories.where((c) => c['is_default'] == true)at build_helpers.dart:97-99) skipped the Inbox, so the row disappeared from the top of the category list. The user could still find it in the draggable zone below, but they reported it as "missing" because the pinned slot was empty. _loadInitialData's cloud-Inbox de-dupe at initial_data.dart:126-129 also relies onis_default: trueto identify the local default before the cloud Inbox replaces it. With the flag missing, the block didn't fire and a synced user would end up with two Inbox rows — the cloud one pinned at top and the local one drifting in the draggable list.
Fix: in
local_starter.dart,
the reuse path now stamps is_default: true on the existing row
when missing and rewrites the corrected row back into
_localCourses so the next persistLocalCourses() call
(already invoked at the bottom of
_seedStarterInboxAlongsideExisting) writes the corrected flag
through to disk. Idempotent — rows that already carry
is_default: true are returned by reference unchanged.
Verification
flutter analyzefromfrontend/editor_app/reports the same 97 pre-existing info lints; zero new errors / warnings.- The fix is symptom-aware (pin-area filter + dedupe block both hinge on the same flag), so testing one path fixes both.
Carryover
- 0.1.101 carryover items unchanged.