routing: a group editor's labels are level with their controls, and every hint 4px under it (the owner)

Models' and Patterns' lists, empty in a new group, still took a grid row,
so the add button and the pattern input began 6-10px under their labels
(Models 7.5px, Patterns 11px off). Slow to start's and Context's hints sat
12px under their choices (an 8px wrap gap plus the hint's 4px margin) where
every other row's sit 4px.

- app.css: `.fallback .fbl:empty` takes no row. This was already so for the
  rules list (.rt-rules); it now holds for every .fallback, the provider
  editor's Fallback list among them, and the rt-rules copy goes.
- routing.css: the pattern input's 4px margin only follows a list with
  patterns in it; ctx-wrap's row gap is 4px and its hint has no margin.

Run at dd25997a4 + this change:
- new internal/gui/tests/group-editor-align.test.cjs: chromium and webkit,
  en/zh/zh-TW/ja/de, a new group and one with members and a pattern; each
  label's first line within 2px of its control's, each hint <=4px under.
  20/20 pass; 10/10 chromium fail with the CSS change stashed.
- measured by hand: every row now within 1.5px (chromium) / 1.7px (webkit),
  in web and app mode.
- full GUI suite (741 files, --test-concurrency=6): 15 reds in 11 files.
  Rerun alone, with and without this change, the same 4 fail both ways and
  are filed: quota-count-wrap and quota-name-translated in webkit
  (#2228, #2399), refusal-retries-setting ja 420 (#2258). The other 8 files
  (context-picks, copilot-signed-out-account, images-library-way,
  library-env-refs, library-gone-agents, login-import, routing-model-rest,
  routing-wb-restricted) pass alone both ways; they failed only under the
  6-way parallel run.
- not tried: the real desktop window; Linux WebKitGTK (no motion or new API
  here, only grid rows and gaps).
This commit is contained in:
yetone
2026-10-15 21:10:59 +08:00
parent 4a6bf80f48
commit dcf292cc8e
3 changed files with 121 additions and 4 deletions
@@ -405,7 +405,8 @@ button.rt-session { cursor: pointer; }
/* a classifier that failed (#1929): a dot, never a stripe */
.rt-group .mem.clsfail { color: var(--amber); }
.rt-group .mem.clsfail .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.rt-patadd { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.rt-patadd { display: flex; gap: 6px; align-items: center; }
.rt-pats .fbl:not(:empty) + .rt-patadd { margin-top: 4px; }
.rt-patadd input { flex: 1; min-width: 0; }
.rt-group .tags { display: flex; gap: 4px; flex: none; }
.rt-group .tag { font-size: 11px; line-height: 18px; padding: 0 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); white-space: nowrap; }
@@ -440,8 +441,9 @@ button.rt-session { cursor: pointer; }
.rt-gedit { cursor: default; scroll-margin-top: 12px; }
.rt-gedit .ehead.fold { cursor: pointer; }
.rt-gedit .segs { max-width: 100%; }
.rt-gedit .ctx-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rt-gedit .ctx-wrap .hint { flex-basis: 100%; }
/* its hint as close under the choices as every other row's: 4px */
.rt-gedit .ctx-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.rt-gedit .ctx-wrap .hint { flex-basis: 100%; margin-top: 0; }
.rt-gedit .gsuffix { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.rt-gedit .gsuffix .hint { overflow-wrap: anywhere; }
.rt-gedit .ctx-wrap input.ctx-in { width: 96px; flex: none; }
@@ -553,7 +555,6 @@ button.rt-session { cursor: pointer; }
.rt-gadds > [hidden] { display: none; }
/* a group's rules, each one line read as a sentence: the conditions it
has, → and the model it sends that turn to first; its acts under ⋯ */
.rt-rules .fbl:empty { display: none; }
.rt-rules .fbl:not(:empty) + .rt-gadds { margin-top: 2px; }
/* the rules share their columns (each rule a subgrid of the list), so
every rule's → and model start at one x: the number, the conditions