Repository navigation
Description
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_localandtimestamp_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.
Written by Claude Code.
Activity
hamza-lzr commentedon Aug 24, 2026
Hi! @parawanderer , I’d like to work on this issue.
My plan is to import the existing history CSV format, deduplicate records by beacon and timestamp, and report the numbers of imported, duplicate, malformed, and skipped rows. For unknown beacons, I propose skipping those rows and reporting the count. Does this approach match your expectations?
wanderdev0 commentedon Aug 25, 2026
Hi @hamza-lzr thank you for your interest in this project and desire to work on/contribute this feature! That approach matches my expectations for this feature and I would say give it a go. If you find that the export format itself is lacking the data needed to make this work end-to-end, then let me know/feel free to propose changes to the export half
Note as well that the export half is only present on the current
mainbranch rather than in any released version of the app, so to see how that works you will have to install the debug version of the app (either via Android Studio or any of the builds this repo auto-generated)hamza-lzr commentedon Aug 27, 2026
hi @parawanderer , I traced the current history export and found that the CSV contains all report data but no stable
beacon ID; the ZIP entry is identified only by the user-visible tag name, which can change or collide. To implement reliable beacon+timestamp deduplication and unknown-beacon skipping, I propose adding a beacon_id column to the exported CSV and using it during import. For older exports without that column, I would reject them with a clear explanation rather than guess from the filename. Does that compatibility behavior sound right?wanderdev0 commentedon Aug 27, 2026
Hi @hamza-lzr that sounds right to me! As a whole I think it is good to handle them that way, though I doubt that many people installed the current debug build in general.