Skip to content

Desktop: Update winit to include window dragging fix for Windows - #4550

Merged
timon-schelling merged 1 commit into
masterfrom
desktop-winit-update
Sep 20, 2026
Merged

timon-schelling merged 1 commit into
masterfrom
desktop-winit-update

Conversation

@timon-schelling

Copy link
Copy Markdown
Member

Update winit to include rust-windowing/winit#4700.

@timon-schelling

timon-schelling commented Sep 19, 2026 •

Copy link
Copy Markdown
Member Author

!build desktop (Run ID 35411371824)

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
📦 Linux Build Complete for 4415484
Download binary
Download Flatpak

@github-actions

Copy link
Copy Markdown
📦 Mac Build Complete for 4415484
Download binary

@github-actions

Copy link
Copy Markdown
📦 Windows Build Complete for 4415484
Download binary

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 reviewed files. 1 file intentionally excluded from review.

Confidence score: 4/5

  • In desktop/src/app.rs, the filter_map can silently discard URIs when parsing or converting to a file path fails, unlike the explicit error branches; this may make some inputs appear to be ignored without feedback. Add explicit reporting or handling for dropped URIs.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="desktop/src/app.rs">

<violation number="1" location="desktop/src/app.rs:662">
P2: The filter_map silently drops every URI that fails Url::parse or to_file_path, without any error message of its own, while the match's Err branches log errors. A dropped item that isn't a local file:// URL — including `file://` URLs with a host component (UNC paths like `file://server/share/...`), which to_file_path rejects — is skipped with no diagnostic, so a multi-file drop imports partially (or not at all) with no way for the user or logs to see why. Log each discarded URI so silent import failures are diagnosable.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread desktop/src/app.rs
WindowEvent::DataTransferReceived { serial, ref value, .. } if self.pending_dnd_fetch == Some(serial) => match value.try_as_uris() {
Ok(uris) => {
self.pending_dnd_fetch = None;
let paths = uris.iter().filter_map(|uri| url::Url::parse(uri).ok()?.to_file_path().ok());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The filter_map silently drops every URI that fails Url::parse or to_file_path, without any error message of its own, while the match's Err branches log errors. A dropped item that isn't a local file:// URL — including file:// URLs with a host component (UNC paths like file://server/share/...), which to_file_path rejects — is skipped with no diagnostic, so a multi-file drop imports partially (or not at all) with no way for the user or logs to see why. Log each discarded URI so silent import failures are diagnosable.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/src/app.rs, line 662:

<comment>The filter_map silently drops every URI that fails Url::parse or to_file_path, without any error message of its own, while the match's Err branches log errors. A dropped item that isn't a local file:// URL — including `file://` URLs with a host component (UNC paths like `file://server/share/...`), which to_file_path rejects — is skipped with no diagnostic, so a multi-file drop imports partially (or not at all) with no way for the user or logs to see why. Log each discarded URI so silent import failures are diagnosable.</comment>

<file context>
@@ -656,9 +656,10 @@ impl ApplicationHandler for App {
+			WindowEvent::DataTransferReceived { serial, ref value, .. } if self.pending_dnd_fetch == Some(serial) => match value.try_as_uris() {
+				Ok(uris) => {
 					self.pending_dnd_fetch = None;
+					let paths = uris.iter().filter_map(|uri| url::Url::parse(uri).ok()?.to_file_path().ok());
 					for path in paths {
 						match fs::read(&path) {
</file context>
Suggested change
let paths = uris.iter().filter_map(|uri| url::Url::parse(uri).ok()?.to_file_path().ok());
let paths = uris
.iter()
.filter_map(|uri| match url::Url::parse(uri).ok().and_then(|url| url.to_file_path().ok()) {
Some(path) => Some(path),
None => {
tracing::warn!("Ignoring dropped item that is not a local file URL: {uri}");
None
}
})
.collect::<Vec<_>>();

@timon-schelling

timon-schelling commented Sep 19, 2026 •

Copy link
Copy Markdown
Member Author

!build desktop (Run ID 35444328203)

@github-actions

Copy link
Copy Markdown
📦 Mac Build Complete for 8bbb7bf
Download binary

@github-actions

github-actions Bot commented Sep 19, 2026 •

Copy link
Copy Markdown
📦 Linux Build Complete for 8bbb7bf
Download binary
Download Flatpak

@github-actions

Copy link
Copy Markdown
📦 Windows Build Complete for 8bbb7bf
Download binary

@timon-schelling
timon-schelling merged commit aee07b0 into master Sep 20, 2026
11 checks passed
@timon-schelling
timon-schelling deleted the desktop-winit-update branch September 20, 2026 01:27

This branch was successfully deployed

1 active deployment
graphite-dev (Preview) — 8bbb7bfb Deployed Sep 19, 2026 by github-actions[bot]
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