Files
magpie/internal/gui
yetone 9494a38b43 providers: a model picked past the served ones joins them
onkashiko on X: 点开一个供应商新选模型的时候,之前已经选中的模型就会失效,
对于有大量模型的中转供应商来说很不方便,新选的模型难道不应该是新增进模型
列表吗.

Cause: with nothing picked, a relay on Vendor's list serves the first 24
of its models (drawn dashed), and Best in family its newest of each
family. A click on any other model set the picks to that one alone, so
the provider turned Picked only with one model and Save took away the
24 agents had been seeing. The TUI's toggle already starts from the
served set and adds to it; the GUI was the outlier.

Now a click on a model the list doesn't serve joins the served ones,
and so does an id typed by hand, by Add model or left in the box at
Save (chosenIds). A dashed one clicked with none picked is still picked
alone (#681). The Vendor's list hints, which said "Click a model to
pick just it", now say "Click a dashed one to pick just it", in zh,
zh-TW, ja and de too.

Siblings: Best in family (the same served set) and the typed id paths
are covered; Usage only serves nothing, so a click there still picks
just it.

Run:
- provider-pick-adds.test.cjs (new): the reporter's case on a 60-model
  relay, saved picks plus one more, #681's dashed pick, Add model and
  Save with a typed id, Best in family, Usage only; en/zh/zh-TW/ja/de,
  Chromium and WebKit, 1000 and 420: 20/20 on WSL (magpie-desktop).
  Red on the old app.js/i18n.js: the hint times out, and with the hint
  check removed the first save has only the 30th model, not 24 + it.
- GUI at the pushed base 64ae6e206: the 68 files that reach the
  editor's chips, plus i18n*, gui-* and click-scroll, Chromium and
  WebKit, on WSL: 1208 of 1330 pass. The files with reds were run at
  76b490576 without this change: 12 fail the same way, all filed
  (model-chip-steady #4388, model-copy-id #4621, provider-fetch-again
  #3292, models-works-only #4391, zero-priced-free #5262,
  provider-picks-stay #4397, provider-models-rest #4396,
  plugin-move-unserved #4392, provider-typed #4673, remote-magpie
  #4398, inner-scroll-contain #4689, model-find #7287 filed now). The
  rest were single WebKit reds that moved between two runs
  (model-key-tag, test-models-key-hint, media-kind, model-images-menu,
  editor-chips-wheel); the five files pass 34/34 in WebKit at this head.
- TestCoreScriptBudget and the i18n Go tests ok at this head, with no
  raise: 6d46859c4 left app.js 35 bytes of room, so draft.chosen.length
  is read as draft.chosen[0] (13 places, the same truth: ids are never
  empty) and the hint's words were cut to fit.

Not tried: a real relay account; the change is the editor's draft only,
and the save body is what the tests check.
2026-11-20 12:10:43 +08:00
..
…
…
…