#942·ink

Feature: API or signal to trigger full re-render after terminal resize

Author: sstrausCreated May 3, 2026Updated May 3, 2026

Problem

When a terminal is resized to a narrower width and then expanded back, Ink's output from the narrow period stays "squished" — short lines in a wide terminal. This happens because:

  1. Terminal shrinks (e.g., 120 → 60 cols) → SIGWINCH sent
  2. Ink redraws current frame at 60 cols ✓
  3. Terminal expands back to 120 cols → SIGWINCH sent
  4. Ink redraws current frame at 120 cols ✓
  5. But scrollback content rendered during the narrow period stays at 60 chars

This is a fundamental issue for any terminal embedding scenario (split panes, side panels, etc.) where the terminal width changes temporarily.

Proposal

Add a mechanism for the hosting terminal/application to request a full re-render — not just the current frame, but a complete clear-and-redraw that would fix the visual appearance of previously rendered output.

Possible approaches:

  1. Signal handler (e.g., SIGUSR1) — terminal sends signal, Ink clears screen and redraws everything
  2. Public APIinstance.fullRedraw() or instance.clearAndRerender() that clears all previously rendered output and redraws from scratch
  3. Escape sequence response — Ink listens for a custom escape sequence (e.g., via stdin) and triggers a full repaint

Use case

Terminal multiplexers and terminal embedding apps (like Tauri-based terminals with side panels) frequently resize terminals temporarily. The squished output is a common complaint. Having a way to trigger a full repaint after resize would solve this across all embedding scenarios.

Current workaround

None that I'm aware of. The only option is to restart the Ink application.