feat(datamap): write new uploads to ~/Documents/Autonomi/Datamaps/#98
Open
Nic-dorman wants to merge 2 commits into
Open
feat(datamap): write new uploads to ~/Documents/Autonomi/Datamaps/#98Nic-dorman wants to merge 2 commits into
Nic-dorman wants to merge 2 commits into
Conversation
Fixes the macOS gap where NSOpenPanel hides ~/Library by default, leaving users unable to navigate the OS file picker to their own datamaps. New uploads now land in ~/Documents/Autonomi/Datamaps/ (or the platform equivalent of Documents), where every OS picker can reach them. Also helps users sharing datamaps across machines via iCloud Drive / OneDrive — Documents is the natural sync target for that flow. Detection is stateless on every write: * If config_path() already contains any .datamap files → keep writing there. Existing installs are not disrupted; their old datamaps stay alongside any new ones, and the row affordance (Copy Path / Reveal / click basename in DownloadByDatamapDialog) keeps finding them by the absolute path stored in upload_history.json. * Otherwise → write to the new user-addressable dir. Fresh installs get the picker fix immediately. The detection is stable after each write: existing installs keep the .datamap files in the legacy dir forever (the rule continues to find them); fresh installs never accumulate .datamap files in the legacy dir (the rule continues to choose the new one). No migration, no config field, no breaking change. Existing users see zero behavior change unless they manually delete all their old datamap files — in which case the next write flips to the new location, which is the right behavior at that point. Privacy note: ~/Documents is commonly synced by iCloud Drive / OneDrive by default. A datamap is the key to private data on the network. Users who don't want cloud sync exposure for new datamaps can opt out at the sync layer (exclude the folder from sync) — same control surface as any other file in Documents. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the macOS gap where NSOpenPanel hides `
/Library` by default in the OS file picker, leaving users unable to navigate to their own datamaps. New uploads now land in `/Documents/Autonomi/Datamaps/` (or the platform equivalent), where every OS picker can reach them.Zero impact on existing users
Detection is stateless on every `write_datamap_for` call:
The rule is stable across subsequent writes:
No migration, no config field, no `upload_history.json` rewrite. Existing entries' absolute paths still resolve.
Files changed
`src-tauri/src/config.rs` only:
Privacy caveat (documented in commit)
`
/Documents` is commonly synced by iCloud Drive / OneDrive. A datamap is the key to private data on the network — users who don't want cloud sync exposure can exclude the folder at the sync layer. Same control surface as any other file in Documents. Pre-this-PR the keys lived in non-synced `/Library` / `%APPDATA%`; this is a deliberate trade-off favoring discoverability over default-off cloud exposure.Test plan
, upload a new file. Confirm the new datamap lands in \%APPDATA%\autonomi\ant-gui\` (not Documents). Re-download an old entry — works.to back it up. Launch the app. Upload a file. Confirm the new datamap lands in \%USERPROFILE%\Documents\Autonomi\Datamaps\`. Open the OS picker via Download by Datamap → Browse — confirm you can navigate to and open the new datamap.Stacks with
This PR conflicts only on `write_datamap_for` with #97 (V2-258: msgpack write). Whichever lands first, the second is a trivial rebase — both touch only that function's body.
🤖 Generated with Claude Code