Skip to content

fix: a few regressions from previous PRs - #23

Open
tomerqodo wants to merge 5 commits into
greptile_combined_20260121_qodo_grep_cursor_copilot_1_base_fix_a_few_regressions_from_previous_prs_pr170from
greptile_combined_20260121_qodo_grep_cursor_copilot_1_head_fix_a_few_regressions_from_previous_prs_pr170
Open

tomerqodo wants to merge 5 commits into
greptile_combined_20260121_qodo_grep_cursor_copilot_1_base_fix_a_few_regressions_from_previous_prs_pr170from
greptile_combined_20260121_qodo_grep_cursor_copilot_1_head_fix_a_few_regressions_from_previous_prs_pr170

Conversation

@tomerqodo

Copy link
Copy Markdown

Benchmark PR from qodo-benchmark#170

@greptile-apps

greptile-apps Bot commented Jan 21, 2026

Copy link
Copy Markdown

Greptile Summary

This PR attempts to fix regressions from previous PRs by renaming with_window_features to window_features, adding a Cookie re-export, and reorganizing code in the API example.

Key changes:

  • Renamed with_window_features() to window_features() in WebviewWindowBuilder
  • Added pub use tauri_runtime::Cookie re-export with v3 deprecation note
  • Moved on_new_window callback inside desktop cfg block in example
  • Changed new window naming from "new-{number}" to "new-window-{number}"
  • Critical bug: delete_cookie() incorrectly sends SetCookie message instead of DeleteCookie, completely breaking cookie deletion functionality
  • Spacing inconsistencies in window_features() parameter formatting

Confidence Score: 0/5

  • This PR is NOT safe to merge due to a critical bug that breaks cookie deletion
  • The delete_cookie function sends SetCookie instead of DeleteCookie message, making it impossible to delete cookies. This is a critical functional regression that will break any code relying on cookie deletion.
  • crates/tauri-runtime-wry/src/lib.rs requires immediate attention - the delete_cookie bug must be fixed before merging

Important Files Changed

Filename Overview
crates/tauri-runtime-wry/src/lib.rs Critical bug: delete_cookie sends SetCookie message instead of DeleteCookie, making cookie deletion impossible
crates/tauri/src/webview/webview_window.rs Renamed with_window_features to window_features with inconsistent spacing in parameter lists
crates/tauri/src/webview/mod.rs Added Cookie re-export from tauri_runtime and updated method name in documentation
examples/api/src-tauri/src/lib.rs Reorganized code to move on_new_window callback inside desktop cfg block, changed window ID format

Sequence Diagram

sequenceDiagram
    participant User
    participant WebviewWindow
    participant WebviewWindowBuilder
    participant WryWebviewDispatcher
    participant WebviewRuntime
    
    Note over WebviewWindowBuilder: Regression fixes applied
    
    User->>WebviewWindowBuilder: on_new_window(url, features)
    WebviewWindowBuilder->>WebviewWindowBuilder: window_features(features)
    Note over WebviewWindowBuilder: Renamed from with_window_features
    WebviewWindowBuilder->>WebviewWindowBuilder: Apply size & position
    WebviewWindowBuilder->>WebviewWindow: build()
    
    User->>WryWebviewDispatcher: delete_cookie(cookie)
    WryWebviewDispatcher->>WebviewRuntime: WebviewMessage::SetCookie
    Note over WryWebviewDispatcher,WebviewRuntime: BUG: Should be DeleteCookie!
    WebviewRuntime->>WebviewRuntime: set_cookie() called instead
    
    Note over WebviewWindow: Cookie re-export added<br/>from tauri_runtime::Cookie
Loading

@greptile-apps greptile-apps Bot 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.

4 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

logic: delete_cookie is sending SetCookie instead of DeleteCookie, making cookie deletion impossible

Suggested change
WebviewMessage::SetCookie(cookie.into_owned()),
WebviewMessage::DeleteCookie(cookie.into_owned()),
Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/tauri-runtime-wry/src/lib.rs
Line: 1718:1718

Comment:
**logic:** `delete_cookie` is sending `SetCookie` instead of `DeleteCookie`, making cookie deletion impossible

```suggestion
        WebviewMessage::DeleteCookie(cookie.into_owned()),
```

How can I resolve this? If you propose a fix, please make it concise.

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

syntax: Extra spaces between size.width, and size.height

Suggested change
self.window_builder = self.window_builder.inner_size(size.width, size.height);
self.window_builder = self.window_builder.inner_size(size.width, size.height);

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/tauri/src/webview/webview_window.rs
Line: 1317:1317

Comment:
**syntax:** Extra spaces between `size.width,` and `size.height`

```suggestion
      self.window_builder = self.window_builder.inner_size(size.width, size.height);
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

syntax: Missing space after position.x,

Suggested change
self.window_builder = self.window_builder.position(position.x,position.y);
self.window_builder = self.window_builder.position(position.x, position.y);

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: crates/tauri/src/webview/webview_window.rs
Line: 1321:1321

Comment:
**syntax:** Missing space after `position.x,`

```suggestion
      self.window_builder = self.window_builder.position(position.x, position.y);
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

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.

3 participants