Drop: files of one drop split across event batches are sent as two messages #416

Open
opened 2026-11-13 04:47:32 +00:00 by charles · 0 comments
Owner

Follow-up from the review of PR #413 (Task 26, #276), file crates/fluxer-ui/src/app.rs.

The shell queues WindowEvent::DropsEnded with Task::done on the first FileDropped of a drop. It assumes the drop's other FileDropped events are handled before that message. If iced ever delivers one drop's events in two batches, the second part is taken as a new drop, so a Shift-drop of several files goes out as two messages.

In practice winit 0.30 sends all of a drop's paths from one platform callback (X11 XdndDrop, Windows WM_DROPFILES, macOS performDragOperation), before the event loop reaches AboutToWait and before any proxy message, so a split has not been seen. A robust fix needs a short debounce (for example, take the files a few ms after the last FileDropped). fluxer-ui has no timer without I/O today (iced is built without tokio/smol), so that is a design choice and was left out of Task 26.

Seen on commit 4e32a4c (branch textchat-26-ui-upload-tray).

Follow-up from the review of PR #413 (Task 26, #276), file `crates/fluxer-ui/src/app.rs`. The shell queues `WindowEvent::DropsEnded` with `Task::done` on the first `FileDropped` of a drop. It assumes the drop's other `FileDropped` events are handled before that message. If iced ever delivers one drop's events in two batches, the second part is taken as a new drop, so a Shift-drop of several files goes out as two messages. In practice winit 0.30 sends all of a drop's paths from one platform callback (X11 XdndDrop, Windows WM_DROPFILES, macOS performDragOperation), before the event loop reaches `AboutToWait` and before any proxy message, so a split has not been seen. A robust fix needs a short debounce (for example, take the files a few ms after the last `FileDropped`). fluxer-ui has no timer without I/O today (iced is built without `tokio`/`smol`), so that is a design choice and was left out of Task 26. Seen on commit 4e32a4c (branch `textchat-26-ui-upload-tray`).
charles added this to the Text chat milestone 2026-11-13 04:47:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#416
No description provided.