Summary
Zooming the terminal font or resizing the terminal while the interactive TUI is open causes repeated full-screen redraws. The screen visibly flashes/jumps and interrupts reading.
This is independent of the periodic refresh setting: it reproduces with --refresh 0.
Steps to reproduce
-
Run:
codeburn report --refresh 0
-
Scroll or focus on a lower dashboard section.
-
Zoom the terminal font in or out, or continuously resize the window.
Actual behavior
Each terminal resize event immediately calls app.rerender(dashboard()). A font zoom can emit a burst of resize events, producing repeated whole-screen redraws.
Current handler:
|
const resize = () => { |
|
windowColumns = process.stdout.columns |
|
app.rerender(dashboard()) |
|
} |
|
process.stdout.prependListener('resize', resize) |
Expected behavior
Coalesce a burst of resize events and reflow once after the terminal dimensions settle. Preserve the current period, view, and scroll/cursor position. A single final repaint may be unavoidable with Ink; repeated visible repaints should not occur.
Suggested direction
Debounce the stdout resize handler (for example, 100–200 ms) and clear the timer during cleanup before calling app.rerender once with the final width.
Environment
- CodeBurn 0.9.20
- macOS 26.6.1
- Fish 4.8.1
TERM=xterm-kitty
Workaround
Avoid zooming/resizing while reading. A slower periodic cadence such as --refresh 300 reduces timer-driven updates but does not fix resize-triggered redraws.
Summary
Zooming the terminal font or resizing the terminal while the interactive TUI is open causes repeated full-screen redraws. The screen visibly flashes/jumps and interrupts reading.
This is independent of the periodic refresh setting: it reproduces with
--refresh 0.Steps to reproduce
Run:
Scroll or focus on a lower dashboard section.
Zoom the terminal font in or out, or continuously resize the window.
Actual behavior
Each terminal resize event immediately calls
app.rerender(dashboard()). A font zoom can emit a burst of resize events, producing repeated whole-screen redraws.Current handler:
codeburn/src/dashboard.tsx
Lines 1709 to 1713 in 9437fb6
Expected behavior
Coalesce a burst of resize events and reflow once after the terminal dimensions settle. Preserve the current period, view, and scroll/cursor position. A single final repaint may be unavoidable with Ink; repeated visible repaints should not occur.
Suggested direction
Debounce the stdout
resizehandler (for example, 100–200 ms) and clear the timer during cleanup before callingapp.rerenderonce with the final width.Environment
TERM=xterm-kittyWorkaround
Avoid zooming/resizing while reading. A slower periodic cadence such as
--refresh 300reduces timer-driven updates but does not fix resize-triggered redraws.