From ee119fe4373028029a8c1db08d07cd037cd88b70 Mon Sep 17 00:00:00 2001 From: nntrivi2001 Date: Fri, 30 Oct 2026 10:33:57 +0700 Subject: [PATCH] fix(terminal): restamp every glyph-atlas page so no pane keeps a stale texture v2.8.42 reacted to a page merge by toggling the font family on the next frame, so each renderer re-acquired an atlas. Panes still showed squeezed, overlapping glyphs: the toggle lands a frame late, swaps every pane onto a fresh atlas (or onto one another pane already toggled to), and a page added without a merge shifts nothing yet still raced it. addon-webgl 0.20 fixes the root cause with globally monotonic page versions. Do the same on 0.19: whenever the shared atlas adds, removes or merges a page, give every page a version no texture slot has uploaded, synchronously, so every renderer on that atlas re-uploads all pages before it draws again. When the page comes back from the background, restamp and repaint. An addon of another shape keeps the old font-toggle fallback. --- .../lanes/__tests__/LaneDiffView.test.tsx | 2 +- client/src/components/run/TerminalView.tsx | 64 +++++++++++++++---- .../run/__tests__/TerminalView.test.tsx | 56 ++++++++++++++-- 3 files changed, 105 insertions(+), 17 deletions(-) diff --git a/client/src/components/lanes/__tests__/LaneDiffView.test.tsx b/client/src/components/lanes/__tests__/LaneDiffView.test.tsx index defb2a3e..ec278082 100644 --- a/client/src/components/lanes/__tests__/LaneDiffView.test.tsx +++ b/client/src/components/lanes/__tests__/LaneDiffView.test.tsx @@ -615,7 +615,7 @@ describe("LaneDiffView — a row the server cut down", () => { ...FILE, hunks: [ { - ...FILE.hunks[0]!, + ...FILE.hunks![0]!, lines: [ { type: "del", oldLine: 1, newLine: null, text: '