Finish ad-hoc file open: drag-drop, recents, OS file associations #46
Loading…
Reference in a new issue
No description provided.
Delete branch "adhoc-open-phase-2-3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the ad-hoc file open roadmap item — Phases 2 and 3 on top of the Phase 1 picker / preview / edit that shipped earlier.
Phase 2 — drag-and-drop + recents
dragDropEnabledis nowtrueso Tauri delivers native drop paths;FileDropZoneprefers the first previewable path.recentFilesStore(localStorage-persisted) records every ad-hoc open. Surfaced in the sidebar under "Open file…" (right-click → open folder / remove) and as a Recent files group in theCtrl+Kpalette.openPathAdHocis the shared sink every entry point funnels through.Phase 3 — OS file associations ("Open with Garnet")
tauri-plugin-single-instanceroutes a second "Open with Garnet" into the running window instead of spawning a duplicate (must be the first registered plugin).take_pending_open, drained by the frontend on mount); a second launch emits anopen-fileevent the running app navigates on. Both land on the ephemeral preview.bundle.fileAssociationsregisters Garnet as a handler for image / video / audio / 3D-model types (Linux.desktopMimeType, macOS document types, Windows registry).Note: the OS-level association registration only lands on an installed bundle (
make build) — you can't register a handler without installing. The plumbing that consumes it (single-instance + argv → open) is verified in dev: a second instance launched with a file argument exits cleanly and hands the path to the running window.Verification
clippyclean; 130 tests passtsc+ biome cleanmake dev; single-instance argv handoff confirmed end-to-end