Skip to content

#523: files dropped on the window are attached on Wayland too - #551

Merged
benandez merged 2 commits into
mainfrom
fix/wayland-drop-523
Oct 27, 2026
Merged

benandez merged 2 commits into
mainfrom
fix/wayland-drop-523

Conversation

@benandez

@benandez benandez commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

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, branch wayland-drops-523):

cargo xtask ci passes 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

  • Bug Fixes
    • Fixed file dropping on Wayland: files dropped from a file manager onto a window are now attached to the message being composed. Previously, dropping files had no effect.

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.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 14c6efe6-afe2-47b9-8ebe-d25d330a3c6b
Commits

Reviewing files that changed from the base of the PR and between 7e73140 and 7805ef9.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 2
  • Cargo.toml
  • packaging/release-notes.d/fixes/523.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The workspace now uses a winit revision that includes Wayland file-drop and clipboard support alongside the activation-token patch. The release note states that dropped files attach to the message being written on Wayland, where drops previously did nothing.

Changes: Wayland file drops

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: Normal

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, packaging

Architecture 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 winit patch override changes from revision bb472d90071a8b48288aeaa70ad81b767808ae9a to 951b6c131897a80d27a925af7c5da22ea522eb0d. 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: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive [#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 th… 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 sendi…
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: attaching files dropped onto the window on Wayland.
Description check Passed 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 Wayl…
Out of Scope Changes check Passed 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 dra…
Docstring Coverage Passed 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 survi…
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.

@benandez
benandez merged commit c119bf9 into main Oct 27, 2026
14 checks passed
@benandez
benandez deleted the fix/wayland-drop-523 branch October 27, 2026 11:48
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.

Drag-and-drop attachments in the email composer

1 participant