Norcleeh (Discord #general) asked for a way to order a By weight
group's members by weight. The order matters there: it is the
fallback's when a model fails.
Now the group editor has a "Sort by weight" text button beside Add
another model. It shows while the group routes By weight and the order
would change. A press puts the named members heaviest first (no weight
counts as 1, equal weights keep their order, one switched off is
sorted too; a pattern's members stay after them) and draw()s. The
button then goes. It is a one-off reorder of the draft, saved with the
group's Save; no mode is stored. Its title says the order is the
fallback's. Strings in zh, zh-TW, ja and de. The routing plugin's
client.js isn't a core script; no budget changed.
Run (mote-run, at this head on a1f06bd78):
- group-member-weight.test.cjs, Chromium and WebKit, en/zh 1100px and
en/de 420px: In order offers no sort. By weight it does and fits.
The press orders glm-5 (6), gpt (3), kimi (2, off), o4-mini (1),
each keeps its weight, the button goes, and Save sends that member
order. Every new string has its four translations. 8/8.
- Red on origin/main's client.js: 8/8 fail (no button). Broken by hand,
the button kept while sorted: 4/4 Chromium red at "sorted, it has
nothing to do".
- The routing GUI files (group-*, routing-*, panel-routing*), i18n-keys and
gui-de/ja/zh-tw, both engines, at load ~230: 1879 of 1913 passed.
Adding the button into .rt-gadds made routing-intent-entry count 3
buttons, so the row has its own class, rt-madds; that file passes.
The reds left are in routing-flood, -levels, -row-swap, -rule-drag,
-rule-remove, -rules-line, -steady and -story-shrinks. The same 27
fail at a1f06bd78 without this change, and rule-drag, row-swap and
steady fail 7/7 at 7fcf642ee. Each has an open issue: #2215, #3620,
#3799, #3789, #3096/#3094, #3593, #3412/#1804 and #3954.
- go test -tags nogui ./internal/gui: ok. gofmt -l: clean.
- Again after the rebase onto 7fe98c2af: go build ./..., go test
./internal/gui ok; group-member-weight 8/8, routing-intent-entry 8/8,
group-context 4/4. i18n-keys is 3/4: its "a plugin's words are its
own" is red on main, from a masking.go comment that quotes "masking…"
(e296211b8), not from these strings. Filed as #4053.
Not tried: the real desktop app, and a group with members by pattern
(those aren't sorted, by the code).