The add sheet drew "+ Custom provider" only under every preset section
(vendors, relays, local, remote), and only while the search was empty,
so it was hard to find. It is now a text button in the sheet's head,
right after "Find a vendor…", there as the sheet opens and kept while
searching; its old hint is its title. A search that finds nothing still
offers "Add it as a custom provider" in its line. Below 760px the head
wraps: the title, Import… and Close on the first line, the search and
Custom provider on a line of their own, so no language clips them. The
foot line and its styles are gone; app.js is 248 bytes smaller.
Run (WSL magpie-desktop, Playwright 1.62.0, Chromium + WebKit):
- add-sheet-custom.test.cjs (new): en, zh, zh-TW, ja, de at 980, 761
and 420px, 32/32 pass. Against origin/main's assets (MAGPIE_ASSETS)
0/32: no button in the head.
- add-sheet, provider-detect-draft, provider-add-gemini, model-id-space,
provider-curl-paste, system-one, provider-add-models,
provider-url-each-api, provider-retrieval-only, i18n-keys (selectors
moved from .custom-foot to .row-head) pass, but for reds that are red
the same at origin/main b46f23ffa in the same run (below).
- 72 GUI files that reach the add sheet, concurrency 3: the reds are
the same files as origin/main b46f23ffa run alone: vertex-editor
(#4720, #4721), tencent-cloud (#4321, #4399), remote-magpie (#4398),
plugin-moved-signin (#2900, #4218), plugin-signin-no-url (#5938,
filed now), plugin-pick-sub webkit ja 420 (#5937, filed now), plus
page.goto timeouts under the run's load (load ~70).
- plugins-more-discover, zcode-site-layout, provider-retrieval-only,
twice each at this change and at b46f23ffa: here 43/43 then 39/43,
there 41/43 twice; webkit "More in Plugins opens Discover" (#5559)
and "ZCode's site step" (#4727) are red on both.
- At 9c39edb92 + this: add-sheet-custom, add-sheet, i18n-keys
42/42. Rebased onto 4eeee5215 (no add-sheet code); TestCoreScriptBudget ok there.
- TestCoreScriptBudget (Windows box): ok.
Not tried: macOS WebKit and the real app (mote refused SSH all session);
the tray panel's narrow sheet in the real app.
#433 made the add sheet a dialog over the list, to get rid of a blank left under the list once the sheet was closed; but a vendor picked in it opens its editor, a dialog of its own, over that dialog: two layers. The sheet is back under the list, unrolling as the view goes down to it, the button at the view's foot stepping aside while its head is in sight. The blank was the page holding on to the Close clicked: with the sheet gone it held the sheet's neighbours where they were and kept its height as empty room at the view's foot. Closing the sheet (Close or Escape) now lets that hold go and takes the room away, so the list ends at the view's foot as before the sheet opened, and the focus goes back to Add provider, which comes back at once rather than at the end of its fade (it couldn't take the focus while still hidden). Kept from #433: Duplicate and Add another open the new editor without the sheet, an editor opened from the sheet gives the focus back to its option on close, a reload keeps the search's focus and caret, and the search's Escape empties it, then closes the sheet, and never hides the tray.
add-button is pre-#433's again (one click at the end of a long list unrolls the sheet and takes the view to it; scrolled back up, the button takes it there again; logos kept across a dialog) and now closes the sheet by Close twice and by Escape, checking no room is left, the height and scroll are those before it opened, and the focus is on Add provider; with the hold left in place it fails "Close left a blank under the list" in Chromium and WebKit, English and Chinese. add-sheet drops #433's focus trap and checks the sheet, not a backdrop. The 25 tests touching the sheet, Add provider, Duplicate or Add another pass, as does old-webkit; click-scroll passes in WebKit, and in Chromium fails the same four routing/usage cases as unchanged main on this loaded machine. go vet, go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build and go test -tags nogui ./internal/gui/ pass.