Skip to content

TUI: terminal zoom/resize causes repeated full-screen redraws #977

Closed

Description

@alexei-led

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

  1. Run:

    codeburn report --refresh 0
  2. Scroll or focus on a lower dashboard section.

  3. 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

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.

Activity

  1. added a commit that references this issue on Aug 19, 2026
    ad406cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions