Skip to content

feat(sources): add desktop drag-and-drop imports - #661

Open
yujingz wants to merge 2 commits into
nashsu:mainfrom
yujingz:feat/add-drag-and-drop-to-sources
Open

feat(sources): add desktop drag-and-drop imports#661
yujingz wants to merge 2 commits into
nashsu:mainfrom
yujingz:feat/add-drag-and-drop-to-sources

Conversation

@yujingz

@yujingz yujingz commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Dragging files or folders from the desktop onto the Sources panel now imports them in the Tauri app. Browser drag handlers in the desktop WebView receive File objects without usable native paths, so the existing import commands cannot read the dropped items directly.

  • Uses Tauri's native drag-and-drop events and routes mixed file/folder drops through the existing source import and ingest pipeline.
  • Shares one import lock across toolbar, URL, and drag-and-drop entry points, and reports busy, empty, partial-failure, and listener failures.
  • Rejects symlinks and special filesystem entries instead of traversing or importing them.
  • Keeps the drop-target border width stable so hover feedback appears without a layout jump.

Validation

  • npm run test:mocks — 124 files / 1,802 tests passed.
  • npm run build
  • npm run typecheck
  • Targeted Vitest suite — 4 files / 34 tests passed.
  • cargo test --manifest-path src-tauri/Cargo.toml --lib commands::fs::tests:: — 35 passed / 1 ignored.
  • cargo check --manifest-path src-tauri/Cargo.toml
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
  • Manual macOS desktop preview confirmed file/folder drops and stable hover feedback.

@yujingz yujingz changed the title fix(sources): make drag-and-drop imports work on desktop feat(sources): add desktop drag-and-drop imports Aug 10, 2026
@yujingz
yujingz force-pushed the feat/add-drag-and-drop-to-sources branch from cdebac0 to 567c22e Compare August 10, 2026 06:08
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