Skip to content

fix: a few regressions from previous PRs - #10

Open
tomerqodo wants to merge 5 commits into
copilot_full_base_fix_a_few_regressions_from_previous_prs_pr10from
copilot_full_head_fix_a_few_regressions_from_previous_prs_pr10
Open

tomerqodo wants to merge 5 commits into
copilot_full_base_fix_a_few_regressions_from_previous_prs_pr10from
copilot_full_head_fix_a_few_regressions_from_previous_prs_pr10

Conversation

@tomerqodo

Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#10

Copilot AI review requested due to automatic review settings January 26, 2026 03:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Addresses regressions introduced by prior PRs around new-window handling, window feature propagation, and cookie API exposure/dispatch.

Changes:

  • Moves the on_new_window example wiring under #[cfg(all(desktop, not(test)))] and updates it to the renamed window-features builder API.
  • Renames the WebviewWindowBuilder window-features API and updates docs/usages accordingly.
  • Adjusts cookie type exposure in tauri::webview and modifies cookie dispatch in the Wry runtime.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
examples/api/src-tauri/src/lib.rs Updates the API example to configure on_new_window only on desktop and use the updated window-features builder call.
crates/tauri/src/webview/webview_window.rs Renames window-features builder API and updates documentation/example usage; adjusts feature application order.
crates/tauri/src/webview/mod.rs Re-exports Cookie from tauri_runtime and updates example to the renamed window-features builder call.
crates/tauri-runtime-wry/src/lib.rs Changes how cookie deletion is dispatched from the Wry webview dispatcher.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*self.window_id.lock().unwrap(),
self.webview_id,
WebviewMessage::DeleteCookie(cookie.clone().into_owned()),
WebviewMessage::SetCookie(cookie.into_owned()),

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

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

delete_cookie is dispatching WebviewMessage::SetCookie(...) instead of WebviewMessage::DeleteCookie(...), so callers will set the cookie rather than remove it. Switch the dispatched message variant to DeleteCookie to match the handler logic and the method name.

Suggested change
WebviewMessage::SetCookie(cookie.into_owned()),
WebviewMessage::DeleteCookie(cookie.into_owned()),

Copilot uses AI. Check for mistakes.
@@ -1312,13 +1312,13 @@ impl<R: Runtime, M: Manager<R>> WebviewWindowBuilder<'_, R, M> {
target_os = "netbsd",
target_os = "openbsd"
))]

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

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

This renames/removes the public builder API with_window_features to window_features. In a 2.x crate, removing a public method is a breaking change for downstream users. Consider keeping with_window_features as a deprecated wrapper that forwards to window_features (and update docs/examples to prefer the new name).

Suggested change
))]
))]
#[deprecated(
since = "2.0.0",
note = "Use `WindowBuilder::window_features` instead"
)]
pub fn with_window_features(self, features: NewWindowFeatures) -> Self {
self.window_features(features)
}
/// Set the window features.
/// Useful if you need to share the same window features, for instance when using the [`Self::on_new_window`].
#[cfg(any(
target_os = "macos",
windows,
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "netbsd",
target_os = "openbsd"
))]

Copilot uses AI. Check for mistakes.
self.window_builder = self.window_builder.position(position.x, position.y);
pub fn window_features(mut self, features: NewWindowFeatures) -> Self {
if let Some(size) = features.size() {
self.window_builder = self.window_builder.inner_size(size.width, size.height);

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

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

This line appears to have formatting that will fail cargo fmt -- --check (extra spaces between arguments). Please run rustfmt or adjust spacing so the file is formatted consistently.

Copilot uses AI. Check for mistakes.
if let Some(size) = features.size() {
self.window_builder = self.window_builder.inner_size(size.width, size.height);
if let Some(position) = features.position() {
self.window_builder = self.window_builder.position(position.x,position.y);

Copilot AI Jan 26, 2026

Copy link

Choose a reason for hiding this comment

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

This call is missing spaces after the comma separators, which will be changed by rustfmt and can cause cargo fmt -- --check to fail. Please run rustfmt or adjust spacing.

Copilot uses AI. Check for mistakes.
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.

4 participants