From 62044305e3cc2bf2ee37fded63a5191425622c2e Mon Sep 17 00:00:00 2001 From: yetone Date: Fri, 13 Nov 2026 04:51:49 +0800 Subject: [PATCH] editor: a check-in or warm-up row holds its hidden line, so the dialog grows no second scrollbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A provider's check-in and warm-up rows keep a .sub line out of sight, position:absolute under hover. Their .who is display:contents and has no box, so the line was held against the .dialog: with Advanced open the dialog grew a scroll of its own (e.g. 1117 over 810) beside the editor's, and in WebKit every row was 8px narrower (de 560 "Gewicht 3 ยท 75%" ran 2px past its row). Happens on main whenever Advanced is opened. The row is now the line's containing block. account-weight opens Advanced and checks the dialog doesn't scroll. Run (mica, mica-run, both engines, en de ja zh zh-TW where a file takes languages; mote was over 18 load every check): - The four changes together: account-weight, account-proxy, routing-js 26/26; routing-advanced, proxy-gaps, login-export, routing-save, key-weight green; account-arrange red as on main (#6010). - About 40 files around the editor (prefs, check-in, warm-up, proxy, routing, export): 698/730. The same reds on origin/main 2d2333cfa: checkin-now-account (#6029), editor-advanced-align (#4615), settings-lines-wrap chromium de 440 (#6353), account-arrange (#6010). Flakes under the concurrent run: ResizeObserver page errors in checkin-account and codex-auto-reset-settings (commented on #6108), provider-advanced-fold webkit zh growth (#2552, #5417), proxy-login-fields chromium zh click (#6374, 5/5 alone here and on main). Two passes over those five files again: only proxy-login-fields chromium zh, once. - i18n-keys green (no strings added). Broken by hand, each red: - dialog: without `.row.pref { position: relative }` account-weight goes red in both engines ("the dialog scrolls beside the editor (945,810)"). - Routing back on the editor (ed.append): routing-advanced 10/10 red. - Export with the plus again: login-export red ("Export has the plus"). - Proxy's .off back to visibility:hidden: proxy-gaps 20/20 red ("43px under the provider's options"). Not tried: the whole GUI suite (another session's full suite was on mica, mote over load), the real Linux WebKitGTK app, Windows. No Go changed. --- internal/gui/assets/app.css | 4 ++++ internal/gui/tests/account-weight.test.cjs | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index 2e70ab92b..9a70dc1b7 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -5250,6 +5250,10 @@ body .row.agent .ag-prefs .row.pref .who { display: block; } .editor .prov-prefs .row.pref { display: grid; grid-template-columns: minmax(min(40%, 9em), 1fr) auto; align-items: start; min-height: 0; padding: 0; gap: 2px 12px; border: 0; } .editor .prov-prefs .row.pref[hidden] { display: none; } .editor .prov-prefs .row.pref > .who { display: contents; } +/* so the row holds the line kept out of sight (.who has no box to): held + against the dialog it sat under the editor's scroll, and the dialog grew + a second scrollbar beside the editor's, the rows 8px narrower in WebKit */ +.editor .prov-prefs .row.pref { position: relative; } .editor .prov-prefs .row.pref > .who > * { grid-column: 1 / -1; } .editor .prov-prefs .row.pref > .who > .name { grid-column: 1; grid-row: 1; } .editor .prov-prefs .row.pref > :not(.who) { grid-column: 2; grid-row: 1; justify-self: end; min-width: 0; margin-left: 0; } diff --git a/internal/gui/tests/account-weight.test.cjs b/internal/gui/tests/account-weight.test.cjs index a0f0c58d5..2665341ba 100644 --- a/internal/gui/tests/account-weight.test.cjs +++ b/internal/gui/tests/account-weight.test.cjs @@ -133,6 +133,13 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", // back to Smart hides them await page.locator(".editor").getByRole("button", { name: await say(page, lang, "Smart"), exact: true }).first().click(); assert.equal(await chip("max@example.com").isVisible(), false, `${at}: a weight under Smart`); + // Advanced open, as a user may have it + { const adv = page.locator(".editor details.advanced"); await adv.waitFor({ state: "attached" }); if (!(await adv.evaluate((d) => d.open))) await adv.locator(":scope > summary").click(); } + // open, the editor scrolls and the dialog around it doesn't: the lines + // its check-in and warm-up rows keep out of sight were held against + // the dialog and grew it a second scrollbar, every row 8px narrower + const dialog = await page.evaluate(() => { const d = document.querySelector(".dialog"); return [d.scrollHeight, d.clientHeight]; }); + assert.ok(dialog[0] <= dialog[1] + 1, `${at}: the dialog scrolls beside the editor (${dialog})`); assert.deepEqual(errors, [], at); await context.close(); }