Fix terminal resizing crash in TUI app#584
Conversation
…sts (TUI-002) - Add RESIZE_DEBOUNCE_S (200ms), _resize_timer, on_resize, _apply_resize to tui/app.py BernsteinApp matching dashboard.py pattern - Remove @pytest.mark.skip from TestResizeDebounce — all 6 tests now pass - TUI-002 viewport clipping already implemented in dashboard.py; all 11 viewport tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI Review (Gemini)Gemini review could not be generated (HTTP 503). |
AI Review (GitHub Models)SummaryThe pull request addresses a critical issue that causes the TUI (Text User Interface) application to crash during terminal resizing events. By implementing proper error handling and state management during these events, the change enhances the robustness and user experience of the application. Risk AssessmentMedium: While the fix is aimed at preventing crashes, any changes around terminal interactions can introduce new UI behavior issues. There's a potential for regression if other parts of the application rely on the previous handling of resize events. Actionable Recommendations
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by grok-code-fast-1 · 166,143 tokens |
|
CI Summary
Coverage and detailed reports are available via Codecov and the Checks tab. |
…sts (TUI-002) (#584) - Add RESIZE_DEBOUNCE_S (200ms), _resize_timer, on_resize, _apply_resize to tui/app.py BernsteinApp matching dashboard.py pattern - Remove @pytest.mark.skip from TestResizeDebounce — all 6 tests now pass - TUI-002 viewport clipping already implemented in dashboard.py; all 11 viewport tests pass Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>



Fix terminal resizing crash in TUI app
Fix terminal resizing crash in TUI app
Description
Rapidly resizing the terminal while the TUI is running can cause layout calculation errors and crashes in Textual. Add a resize debounce handler that delays layout recalculation until resizing settles (200ms debounce) and catches layout errors gracefully.
Role: frontend
Model: sonnet
Tests: All 17 tests pass (previously 11 passed + 6 skipped). Now let me run lint:
Generated by Bernstein — task
6e9a847923c6