Fix washed-out UI after window resize#537
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 👍 / 👎.
Summary
Closes #536