Add ad-hoc file open (ephemeral preview/edit outside the library) #34
Loading…
Reference in a new issue
No description provided.
Delete branch "adhoc-file-open"
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?
Lets a user point Garnet at a single file outside every library root and get the full preview + editor surfaces on it ad-hoc, without ingesting it into the catalog — a direct expression of Garnet's "surface over local files, no forced ingestion" principle. The file is opened as an ephemeral asset (a virtual
Assetwith no DB row).This is Phase 1 (the 80%) of the design in
90-99 Agents/Transient/Ad-Hoc File Open Plan.md. Also includes an app-icon refresh and a version bump to 0.2.0.Backend
describe_file(path) -> Asset: stats a loose file and returns the usualAssetshape with sentinel ids (-1) androot_path = dirname/relative_path = basename, soabsPathFor()reconstructs the real path and every path-addressed call site works unchanged.Frontend
/preview?path=and/edit?path=routes mountAssetDetailPage/EditorPagein ephemeral mode (pages branch on the route'spathparam).asset://, since the file may sit outside the asset-protocol scope allow-list./asset/:id.Cmd/Ctrl+Oglobal hotkey, an "Open file…" sidebar action above Workspaces, and an "Open a file" CTA in the library empty-state.lib/previewFormats.ts(preview-capable extension sets, moved out ofAssetDetailPage) andlib/ephemeral.ts(routes, file picker, add-to-library orchestration).Known caveat
Multi-file glTF (a
.gltfreferencing sidecar.bin/textures by relative URL) won't resolve its sidecars through the ephemeral media-server URL; single-file models (.glb/.obj/.stl/.ply/.fbx/.usdz, embedded.gltf) are fine, and catalog models are unaffected. Documented in the plan doc with a fix sketch.Verification
tsc --noEmit, Biome,cargo clippy -D warnings, and 127 backend + 13 frontend tests all green.Phases 2 (drag-and-drop, recents) and 3 (OS "Open with Garnet" file associations) are not started.