Always show map + feed info #53

Merged
maxtkc merged 9 commits from 42-show-map-and-feed-info into main 2026-03-31 08:23:44 +00:00
Owner

Closes #42

Closes #42
Two bugs caused feed_info edits to be lost on refresh:

1. Array mismatch: gtfsData[filename].data and the flat array passed to
   setupVirtual were two different [] instances. persistDirtyBlobs reads
   gtfsData.data, but the virtual table mutates its own flat array, so
   blob saves always saw an empty array and were skipped.

2. No initial row: the virtual table update handler silently returns
   when byId has no entry for the key. With an empty feed_info table,
   every field edit was a no-op in memory, and patch replay on reload
   also silently failed — leaving hasExistingRows=false and causing
   initializeEmpty to call clearDatabase, destroying the patches.

Fix: share the same array reference between gtfsData.data and setupVirtual,
seed feed_info with an all-empty-string row (schema-keyed so CSV headers
are correct), and flush the seed blob to IDB immediately so patch replay
always has a row to land on even after a quick refresh.
maxtkc merged commit 100efacca3 into main 2026-03-31 08:23:44 +00:00
maxtkc deleted branch 42-show-map-and-feed-info 2026-03-31 08:23:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gtfs.zone/coloring-book!53
No description provided.