Skip to content

feat: file-ops affordances#37

Draft
Nic-dorman wants to merge 4 commits intomainfrom
feat/file-ops-affordances
Draft

feat: file-ops affordances#37
Nic-dorman wants to merge 4 commits intomainfrom
feat/file-ops-affordances

Conversation

@Nic-dorman
Copy link
Copy Markdown
Contributor

@Nic-dorman Nic-dorman commented Apr 20, 2026

Summary

Three independent file-ops UX fixes bundled in one branch. Each commit is scoped to one concern and could be reverted alone.

  • Download-by-Address filename fix (f073c79) — dialog prefills the filename from the matching upload-history entry and silently appends the original extension on submit. No more screenshot downloads that the OS refuses to open.
  • Datamap row affordances (d207b51) — uploads table rows with a persisted datamap now show explicit Copy Path and Reveal-in-Folder icons next to the filename. Previously the filename was subtly clickable and users didn't realise.
  • Rescue orphaned datamaps (1887ddf) — Settings → Advanced → Rescue Datamaps scans the app config dir for orphaned .datamap files not referenced by upload history and lets the user re-import them in one click. Addresses are recomputed from each datamap's JSON so the imported rows are immediately usable for re-downloads.

No backend schema changes. One new Tauri command (scan_orphan_datamaps). No migration required.

Why draft

Code is green (vitest 19/19, nuxi typecheck clean on app code, cargo check clean) but the UI flows have not been manually exercised. Opening as draft to unblock review of the code shape while the test plan below runs.

Test plan

  • Filename prefill: open Download by Address, paste an address from an existing upload → filename field prefills with the original name
  • Extension preserved: edit the prefilled filename to drop the extension (e.g. remove .png) → on Download, the save name should still end with .png
  • No-match behaviour: paste an address NOT in history → filename stays blank, user types freely, no append (since nothing to copy from)
  • Datamap icons render: upload a small private file → uploads table row shows <filename>.datamap followed by a copy icon and a folder icon
  • Copy path: click the copy icon → clipboard contains the absolute path; toast confirms
  • Reveal: click the folder icon → Finder / Explorer opens focused on the datamap file
  • Non-datamap rows unchanged: uploads without a datamap (public, or legacy rows) still show the truncated address, still clickable to copy address
  • Empty rescue scan: fresh install or matching history → Scan returns "No orphaned datamaps found"
  • Orphan scan: clear upload history (Clear History button), then Scan → orphaned datamaps appear in the list with sensible names and mtimes
  • Orphan import: click Import N datamaps → toast confirms; navigating to the Files page shows the re-imported rows; rows are usable for Download by Datamap
  • Dedupe: import orphans twice → the second import finds nothing new
  • Cross-platform: at minimum Windows + macOS

🤖 Generated with Claude Code

Nic-dorman and others added 3 commits April 20, 2026 16:13
…V2-196)

Download-by-Address dropped the original extension when the user typed a
shorter name — bytes wrote correctly but the OS couldn't associate the
file with a viewer. Now the dialog prefills from the matching upload-
history entry and silently appends the original extension on submit if
the typed name lacks one.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…-194)

The datamap cell in the uploads table used to render just the filename as
a subtle clickable span — users didn't realise it was actionable. Now
every datamap row shows an explicit Copy icon and Reveal icon alongside
the filename, both discoverable without hovering. Unblocks the sharing
flow for private uploads without moving the datamap out of the config
dir.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Users who cleared their upload history (or reinstalled) previously had no
way to recover private-upload datamaps still sitting in the hidden config
dir on macOS/Linux/Windows, because the OS file picker won't navigate
into those locations. Settings → Advanced now has a Scan button that
surfaces orphaned .datamap files and lets the user import them back into
history in one click — no OS picker required. Addresses are recomputed
from each datamap's JSON so the imported entries are immediately usable
for re-downloads.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Nic-dorman Nic-dorman changed the title feat: file-ops affordances (V2-194, V2-195, V2-196) feat: file-ops affordances Apr 20, 2026
CI rust (fmt) job flagged two trivial whitespace differences in the new
config.rs helpers. No behaviour change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant