Commit Graph
3 Commits
Author SHA1 Message Date
yetone 80ae904c23 routing: routing groups get a page of their own, beside Routing
The owner asked for the groups to leave the Routing page (11-06): under
the live stage and every request they were a long scroll down, and New
group with them. The design was reviewed before this was built.

- New page, Routing groups (#view-groups), drawn by the routing plugin's
  same script (routingPage), so the editor, its dirty/discard and every
  group action are unchanged. Toolbar: filter, "N groups · M on",
  Templates, Import, Select, and New group as the filled button. The list
  is right under it, and a Settings section under the list holds Found
  groups (with Exclude providers…) and Names in agents' lists.
- No Export button: each group already has its own Copy to share.
- Routing keeps the live stage and the requests. A request's group opens
  the groups page at its row.
- The sidebar has a Routing groups tab right after Routing (from 1024
  points). The header's row has no room for one: at 860px the extra tab
  pushed the logo out (brand.test). There the tab is hidden, Routing's
  tab is lit for both pages (markNav), and Routing's head has a
  "Routing groups ›" button, hidden beside the sidebar.
- Every way in now goes to the groups page: the guide's Open routing
  groups, the panel's and the provider editor's Make a routing group
  (window/main?view=groups&newgroup=…). mainView still takes
  view=routing&newgroup from an older panel.
- Words: "Routing groups", "Open routing groups", "Once saved, make a
  group of them in Routing groups.", and the editor's names note now says
  the setting is under the list, in zh, zh-TW, ja and de. "Open Routing"
  stays for the Agents page's button.
- Docs: providers-accounts, gateway-routing, plugin-runtime, gui-shell
  and reference say "Routing groups page" where they mean the groups.
- Core budget: the core's scripts are 1,533,774 of 1,533,802, paid for
  by three show()/setGatewayMode comments cut in app.js. No raise.

Tests: routing-groups-page.test.cjs (new) covers the page in Chromium and
WebKit, en/zh/zh-TW/ja/de, at 1280, 640 (window) and 420 (web): no
groups on Routing, the tab or the head's button by width, the lit tab,
toolbar order, New group primary and in sight, list then Settings, no
sideways scroll, no native select, no left-border accent; a request's
group to its row; quotas redrawn with an open editor left alone. The
trace tests (routing-compact, -pause-folder, -rule-models, -folder) open
Routing, then show the groups; routing-editor-foot and
name-suffix-where-named scroll by wheel, as the scroll guard lets a
reader; builtins expects the groups tab beside the sidebar only.
Removed: routing-groups-jump (the head's "Routing groups ↓" that scrolled
down to them, gone with them), routing-pointer-pin and routing-steady
(the groups kept in place under requests streaming in above them: no
request is above them now). Their guarantee that what redraws leaves an
open editor and its typing alone is routing-groups-page's quotas case;
Routing's own lists keep their keepInView.

The groups page's jump: a request's group, or a pool's "Several keys"
chip, opened the groups page and scrolled the row to the centre, and the
next frame show()'s backAfterLoad put the page back where the reader
last left it, then brought the focused segment in by "nearest": in
WebKit the pool sat half under the window's foot (routing-mode-goes, 9
of its 10 WebKit cases). goRouting now jumps at once on a page it opens and
marks it arrived(). The wheel in routing-many-keys turns over the keys:
at the page's foot, now shorter, the mouse rested over the requests list
(.rt-reqs, overscroll-behavior: contain), which took every wheel up, and
the test stopped with 2 keys in sight. That is #4082's cause.
routing-days-fit's fixture has 12 requests, a day that fills the window,
since the day bar held needs room under it.

