A member that is itself a routing group read as a blank row in the group
editor. provider.groupsState leaves groups out of groups.models, so the
page's modelOf found nothing for "group/<id>" and the row drew no chips at
all: no reasoning levels, no image badge, no window. Which nested group
takes images, how long a conversation it holds and what it reasons at could
only be found out by sending one.
Its own memberInfo already carried what agents are told of it — the window
the largest of its models has, whether any of them sees images, and
imagesUnknown when nothing said either way. The levels every model in it
has (provider.groupEntries' Efforts) were the one thing missing, so
memberJSON carries them (efforts) and the editor reads the whole row from
memberInfo when the member is a group, as it reads a model's from
groups.models. modelInfo already said a group's images are one of its
models' and its window the largest of its models'; the levels now say the
same.
Such a member takes no reasoning of its own, on purpose: its models reason
as the group says (provider.SaveGroup refuses "group/<id>:<level>" — "its
models reason as it says, so it takes no effort of its own" — and the
gateway has nowhere to put one). So where a model's row has its own
reasoning picker, a group's row now names the group it follows and opens
that group's card, rather than leaving the slot empty with nothing to say
where the levels are set. The chip takes the room it needs and gives it
back when the row is tight, since the desktop app's member row doesn't
wrap (only body.web's does). en/zh/ja/de.
TestGroupMemberThatIsAGroupCarriesWhatAgentsSee is new — a group in a
group carries the largest window of its models, images because one of them
sees, and the levels every one of them has; a group whose models share no
level offers none and is not called unknown; a plain member is unchanged;
groups.models holds no group — and fails without the change.
group-member-info.test.cjs gains the nested case (Chromium and WebKit, en
and zh: the chips, the wording that they are its models', the follows chip
and its title, the click that opens the inner group's editor, and the plain
member beside it keeping its own picker), which fails without it too.
go build, go vet and go test ./internal/gui (the three group tests) pass
under a temp HOME, as do the routing, group and click-scroll browser tests
in Chromium: 176 of 178. The two failures are routing-try-fixed's "a try
sent at an effort its member isn't fixed at flies to the member's row" in
en and zh, which fails 2 of 4 runs on main without this change. gui-ja and
gui-de's completeness checks fail on this base before this change:
43a65950's "{agent} is signed in to {user} now: sign it in to another of
its accounts first…" has {agent} twice in ja and once in the key. Neither
is touched here.
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
* gui: a group's members say what each can do, images included
A routing group's editor said of a member its name, its provider and the
reasoning it is sent at, and nothing of whether it sees images — a group
mixing members that see with ones that don't gave no way to tell one from
another, and which member a picture would reach was found out by sending one.
Each member now carries the same chips the Gateway page's model list sums a
model up in (modelInfo): its reasoning levels, whether it sees images and the
window it holds. The group's own models API carries Images and ImageSet for
them (internal/gui/groups.go), and the chips' look is shared with the Gateway
list's.
A member whose list says nothing of images is said to be unknown, not "text
only": magpie counts it text-only for a describer (gateway.blindTo), which is
not its list saying it takes none. For the same reason the group's own line —
"Accepts images (every model in it does)" — said something a group no longer
is: since #756 one member that sees is enough, so it reads "one of its models
does" now, in English, Chinese, Japanese and German.
group-member-info.test.cjs (new) checks three members — one that sees, one its
list says takes none, one nothing was read of — for their chips, their
tooltip's words in both languages, and that the row still switches off and
removes. Routing view regressions pass as on the baseline.
Validation:
- node --test --test-concurrency=1 internal/gui/tests/group-member-info.test.cjs
- group-arrange, routing-manual, group-member-off, group-context, group-fold,
group-patterns, group-bulk-remove, group-member-fast, group-found-off,
agent-model-groups, member-model-setting, group-from-model-add, click-scroll:
32 pass, 2 fail — both the 600x420 group-from-model-add cases, which fail
identically on the unmodified 9e77092.
# Conflicts:
# internal/gui/assets/routing.js
* gui: test that a group's models carry what they take
The chips the Routing editor draws a member with read the served catalog
entry: whether agents are told it takes images, whether anything said so
either way, its reasoning levels and the window it holds. The first is the
same expression the gateway decides by when it describes an image for a
model that can't see one (blindTo reads Entry.Images), so the editor cannot
say a member sees images that the gateway would describe them for. A model
whose list says nothing is carried as unknown, not as text only.
Covers: one that sees, one its list says takes none, one nothing was read
of, and one the user answered for themselves (settings.ModelImages).
* gui: carry a member's unknown images as a flag, not an absent key
Review of the chips: `imageSet` was omitempty on both structs, so a model
magpie knows nothing about went out without the key, not with `false` —
`m.imageSet === false` never held, and such a model still read "Text only",
which is what the chips set out to avoid. The browser test passed only
because its fixture wrote `imageSet: false`, which groupsState() never
produces.
`imagesUnknown` is the flag now, sent only when true: a model magpie has an
answer for carries no such key at all, and the page reads `=== true`. The
name is apart from the Gateway page's `imageSet` on purpose — there it means
the user answered for the model themselves (provider.ImageOverride), and
modelInfo is shared by both pages.
The fixture now writes what groupsState() emits: `images` and
`imagesUnknown` left out where they are false. A Go test holds the wire
shape (`TestGroupModelImagesOnTheWire`), and with the fixture as it now is
the browser test fails 2/2 on the old check ("a member nothing was read of
says unknown, not text only: Reasoning levels: none known").
Validation: go vet ./... and go build ./... pass; go test ./internal/gui/
fails only TestSetPortMovesTheGateway and TestPurposeAssetMatchesUsage,
which fail identically on the unmodified 9e77092; the routing and group
browser regressions are 34 pass, 2 fail — both the 600x420
group-from-model-add cases, which fail identically on the baseline.
---------
Co-authored-by: wizzy-yang <wizzy-yang@users.noreply.github.com>
The Routing page's group list followed the order the groups were made in, found ones after, so a group used every day couldn't be put first, though /v1/models lists the groups in that order and agents' pickers (Claude Desktop's 3P list among them) show it and some clients probe its first model. A group row's logos are now its handle, as an agent row's logo is (#57): dragged (dragRows, the Agents page's sorter) it moves the row, clicked, or the row right-clicked, it opens Move up and Move down (openRowMenu, with the Agents menu's arrows, now MOVE_UP/MOVE_DOWN), and Alt+↑/↓ moves it from the keyboard, which stays on it. The grip in the row's margin is drawn only while the row is under the pointer, dragged, or its handle is focused or its menu open, as on the Agents page. The list is drawn in its new order at once and put back if the save fails; a later move wins over an earlier one still saving.
The order is kept in providers.json as groupOrder (provider.SetGroupOrder, POST /api/groups/arrange), beside the providers' own order (#499), and applied in groupsIn, which every list of the groups is made from: the Routing page, Catalog and so /v1/models, magpie group ls and the TUI's routing page. A found group, which isn't stored until changed, can be put among the user's this way, which reordering the groups array couldn't do. A group not named (one made or found after) goes last; a renamed one keeps its place. Backup and sync carry the order as they do the providers' (MirrorGroupOrder).
TestGroupOrder (Groups and the catalog follow SetGroupOrder, providers.json has it, a new group last, a rename in place, bad orders refused, a synced order first) fails on the old code. group-arrange.test.cjs (WebKit, en and zh): the grip hidden with the pointer away and shown on the hovered row only, in its margin; right-click Move down with Move up off on the first; Alt+↓ and Alt+↑ with focus kept; the handle's click opens the menu, not the editor; a drag by the grip to the top; each posting every group's id with the removed one last; no click moving the page. It fails on the old code. agent-grip, click-scroll, account-arrange, usage-arrange, provider-order and the group-*/routing-* GUI tests pass in WebKit, but for group-from-model-add's 600x420 cases, which fail on main as well. go vet, builds (darwin, GOOS=linux, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass.
Where it is set:
- the provider editor's "Rate limited" row, saved with its Save (sink in /api/provider/save, kept by a Save that leaves it out);
- the Routing page's row of providers with several accounts or keys, which saves at once (/api/provider/sink);
- the group editor (/api/groups/save), with the group card tagged "Rate limited to the back".
The Routing page's trace gives a sunk account "rate limited at {time} · at the back" and a line saying why. Weighed carries `sunk` and GroupRef carries `sink`.
Tests:
- TestRateLimitedSinksToTheBack: three accounts rotate over five rate limits. Off or in turn they keep their order. A quota 429 or a full allowance doesn't sink one, and one still resting stays behind.
- TestGroupRateLimitedSinks: ordered and smart groups.
- TestProviderSaveSink.
- rate-limited-sink.test.cjs covers the editor, pool row, group editor, card tag, trace and zh, in en and zh. It fails on the old code and on the old assets.
routing-compact.test.cjs now wheels down to "Add a rule" and Save as the reader would, since the editor's new row puts them past the window.
go vet, builds (nogui, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. In webkit, the routing-*, group-*, quota-pools, panel-routing, click-scroll and settings-groups GUI tests pass, except routing-manual, routing-time and group-from-model-add, which fail the same way on origin/main. Not tried with real accounts against a vendor's 429.