Skip to content

Fix washed-out UI after window resize#537

Open
Fanzzzd wants to merge 2 commits intoDimillian:mainfrom
Fanzzzd:fix/resize-transparency-overlay-536
Open

Fix washed-out UI after window resize#537
Fanzzzd wants to merge 2 commits intoDimillian:mainfrom
Fanzzzd:fix/resize-transparency-overlay-536

Conversation

@Fanzzzd
Copy link
Contributor

@Fanzzzd Fanzzzd commented Mar 4, 2026

Summary

  • reapply liquid glass effect when the window is resized
  • add a small regression test for resize reapply

Closes #536

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +88 to +90
const handleResize = () => {
if (!cancelled && !reduceTransparency) {
void apply();

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

UI becomes washed out / semi-transparent after window resize

2 participants