Run on mote (macOS 27, load 25 to 65), Playwright 1.62.0:
- Go: go vet, gofmt -l and go test ./... at the rebased head (650bf8412
  base) ok except TestMainWindowCorners (#3949); internal/gui again
  after the last edits: the same, TestCoreScriptBudget ok (1,533,773 of
  1,533,802, no raise).
- GUI, the 262 files a change here can reach, at the head and at the
  base: the reds at the head are the base's, with their issues:
  menu-input-scroll #3402, provider-mask #5109, context-fold and
  order-unknown (webkit) #3479, header-centre #3479, i18n-keys
  #5332/#5426/#5482, account-eye #5052/#4244, call-headers webkit de
  #5045, codex-predictions #2624, codex-auto-reset webkit de #4790,
  routing-* under load #5088, and zero-priced-free, last-page,
  reasoning-speed, routing-row-swap/-tag-whole/-story-shrinks/-steps-cap
  and routing-intent-entry, red at the base the same way.
- After the last edits: the 11 files with a way to the groups page or
  its scroll (group-*, routing-groups-page, routing-mode-goes,
  routing-groups-off, routing-provider-off, routing-many-keys,
  click-scroll), 175 of 176; the one red is routing-many-keys webkit's
  wire at the foot, red at the base in 8 of 12 (#5543). brand,
  gateway-mode-sessions, header-zoom-fit, header-centre,
  inner-scroll-contain and mobile-web: the same 11 reds at the head and
  the base (mobile-web compares with origin/main through git, which a
  mote-run copy hasn't).
- Rebased on ecc26a339, again: gofmt -l, go vet ./internal/gui and
  TestCoreScriptBudget ok; 10 GUI files (i18n-keys, routing-groups-page,
  routing-mode-goes, sidebar, brand, menu-first-second, library-bar-more,
  click-scroll, name-suffix-saved, unlisted-models) 211 of 212, the one
  red i18n-keys' "a plugin's words are its own", red the same at
  ecc26a339 (#5332/#5426/#5482).
- Broken by hand: without the groups page's CSS rule, brand and
  routing-groups-page go red (32 fails); with the old goRouting,
  routing-mode-goes is red in 9 of its 10 WebKit cases.

Not tried: the whole GUI suite on Linux (WSL magpie-desktop) at this
head; a run at an earlier head is under way and has the Linux reds
#4120/#4121 name. Not tried in the real macOS app, only Playwright's
WebKit.
2026-11-06 23:11:43 +08:00
yetone ce8b67de37 gui tests: a page's first load gets a minute, not a click's 5s (#4470)
claude-switch-only set page.setDefaultTimeout(5000) and then called
page.goto with no timeout of its own, so Playwright held the first load
of app.js, i18n.js and the plugins to the 5s bar meant for clicks. On a
busy box (a whole-suite run at load 130-160) that load took longer and
goto timed out. The same pattern is in 988 GUI test files (1174 pages):
every one of them now also sets setDefaultNavigationTimeout(60000) on
the same page, right after its default, so goto, reload and waitForURL
wait on the load itself with room, while clicks and waits keep their
short bar. group-from-model-add's own 20s navigation bar is raised to the
same minute. claude-switch-only also gives its first provider row (drawn
from the page's first reads) a minute before clicking it.

nav-timeout.test.cjs (no browser) reads every GUI test file and names
each page given a default under a minute without a navigation timeout of
at least a minute, so a new file can't bring the pattern back.

What was run (WSL magpie-desktop, Playwright 1.62.0, load 70-260 from
other sessions):
- node --check on every file in internal/gui/tests: all parse.
- nav-timeout.test.cjs against origin/main's test files: red (names the
  1174 pages); against this tree: its only reds were my own probe copies
  of the old files, since removed.
- By hand: claude-switch-only with app.js served 7s late (a busy box's
  first load), --test-name-pattern "1100 en": origin/main's file 4 of 4
  red with "page.goto: Timeout 5000ms exceeded"; this file 4 of 4 green.
- claude-switch-only.test.cjs, both engines, en/zh/ja/de, 1100 and 420:
  32 of 32. group-from-model-add, usage-access-key-card and i18n-keys:
  green. agent-plugin-agents: Chromium green; WebKit's de 420 subtest red
  on a 5s waitForFunction at line 115 (a wait after load, not the
  navigation), at load ~230.

Not tried: the whole GUI suite (about 1000 files; the change is one
mechanical line per page), Windows or mote (mote's browsers, #4125).
2026-10-31 02:09:18 +08:00
yetone a77ecbf8a1 gui: models of one provider named alike say what tells them apart (sunset on Discord)
sunset (#feedback, 10-19): with the Our Free Model plugin the provider
editor's chips read "DeepSeek-V4.1-Flash · x0.1" three times over; the
ids (buddy/…, cline/…, kilo/…) told them apart only in the tooltip.

modelTells(items, label, id, key) finds, among the models of one list
(and one group, for a picker), those that would show the same label, and
gives each the part of its id that tells it from the others: the
segments left after the ones all of them share at the front and back
are taken off, the whole id when that isn't enough or is empty. A
label no other model has gets nothing, so every list that was fine is
drawn exactly as before. The tell is quiet secondary text after the
name (.mtell, muted, never the accent of a pick); where only plain text
fits it is " · tell". No new control.

Where: the provider editor's model chips, the detect sheet's chips, an
account's model chips, the fallback list and its suggestions, every
openPicker list (agents' model menus, Settings' model pickers, Routing's
member and classifier pickers; worked out per group, so one name under
two providers says nothing), and the Routing page's member names and
labels (routing/client.js). Routing keys its groups by the model's
provider, or its provider's name where a list carries only that, so one
name under two providers says nothing there either.

Run (tree at 818007045 on 9b72add51, then rebased onto dd70c5e6a):
- model-same-name-tell.test.cjs, new: a reporter-shaped fixture (three
  DeepSeek-V4.1-Flash ids under buddy/cline/kilo plus GLM-5.2), chips,
  tooltip, picker, Routing card, and modelTells alone for no prefix, a
  shared prefix, differences deeper in, and no name. 14/14: chromium
  and webkit, en zh zh-TW ja de at 1100px, en and zh at 420px.
- Broken by hand: modelTells returning whole ids -> red (got the full
  ids); routing/client.js put back -> red ("Our Free Model ·
  DeepSeek-V4.1-Flash" twice). Both restored, green.
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows
  clean.
- Whole GUI suite on this tree with the next commit on top (831f9d48e,
  before the Routing key fix above): 2009 subtests reached in about 4h
  at load ~300-400 (files a to j), 19 red. 4 were group-new-head: its
  fixture's models carry providerName but no provider, so a/m and b/m
  (both "m", under A and B) were keyed as one provider and drew "m ·
  aA". Routing now keys by provider || providerName; group-new-head
  and model-same-name-tell 18/18 after. The rest, none reached by this
  change: codex-predictions 420px (#2624, red on origin/main alone);
  agent-notice-lang, bare-ids, builtins, claude-usage-asked and
  copilot-ghe pass alone on this tree (68/68); agent-notice-lang is
  red on origin/main dd70c5e6a too when run with them. Filed or seen
  before: #2960 (agent-notice-lang, builtins, claude-usage-asked),
  #2370, #1949. The files after j ran in an earlier whole-suite run of
  these changes (3h10m, stopped); its reds there were each run alone on
  this tree and on origin/main: lightweight #2638, menu-scroll #1550,
  model-id-space #2536, provider-advanced-fold #2552.
- go test -timeout 45m ./... at 831f9d48e: 59 ok, 5 red. agent,
  gateway and library timed out at 45m under load (#2544, #2870,
  #2853), gui TestSetAnswersWhileDevinAndProvidersHang (#1375), plugin
  TestPiPackage (#2869). Rerun at -timeout 90m: agent, gateway,
  library and plugin ok; gui red again on #1375. internal/gui alone at
  ea7f6d39e (both commits on dd70c5e6a): ok.
- On origin/main b10788745: gofmt clean, and go vet darwin, linux
  nogui and windows clean. 13 GUI files run together, 244 of 250 ok:
  clinepass-pin, model-same-name-tell, model-chip-steady,
  model-first-pick, provider-add-models, models-fold, group-new-head,
  group-editor-fits, local-address, menu-scroll, model-id-space. Red:
  lightweight 4/4 (#2638) and provider-advanced-fold 2 (#2552), both
  filed. go test ./internal/gui: TestSetAnswersWhileDevinAndProviders-
  Hang red (#1375), the rest ok.
- Rebased onto origin/main f73378365, which changes app.js, so these
  were run again at this head: model-same-name-tell, model-chip-steady,
  model-first-pick, provider-add-models and group-new-head, plus main's
  image-timeout-setting, usage-ledger-leave and disabled-models. 186 of
  186 ok.
2026-10-19 22:16:20 +08:00