diffplug / diffplug/dormouse

Allow dropping images and files to paste into the standalone app

オープン
#38 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
blocked enhancement
主要言語
TypeScript
スター
5
フォーク
0
平均マージ
18時間 32分
マージ済み PR(30日)
216

説明

## Background

Dragging and dropping on a terminal pane has two use cases:

1. Drop a file or image to paste its path into the terminal.
2. Drag a pane tab to rearrange the pane layout.

In the VS Code extension only (2) works — file/image drop into a webview is blocked by VS Code itself, which is a platform limitation we can't change.

In the standalone Tauri app we previously had only (1): file/image drop pasted paths, but pane drag did not work. This was because Tauri 2's `dragDropEnabled: true` (the default) captures OS drag-drop natively, and on Windows that blocks all HTML5 drag events — including internal Dockview pane reorder. See tauri-apps/tauri#8581 and tauri-apps/tauri#14373.

We've now set `dragDropEnabled: false`, which restores pane drag (case 2). The cost is that case (1) is currently broken in standalone too: Chromium's webview doesn't expose `File.path`, so a vanilla HTML5 `drop` can't recover the path string without OS-level cooperation.

## What we want

Re-enable file/image drop-to-paste in the standalone without re-breaking pane drag.

## Blocker

Depends on upstream Tauri offering a way to receive file paths from native OS drops while still letting HTML5 drag events flow to the webview. Tracked upstream at tauri-apps/tauri#14373. Once that lands (or a usable plugin/escape hatch appears) we can flip `dragDropEnabled` back on (or adopt the new API) and re-activate the stubs.

## Stubs left in the codebase

Wiring is intentionally left in place so re-enabling is a small change:

- `standalone/src-tauri/tauri.conf.json` — `dragDropEnabled: false` is the kill switch.
- `standalone/src-tauri/src/lib.rs` — the `WindowEvent::DragDrop` handler that emits `mouseterm://files-dropped`.
- `standalone/src/tauri-adapter.ts` — the `mouseterm://files-dropped` listener and `onFilesDropped` plumbing.
- `lib/src/lib/platform/types.ts` — the optional `onFilesDropped` interface method.
- `lib/src/components/wall/use-session-persistence.ts` — the `platform.onFilesDropped?.(…)` subscription that calls `pasteFilePaths`.

## Note on VS Code

Doesn't apply to the VS Code extension — file drop into VS Code webviews is outside our control.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、上流の Tauri issue tauri-apps/tauri#14373 のステータスを確認し、standalone/src-tauri/tauri.conf.json、standalone/src-tauri/src/lib.rs、standalone/src/tauri-adapter.ts にある既存のスタブを確認します。lib/src/lib/platform/types.ts と lib/src/components/wall/use-session-persistence.ts を通じて onFilesDropped の配線を追跡します。完了の条件は、standalone でネイティブのファイル/画像ドロップによってパスが貼り付けられ、HTML5 のペインの並べ替えを壊さないことです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust, tauri, typescript
領域
desktop
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。