From 79d2379d668cb651102ff1bedd1aa6b7f93ea20f Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 31 Oct 2026 17:15:58 +0800 Subject: [PATCH] gui: openModal's comments cut down, room in the core budget for #3492 Two comments in openModal say the same in fewer words (25 bytes), so the next commit's quiet redraw of the provider editor (#3492, 23 bytes on today's main) stays inside coreScriptBudget with no raise. Comments only; no behavior changes. What was run: the core's script sizes summed as TestCoreScriptBudget sums them: 1,541,425 of 1,541,427 with the next commit, 1,541,450 without this one. TestCoreScriptBudget itself is run with the next commit (its body). --- internal/gui/assets/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index e53a77224..06135a82b 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -8705,14 +8705,14 @@ function openModal(content) { const m = $("#modal"), d = m.firstElementChild; const fresh = m.hidden || m.classList.contains("out"); const top = m.hidden ? 0 : d.querySelector(".ebody")?.scrollTop || 0; - // Names & levels scrolls inside the editor body, so keep its own position. + // Names & levels scrolls inside the body: keep its place. const names = !fresh && d.querySelector(".mnames:not([hidden])"); const namesAt = names && { provider: names.dataset.provider, top: names.scrollTop }; m.classList.remove("out"); d.classList.remove("swap"); if (!fresh) { void d.offsetWidth; d.classList.add("swap"); } // content changed: a soft refresh, not a re-entrance frame(content); - // an editor that reads long text (a prompt's) takes a wider dialog + // an editor of long text (a prompt's) takes a wider dialog d.classList.toggle("wide", content.classList.contains("wide")); // Keep focus through a redraw of an open editor. const active = d.contains(document.activeElement) ? document.activeElement : null;