Group of 2 You'll notice
The terminal UI now recalculates layout whenever it's marked stale, including on the very first resize, before drawing a frame
What
The terminal renderer (built on the ink library) now makes sure layout is up to date before it paints a frame.
- On each render, if the root UI node's layout is marked stale, the renderer either handles a resize (if the terminal size actually changed) or forces a synchronous layout recalculation before drawing.
- Handling a terminal resize used to only trigger a re-render if a current node already existed; now, even before the first render has happened, a resize marks the root layout stale, recomputes layout, and schedules a render.
Why
Without this, the terminal UI could draw a frame using outdated layout dimensions, especially around the very first resize event, leading to visibly wrong sizing or positioning.