Skip to content

Fix Wry port review findings - #9

Merged
OlympusLedgerOrg merged 4 commits into
devfrom
split-wry-review-fixes-2026-07-09
Jul 10, 2026
Merged

Fix Wry port review findings#9
OlympusLedgerOrg merged 4 commits into
devfrom
split-wry-review-fixes-2026-07-09

Conversation

@OlympusLedgerOrg

@OlympusLedgerOrg OlympusLedgerOrg commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • applies the real Wry findings from the local CodeRabbit review
  • covers custom protocol/path handling, WebKit cookie/delegate fixes, workflow pinning, docs, SPDX/security policy, and Android handler safety
  • leaves root and Tao changes to separate PRs

Split

Part 3 of 3 replacing #6.

Validation

  • cargo fmt --manifest-path ports/wry/Cargo.toml --all --check
  • cargo check --manifest-path ports/wry/Cargo.toml --all-targets
  • actionlint ports/wry/.github/workflows/bench.yml ports/wry/.github/workflows/covector-comment-on-fork.yml
  • git diff --check origin/dev..HEAD

Summary by CodeRabbit

  • Bug Fixes
    • Safer custom protocol asset resolution with stronger path containment and clearer 404/415 responses.
    • Improved example/titlebar IPC robustness to ignore malformed messages instead of crashing.
    • More flexible cookie domain matching (including subdomains) with added test coverage.
    • More reliable downloads and improved filename handling across platforms.
    • Reduced Android IPC/webview failure cases and hardened URL workaround behavior.
  • Documentation
    • Updated mobile setup instructions, security disclosure guidance, issue-template wording, license metadata, and changelog spelling.
  • Chores
    • Improved benchmark and CI workflow reliability/pinning.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 15099398-b216-4c73-b511-fb03669cbabf

📥 Commits

Reviewing files that changed from the base of the PR and between e97a327 and 67532d5.

📒 Files selected for processing (1)
  • ports/wry/.github/workflows/bench.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • ports/wry/.github/workflows/bench.yml

📝 Walkthrough

Walkthrough

The PR updates Wry callback thread-safety contracts, custom protocol validation, native platform error handling, benchmark publishing, workflow pinning, workspace metadata, and project documentation.

Changes

Wry maintenance and robustness

