Repository navigation
#523: files dropped on the window are attached on Wayland too - #551
Conversation
Notes the winit fork's second patch (rust-windowing/winit#4729) beside the pin; the rev is bumped once the fork is pushed. Human-reviewed, AI-assisted, nobody's mailbox harmed.
Human-reviewed, AI-assisted, nobody's mailbox harmed.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
winit Wayland drop support Cargo.toml, packaging/release-notes.d/fixes/523.md |
The winit override points to a revision that includes Wayland file-drop and clipboard support. The release note states that dropped files attach to the message being written on Wayland. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: billsecond
Merge Risk: 
Minimal · up to 7805e
-
The PR is mergeable; the release note uses the repository’s supported placeholder format.
Architecture risk: 
Low · up to 7805e
-
The change affects 2 systems.
Changed systems:
Cargo.toml,packagingArchitecture concerns
No architecture-level concerns identified.Review details
-
Systems and components
- observed — Cargo.toml (service) was modified; 1 changed file maps to changed impact.
- observed — packaging (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in Cargo.toml: The
winitpatch override changes from revisionbb472d90071a8b48288aeaa70ad81b767808ae9ato951b6c131897a80d27a925af7c5da22ea522eb0d. Its description now includes Wayland file drops and clipboard support alongside the activation-token patch. - observed — Modified behavior in packaging/release-notes.d/fixes/523.md: Adds a release note documenting file drops attaching to the message on Wayland and noting that they previously did nothing there.
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 inconclusive Passed checks: 4 passed-
Full details: Description check
-
Explanation
The description explains the user-visible change, implementation, testing, and resource limits. It omits the template headings and checklist items, and it does not report completion of the manual Wayland checks, but it is otherwise mostly complete.
Full details: Out of Scope Changes check
-
Explanation
The reviewed changes are the winit override in Cargo.toml (revision 951b6c13, +5/-3) and a release note in packaging/release-notes.d/fixes/523.md. The override change directly supplies the Wayland drag-and-drop path for
#523. The fork carries the existing activation-token patch, which the PR keeps unchanged. The fork's clipboard move to the same wl_data_device comes from upstream#4729, which the Wayland drop path depends on. The fork's 1 MiB dragged file-list cap and 64 MiB clipboard-read cap relate to the same drag and clipboard data path. No change was found that is unrelated to#523. The clipboard and cap behavior is a side effect in a dependency. The PR description asks for manual copy-paste checks because of that clipboard change.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)
-
Full details: Linked Issues check
-
Explanation
[
#523] Requirements: (1) a file dropped into the email body is added to the attachment list; (2) attachments can be removed before sending; (3) a drop does not navigate away from the draft, replace the message body, or clear draft content. The PR changes only the winit dependency pin in Cargo.toml and adds a release note. The PR description states that dropped files already attach on Windows, macOS, and X11. The PR enables the Wayland delivery path that feeds those existing events, through the fork at 951b6c13 (upstream rust-windowing/winit#4729, which adds per-seat wl_data_device drag-and-drop events). This establishes that the Wayland event path now exists. The reviewed evidence does not show the composer code that handles the dropped-file event, so requirements (1) to (3) are not verified. The PR description also states that the draft-preservation criteria were not verified separately. No automated test in the MailCraft repository covers the drop-to-attachment behavior. Fork tests (16) cover winit only. The fork source is outside the reviewed repository, so its behavior was not inspected directly.Resolution
Provide evidence for the composer behavior on Wayland. Required items: (a) the composer code path that handles the dropped-file event and adds the file to the attachment list; (b) confirmation that the attachment can be removed before sending; (c) confirmation that the drop does not change the message body or other draft content, either by a test or by a recorded manual check on KDE, GNOME, or Hyprland. Confirm the fork source at 951b6c13 emits the dropped-file event that the composer code consumes.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Fixes #523.
Files dropped on the window are attached to the message being written on Wayland too (they already were on Windows, macOS and X11). winit 0.30 has no Wayland drag and drop, so winit now comes from our fork at
951b6c13(UCS-Care-Group/winit, branchwayland-drops-523):wl_data_deviceper seat, reportingHoveredFile/DroppedFileand serving the clipboard through the same device;cargo xtask cipasses locally (all 11 steps); winit's own tests pass in the fork (16).To check by hand on Wayland (KDE, GNOME, Hyprland): drag a file from the file manager onto a message being written; copy and paste text and pictures still work (the clipboard moved onto winit's data device).
Human-reviewed, AI-assisted, nobody's mailbox harmed.
Summary by CodeRabbit