Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Sync upstream dev and fix macOS observer lifetime and borderless shadows - #3

Merged
twlite merged 8 commits into
devfrom
fix/upstream-sync-macos-pump-shadow
Nov 15, 2026
Merged

twlite merged 8 commits into
devfrom
fix/upstream-sync-macos-pump-shadow

Conversation

@twlite

@twlite twlite commented Nov 15, 2026

Copy link
Copy Markdown
Member

Merge tauri-apps/tao dev through 2f60c2d, preserve the fork's external macOS pump and dragging behavior, and fix two reproduced macOS defects. The macOS 26 blank-page report itself remains unconfirmed; this PR does not claim to resolve it.

Upstream synchronization

  • Separate history-preserving merge commit 392ff56; no rebasing or changes to the fork's existing dev branch.
  • Manually resolved the two conflict regions in app_state.rs: combine upstream's redraw reentrancy guard (queue redraw while in callback, then clear the guard) with the fork's stop-on-redraw condition; retain stop_app_immediately and adopt the typed AppDelegate argument.
  • Retain upstream's define_class migrations, borderless maximizable fix, redraw queuing, Linux theme changes and Windows monitor selection. Windows/Linux source matches upstream exactly. Preserve custom pump scheduling, callback handling, dragging patches and existing fixtures. No fork patches were removed as redundant.
  • cargo check --all-targets passed on the completed merge before starting fixes.

Reproduced lifecycle panic and loading investigation

Commit 841ed17 owns and removes/releases CF observers with EventLoop and gives each observer balanced weak context ownership. Previously the observers survived EventLoop/PanicInfo destruction. Continuing the embedding host's NSRunLoop reproduced both exact panic messages in github/copilot-cli#5398 (missing panic info and the secondary Option::unwrap); the fixture passes after the fix.

Added a localhost HTTP adaptation of the issue reproduction: initial launch before window creation, two WKWebViews, 50ms external pump cadence, recurring fetches, JS evaluation, IPC, synthetic keyboard delivery, window destruction, LoopDestroyed and host run-loop progress after dropping Tao. Navigation and JS/IPC are asserted before posting input. Poll and Wait both report roots=2, ticks=26, ipc=2, js=2, destroyed=2, shutdown=1.

The merged baseline already loaded pages and processed subsequent HTTP requests without interaction on this host. Investigated repeated NSApplication.run calls, redraw/before-wait stop conditions and the existing skip-one-idle-boundary allowance; left scheduling unchanged because starvation did not reproduce. No run_return substitution or sleeps were added to Tao. The fixture's 50ms delay models the host timer.

Borderless shadows

Commit 002db4a explicitly applies setHasShadow for both true and false. AppKit defaults to false for a borderless window without other style bits. The baseline failed the reported combination; the fix passes all 16 combinations of decorations/resizable/minimizable/shadow plus runtime style and shadow changes. Tested style mutations preserve the explicit value, so no additional stored state or style-mask override was necessary. Public API unchanged.

Related: github/copilot-cli#5398 and webviewjs/webview#91. Neither issue is marked resolved by this PR.

Validation

Local host: Apple Silicon, macOS 27.0.1 (26A434).

Passed:

  • cargo fmt --all -- --check and standalone fixture formatting
  • cargo check --all-targets on merge
  • cargo test --all-targets
  • cargo test --all-targets --features serde,rwh_04,rwh_05,rwh_06
  • cargo clippy --all-targets (warnings remain)
  • cargo check --all-targets --target x86_64-pc-windows-gnu (compile only)
  • HTTP fixture in Poll and Wait, including post-drop NSRunLoop and keyboard assertions
  • Shadow flag matrix and runtime mutations
  • Existing WKWebView fixture: Poll baseline, Wait, forced native redraw; navigation/DOM/JS mutation/timers passed. Blocking control exited successfully and logs confirmed navigation/JS/mutation.

Limits:

  • Linux cross-check attempted but blocked by libdbus-sys: target pkg-config/sysroot is not configured on this Mac. No Linux compilation success claimed.
  • macOS 15/26 unavailable. The macOS 26 loading stall remains unresolved pending reproduction there.
  • Rust/Wry integration exercised; affected Node/libuv/N-API addon and live mouse dragging were not tested. Windows runtime/MSVC not tested. Shadow state verified through hasShadow, not visual compositor measurement.
  • Fixture commands and baseline observations documented in test-fixtures/macos-pump-wry/README.md. Run GUI fixtures with an external timeout to catch stuck pumps.

Final dependency SHA: 002db4a.

R1cK-ChaN and others added 8 commits November 3, 2026 16:02
…auri-apps#1411)

* fix(macos): preserve maximizable state without a native zoom button

* fix(macos): preserve conditional zoom button initialization

* docs(changelog): mention maximizable state after decoration changes
* refactor(macos): migrate `WindowDelegate` to `define_class!`

* migrate msg_send

* migrate `TaoWindow`

* clippy

* fmt

* migrate sendEvent

* clean up

* progress bar

* app

* AppDelegate

* clean up

* `as_super` is different from `super(self)`

* remove `CreationError` resolve todo

* `as_super` is different from `super(self)`

mirror cffe16b

* unused import
@twlite
twlite merged commit 73ab3e9 into dev Nov 15, 2026
@twlite
twlite deleted the fix/upstream-sync-macos-pump-shadow branch November 15, 2026 11:17
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.

6 participants