Layer / File(s) Summary
Callback contracts and WebView state
ports/wry/src/lib.rs, ports/wry/src/android/mod.rs, ports/wry/src/wkwebview/mod.rs
WebView callbacks require Send + Sync, protocol handlers use Arc, and cookie filtering supports domain and subdomain matching.
Protocol validation and example handling
ports/wry/examples/*, ports/wry/src/custom_protocol_workaround.rs
Custom protocol examples canonicalize paths, reject unsupported requests explicitly, correct multipart ranges, and apply URI rewrites only at matching prefixes.
Native platform error handling
ports/wry/src/android/*, ports/wry/src/webview2/util.rs, ports/wry/src/wkwebview/*, ports/wry/src/error.rs
Platform integrations handle failed sends, missing lookups, optional native values, device-context cleanup, upload completion, download filenames, and corrected error formatting.
Repository configuration and automation
ports/wry/Cargo.toml, ports/wry/LICENSE.spdx, ports/wry/build.rs, ports/wry/.github/workflows/*
Workspace and SPDX metadata, generated Kotlin headers, benchmark branch publishing, and workflow action references were updated.
Documentation and project metadata
ports/wry/.github/ISSUE_TEMPLATE/*, ports/wry/CHANGELOG.md, ports/wry/MOBILE.md, ports/wry/SECURITY.md
Issue-template wording, changelog spelling, Android download commands, supported versions, and vulnerability-reporting instructions were revised.

Estimated code review effort: 4 (Complex) | ~45 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the PR’s main goal of fixing Wry port review findings.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch split-wry-review-fixes-2026-07-09

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@ports/wry/.changes/readme.md`:
- Line 3: Change the attribution heading in ports/wry/.changes/readme.md to use
the existing repository convention of heading level 5 (`#####`), matching
`.changes/README.md` and keeping it subordinate to `# Changes`.

In `@ports/wry/.github/workflows/bench.yml`:
- Around line 101-111: Serialize benchmark publication for the matrix workflow
instead of letting each job push independently. Move the gh-pages update logic
from the “push new benchmarks” step into a single post-matrix job, or implement
a serialized fetch, rebase, and push-retry loop around the existing benchmark
publication commands so all matrix results are retained.

In `@ports/wry/SECURITY.md`:
- Line 18: Replace the generic “here” link text in SECURITY.md with descriptive
text such as “GitHub’s private vulnerability reporting guidance,” while
preserving the existing destination URL.
- Around line 12-16: Update the security reporting policy text in SECURITY.md to
replace references to “Tauri” with “Wry,” including the dependency wording, so
it clearly applies to Wry and its upstream dependencies.

In `@ports/wry/src/wkwebview/mod.rs`:
- Around line 112-128: Update cookie_domain_matches so a leading-dot cookie
domain matches the exact host as well as subdomains. After normalizing both
domains, allow strip_suffix to succeed with an empty prefix, while still
requiring a dot boundary for non-empty prefixes; preserve the existing
case-insensitive exact-match handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f074d8b1-f018-45d5-bce6-e28176ac9327

📥 Commits

Reviewing files that changed from the base of the PR and between 67719ec and 69d721a.

📒 Files selected for processing (24)
  • ports/wry/.changes/readme.md
  • ports/wry/.github/ISSUE_TEMPLATE/feature_request.md
  • ports/wry/.github/workflows/bench.yml
  • ports/wry/.github/workflows/covector-comment-on-fork.yml
  • ports/wry/CHANGELOG.md
  • ports/wry/Cargo.toml
  • ports/wry/LICENSE.spdx
  • ports/wry/MOBILE.md
  • ports/wry/SECURITY.md
  • ports/wry/build.rs
  • ports/wry/examples/async_custom_protocol.rs
  • ports/wry/examples/custom_titlebar.rs
  • ports/wry/examples/streaming.rs
  • ports/wry/src/android/main_pipe.rs
  • ports/wry/src/android/mod.rs
  • ports/wry/src/custom_protocol_workaround.rs
  • ports/wry/src/error.rs
  • ports/wry/src/lib.rs
  • ports/wry/src/webview2/util.rs
  • ports/wry/src/wkwebview/class/document_title_changed_observer.rs
  • ports/wry/src/wkwebview/class/wry_download_delegate.rs
  • ports/wry/src/wkwebview/class/wry_web_view_ui_delegate.rs
  • ports/wry/src/wkwebview/download.rs
  • ports/wry/src/wkwebview/mod.rs

Comment thread ports/wry/.changes/readme.md Outdated
Comment thread ports/wry/.github/workflows/bench.yml Outdated
Comment thread ports/wry/SECURITY.md Outdated
Comment thread ports/wry/SECURITY.md Outdated
Comment thread ports/wry/src/wkwebview/mod.rs

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ports/wry/.github/workflows/bench.yml (1)

101-119: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Run this step with Bash on Windows. push new benchmarks uses Bash-only syntax, but this matrix includes windows-latest and the step has no shell: bash, so it will fail there before publishing. Add shell: bash or rewrite the loop in PowerShell.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ports/wry/.github/workflows/bench.yml` around lines 101 - 119, Configure the
“push new benchmarks” workflow step to run with Bash by adding an explicit shell
setting, ensuring its Bash-specific loop and commands work on windows-latest
before publishing.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@ports/wry/.github/workflows/bench.yml`:
- Around line 101-119: Configure the “push new benchmarks” workflow step to run
with Bash by adding an explicit shell setting, ensuring its Bash-specific loop
and commands work on windows-latest before publishing.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: cda23fa3-1c0e-44c2-9b4b-d5ec3504c173

📥 Commits

Reviewing files that changed from the base of the PR and between 69d721a and e97a327.

📒 Files selected for processing (3)
  • ports/wry/.github/workflows/bench.yml
  • ports/wry/SECURITY.md
  • ports/wry/src/wkwebview/mod.rs
✅ Files skipped from review due to trivial changes (1)
  • ports/wry/SECURITY.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • ports/wry/src/wkwebview/mod.rs

@OlympusLedgerOrg
OlympusLedgerOrg merged commit a5f3f22 into dev Jul 10, 2026
16 checks passed
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