You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Export History writes a tag's stored history as CSV. Nothing reads one back.
Why this is different from the rest of the feature list
Location history is the only data in the app that cannot be re-fetched. Apple serves a short window of reports, so anything older than that exists solely in the app's own database. Everything else survives a reinstall one way or another — tags come back from a bundle, or on their own once the app reads them from the user's Apple account — but history is gone the moment the database is.
And it goes more often than you would think: allowBackup is false, so wiping app data, moving to a new phone, or uninstalling takes it all. The user is told to keep an export; today that export is a dead end, because there is no way to put it back.
Shape
The app defined the format itself, so this is reading its own output:
Parse the CSV Export History writes — it already carries timestamp_utc, timestamp_local and timestamp_epoch_ms
Insert into Room, deduplicating on beacon plus timestamp, so importing the same file twice is harmless and importing an overlapping range merges rather than doubles
Report what happened in counts: rows read, rows added, rows already present
The one real design question
What to do with rows for a beacon the user has not imported. Skip them, or hold them until that beacon appears? Skipping is simpler and probably right — a history with no tag to attach to is not showing anyone anything — but it means restore order matters, and the user should be told rather than left to wonder where the rows went.
Notes
A schema change here means a Room migration and its tests — see rule 1 in AGENTS.md. Inserting into the existing table may not need one.
Related: Export History has no date range option #71, which asks for a date range on the export side. Independent of this — that one refines a working feature, this one adds the missing direction.
Export History writes a tag's stored history as CSV. Nothing reads one back.
Why this is different from the rest of the feature list
Location history is the only data in the app that cannot be re-fetched. Apple serves a short window of reports, so anything older than that exists solely in the app's own database. Everything else survives a reinstall one way or another — tags come back from a bundle, or on their own once the app reads them from the user's Apple account — but history is gone the moment the database is.
And it goes more often than you would think:
allowBackupis false, so wiping app data, moving to a new phone, or uninstalling takes it all. The user is told to keep an export; today that export is a dead end, because there is no way to put it back.Shape
The app defined the format itself, so this is reading its own output:
timestamp_utc,timestamp_localandtimestamp_epoch_msThe one real design question
What to do with rows for a beacon the user has not imported. Skip them, or hold them until that beacon appears? Skipping is simpler and probably right — a history with no tag to attach to is not showing anyone anything — but it means restore order matters, and the user should be told rather than left to wonder where the rows went.
Notes
Written by Claude Code.