Fix washed-out UI after window resize when Reduce transparency is enabled#537
Fix washed-out UI after window resize when Reduce transparency is enabled#537Fanzzzd wants to merge 2 commits intoDimillian:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4af62d000d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| useEffect(() => { | ||
| let cancelled = false; | ||
| const windowHandle = getCurrentWindow(); |
There was a problem hiding this comment.
Guard current-window lookup inside error-handled path
Moving getCurrentWindow() out of apply() means any synchronous failure now escapes the hook before the existing try/catch runs. In contexts where Tauri window internals are unavailable or not initialized yet (for example browser-only runs or tests that don’t mock this API), this will throw during effect setup and crash rendering instead of being reported through onDebug as before.
Useful? React with 👍 / 👎.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f6713074b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const handleResize = () => { | ||
| if (!cancelled && !reduceTransparency) { | ||
| void apply(); |
There was a problem hiding this comment.
Throttle liquid-glass reapply on resize
During an interactive window drag, resize fires repeatedly, and this handler calls apply() for every event. Because apply() performs async Tauri IPC (setEffects and, when supported, setLiquidGlassEffect), this can enqueue many native effect updates per second and cause visible jank before the final state settles. Coalescing resize events (debounce/throttle or single in-flight guard) would avoid this regression while still restoring the effect after resize.
Useful? React with 👍 / 👎.
When reduce transparency is enabled, liquid-glass effects are disabled. Tablet layout lacked a solid background on .tablet-main, so the window could appear fully transparent after resizing into tablet breakpoints. Add a tablet-only reduced-transparency fallback background.
7f67130 to
29ce382
Compare
|
Update after root-cause analysis: This issue is specifically in I rewrote this PR to a single minimal CSS fix that adds the missing tablet fallback. The previous resize reapply logic and related guard changes were removed, so we no longer rely on repeated native effect calls during resize. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
.tablet-mainRoot cause
Reduce transparencyis enabled.tablet-mainhad no fallbackWhy this approach
Closes #536