Patch @xterm/addon-fit to refresh the full viewport and restore scroll position after reflow, batch ResizeObserver through requestAnimationFrame to coalesce rapid-fire reflows, and recover terminal rendering after WebGL context loss.