Commit Graph
2 Commits
Author SHA1 Message Date
yetone 1b9b97f8db gui: a provider's dialog grows out of its icon and name, as an add sheet tile's does
The owner, 10-21: the provider editor's opening was stiff ("太生硬"), and
the add sheet's, opening a vendor's tile, is the one to follow. Both run
through openModal's morph, but a tile is narrower than the dialog, so the
dialog starts shrunk to it (scale ~.4) and zooms out; a provider row is
wider than the dialog, so the scale stayed 1 and the dialog opened as a
full-size strip widening over the row, its text at full size from the
first frame.

A provider row is now measured as a tile: from its left edge to where
its name and host line's words end (rowOwnRect, the text nodes' extents;
a range over the block spans its whole width), the row's height. The
dialog grows out of that and folds back into it, as a tile's does.

Run on origin/main b855cfee9 + this commit, macOS, playwright 1.62.0:
- modal-morph.test.cjs: 6/6 chromium and webkit, 1240 and 420px. Its new
  checks (starts at the row's left, ends before the words do, scale < .8;
  closes into the same) are red on the old app.js: chromium 1240 and 420
  fail.
- frames held at 8/16/30/50% of the opening and closing, row beside the
  add sheet's Custom provider tile, looked at side by side.
- go test ./internal/gui/ -run Budget ok; gofmt -l clean.

Shipped at the owner's word (10-21, "赶紧上线") before the full GUI suite
finished: it was stopped at ~2,040 passing tests (about a quarter of the
files, on b855cfee9 + the dialog change), with two reds,
desktop-longest chromium zh 640px and gateway-key-groups chromium en,
both under load at ~100. On origin/main c79400556 + both commits (rebased after onto
e68a0b1db, which adds only internal/sessions):
desktop-longest, gateway-key-groups, modal-morph, lightweight,
segs-glide, segs-press-redraw and settings-general 108/108 in chromium
and webkit; go test ./internal/settings/ ok; go test ./internal/gui/
-run 'Budget|Lightweight' ok; gofmt -l clean; GOOS=linux go vet -tags
nogui and GOOS=windows go vet of internal/settings and internal/gui.
Not run: the rest of the GUI suite.
2026-10-21 18:45:23 +08:00
yetone d9d1680ab6 gui: a dialog grows out of the row that opened it and folds back into it
The owner, 10-20: a provider's editor "从右上角弹出" and should open from
the provider's row and close back into it, as iOS does. openModal scaled
the dialog from the row's rect, but a row is wider than the dialog, so
scale alone left a full-size dialog sliding in from the row's middle.

Now the dialog starts as a strip the row's size (transform plus a
clip-path inset, morphFrom), grows into the dialog on the spring, and
closeModal runs it back into the row. The backdrop fades its own
background and blur (VEIL_OFF) instead of the modal's opacity, which
faded the dialog with it, so a dialog folding back stays visible until
it lands. A ResizeObserver keeps the start on the row when an editor
settles its size after it was measured. Reduced motion still only fades.

Every page's dialogs open through the core, so app.js's budget rises
(1,271,683 bytes).

Run on origin/main 75e769a9f + this commit, macOS, playwright 1.62.0:
- modal-morph.test.cjs (new): 6/6, chromium and webkit at 1240 and 420px;
  it fails without the change in webkit.
- gofmt -l clean; go test ./internal/gui/ -run TestCoreScriptBudget ok.
- Full GUI suite (814 files, --test-concurrency=4) on this commit with
  the two after it, on 75e769a9f before the rebase: 11,385 pass, 90
  fail. The morph's own reds (modal-morph chromium 1240 and 420) were
  under load: 6/6 run alone on the rebased head. The rest are the agent
  settings commit's (fixed there) or red alone on origin/main a9304efe0
  too: codex-predictions 420px (#2624), quota-count-wrap and
  quota-name-translated (#2228), routing-bodies, routing-request-metrics,
  s3-sync (#2658), usage-agents-hide, usage-fold (#2399), usage-checkin
  webkit and rail-tip (#3091). agy-launch and name-suffix-remote were red
  only in the full run and pass alone.
- An earlier full run on this commit alone was cut short, not finished.
2026-10-21 02:06:18 +08:00