{"version":"2.1.271","anchor":"terminal-resize-now-forces-a-layoutrender-pass-even-before","canonical_anchor":"terminal-resize-now-forces-a-layoutrender-pass-even-before","heading":"Terminal renderer always recomputes stale layout before drawing","tier":"notice","area":"Terminal UI","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271\/e\/terminal-resize-now-forces-a-layoutrender-pass-even-before","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.271","markdown":"### Terminal renderer always recomputes stale layout before drawing\n\nThe terminal UI now recalculates layout whenever it's marked stale, including on the very first resize, before drawing a frame\n\n**What**\n\nThe terminal renderer (built on the ink library) now makes sure layout is up to date before it paints a frame.\n\n- 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.\n\n- 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.\n\n**Why**\n\nWithout 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.\n\n- Area: Terminal UI\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5"}