Skip to content

fix(mini-window): coalesce resize calls to prevent resize storm during streaming#71

Open
xiaocang wants to merge 2 commits intomasterfrom
claude/fix-miniwindow-resize-9dB5G
Open

fix(mini-window): coalesce resize calls to prevent resize storm during streaming#71
xiaocang wants to merge 2 commits intomasterfrom
claude/fix-miniwindow-resize-9dB5G

Conversation

@xiaocang
Copy link
Owner

@xiaocang xiaocang commented Feb 6, 2026

Route all ResizeWindowToContent() calls through RequestResize() which
uses a _resizePending flag to coalesce multiple concurrent resize
requests into a single layout+measure+resize per dispatcher tick.

Previously, streaming translations with 3 concurrent services could
trigger ~60 UpdateLayout+Measure+Resize cycles per second. With
coalescing, concurrent requests from the same tick merge into one call.

https://claude.ai/code/session_011z4iuKmi1kgo31n81A4uEH

…g streaming

Route all ResizeWindowToContent() calls through RequestResize() which
uses a _resizePending flag to coalesce multiple concurrent resize
requests into a single layout+measure+resize per dispatcher tick.

Previously, streaming translations with 3 concurrent services could
trigger ~60 UpdateLayout+Measure+Resize cycles per second. With
coalescing, concurrent requests from the same tick merge into one call.

https://claude.ai/code/session_011z4iuKmi1kgo31n81A4uEH
@claude
Copy link

claude bot commented Feb 6, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Add MiniWindowLongTextTests with 4 test cases for >30 word input:
- InputDisplaysCorrectly: verifies long text accepted, captures baseline
- TranslationResizesWindow: verifies window grows to fit results
- StreamingProgressScreenshots: captures resize progression during streaming
- WindowHeightWithinBounds: verifies 200-800 DIP height constraints

Each test captures screenshots at key stages for visual regression
comparison via VisualRegressionHelper (ThresholdText = 8%).

https://claude.ai/code/session_011z4iuKmi1kgo31n81A4uEH
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.

2 participants