Commit Graph
11 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 b3f5953495 routing: an open group's heading looks as every editor's does, not as the Models fold chip
The owner, 10-21: on an opened routing group the heading's space above
differed from below, and its line curved at the ends. The heading had
the class .fold to fold back into its row, and .fold is the Models
head's chip: padding 3px 6px 3px 4px, a 6px radius, the faint colour and
a pill background on hover. On the heading that gave 3px above against
8px below, rounded ends on its bottom line, a dimmed name and a box over
it on hover. It now has its own class (folds), which keeps the pointer
and adds a focus ring; the layout is .editor .ehead's, as on every
other editor.

Run on origin/main 4042aa4d1 + this commit, macOS, playwright 1.62.0:
- group-fold.test.cjs: 4/4, chromium and webkit, en and zh. Its new
  check (no padding above, square corners on the line, the name in the
  page's colour, no box on hover) is red with the old class (top 3px).
- Looked at in dark theme (chromium zh): the heading and the editor.
- Every routing-*, group-*, gateway-key-groups, names-fold and
  models-fold file (124): 1422 pass, 2 red under the run's load, both
  14/14 alone in webkit and both filed on main already:
  group-member-weight webkit de 420 (#2387), routing-rule-remove webkit
  en 390 (#3094, #3096).
- go test ./internal/gui/ -run Budget ok.
Not run: the rest of the GUI suite (the change is the routing plugin's
heading only).
2026-10-22 00:00:54 +08:00
yetone bfef5d51b5 gui: Routing is back to v0.1.1231's layout; reverts dae2618ad (#1354)
v0.1.1233 shipped community PR #1354 (dae2618ad), which put "How the
last request was routed" in a right column beside the stage on wide
windows, split the context card into overview/contents columns, and
replaced the context card's own head with one lazily built disclosure
header. Two users on Discord asked for the old page back: wongxy
("这是哪个人才要改成这样的,丑死了", "UI方面的需求响应要克制一点", with a
screenshot of the new page) and molvqingtai ("v0.1.1231 没有这个问题").
The owner delegated the call: Routing goes back to v0.1.1231's look.

Only the lazy construction of the context body was a candidate to keep,
as it is invisible. It doesn't separate cleanly: it is built on the new
unified header (ctxSummary in the closed state, ctx-body/ctx-overview in
the open one), which is itself the visible change. So this reverts
dae2618ad whole: assets, its doc section, its README entry, the new
routing-context-layout test, and the test edits that existed only for
the new layout (wheel-scrolling to rows the right column pushed down,
mobile-web's skip of Routing in the pixel comparison). No later commit
on main is a follow-up of it.

Later commits touching the same files are kept: 20350dafa's subagent
reason in routing.js and README entry, a7a38193f/5fc2f87d1's gui-shell.md
lines, 00afcf97a's README entry. routing.css and context.js are now
byte-identical to v0.1.1231; routing.js differs only by later features
(#1068 folders, subagent reasons).

Run (worktree on origin/main 3ec45e715 + this revert):
- Routing page screenshots against v0.1.1231's assets with one counted
  request (the .rt card): Chromium and WebKit, en/zh/zh-TW/ja/de, 1100
  and 420 wide, plus 1440/1800 in en/zh: 0 pixels differ in all 28.
  origin/main differs in all of them (the folded header, the columns).
- node --test routing-*, panel-routing*, group-fold, held-animations,
  phone-rows, context-*: 1025 of 1034 pass. The 9 reds are
  routing-keys-fold's "a request that comes flies to the fold" (WebKit,
  and Chromium de) and routing-model-rest's "Try now" reach. Both files
  run alone fail the same way on origin/main bda271999 (12 fails there,
  11 here, different cases of model-rest each run), at load average
  ~350 from other sessions; filed as #1612 and #2115.
- mobile-web (pixel baseline) with BASE_REF=dae2618ad^: every phone
  case and Routing's desktop compare pass; the 8 reds are all Settings,
  changed since by #2073's colorblind switch, not by this.
- gofmt -l, go vet (darwin, linux nogui, windows) and
  go test -tags nogui ./internal/gui pass.
Not tried: the native Wails window; the complete GUI suite.
2026-10-14 18:07:59 +08:00
Zhu Wang dae2618ade gui: make the Routing context lazy and align wide cards (#1354)
* gui: make the Routing context lazy and align wide cards (#1354)

Rebuild the context and wide-layout change on main e1b70c13 following
the Oct 13 review. Keep the complete request story, original heading,
visible stage caption and main's unchanged line/logo retention.

Use one context header, construct its body only while open, migrate the
existing fold choice and retain live card updates and the text viewer.
Align the stage/story and overview/contents splits within the page's
existing width cap. Keep the narrow stage sizing and prevent flex shrink
from moving the header when context contents appear.

Three-platform vet and builds and the sandboxed nogui suite passed.
Base assets fail the new context test because a closed card constructs
the detail grid (1 instead of 0). Focused disclosure checks passed;
the complete GUI suite is still running and is tracked in the PR body.

* gui tests: exercise the new Routing layout with user scrolling

Open the lazy context explicitly for its retained-animation check and wait for page entrance animations as well as cells. Reach the group Cancel button and history day with user wheel input rather than relying on forbidden click scrolling. Until the baseline contains the new Routing wrapper, keep its intentional desktop layout out of the unchanged-page pixel comparison; the focused layout matrix covers it and mobile fit still checks Routing.

Validation: group-fold and held-animations passed all 8 cases; phone-rows passed all 10 cases across five languages and both engines; mobile-web passed all 30 cases. git diff --check and JavaScript syntax passed. The complete GUI suite is still being recorded on unchanged d6d5738a assets. Library switch failures are independently reproduced on e1b70c13 assets and tracked by upstream #1609; they are not claimed as passing.

* gui tests: scroll to narrow Routing history before selecting it

The visible full request story can leave a historical request below a narrow window. Reach the day and request row with wheel input before selecting them, while retaining the app scroll guard and all cancellation and failure-colour assertions.

Validation: all 37 checks in routing-agent-gone and routing-agent-hue-not-red pass across both engines, four/five languages and 420/1100px widths. The whole GUI run had exposed the two WebKit German 420px click-scroll failures. git diff --check and JavaScript syntax passed.

* gui: keep context disclosure usable while the next prompt is read

Keep the last available live prompt separately from the render key. Opening or closing the unified header can redraw that carried context while a new request has no prompt yet; clearing a render key for a disclosure no longer removes the entire card. Explicitly picked requests still start fresh, and unavailable or completed requests clear the carried data.

Validation: before the fix, the new pending-prompt disclosure regression fails because the carried context becomes invisible. After the fix, all 134 context disclosure, saved-choice, Usage-link, live patch, every-frame and provider-logo checks pass in Chromium and WebKit across five languages and desktop/phone widths. Native macOS, Linux nogui and Windows builds, syntax and git diff --check pass. The complete GUI run is recorded separately with unresolved existing failures linked in the PR description.
2026-10-14 15:27:59 +08:00
yetone a125d5c9ea gui tests: group-fold's window is 1700 tall, for the editor's Custom wait that 195a1009b added
195a1009b put Custom (minutes of your own) beside Wait, 30 s, 1 min and
2 min in a routing group's Slow to start, which made the editor 8px
taller. At 1600 the editor's Cancel sat half under the window's footer,
and WebKit en clicked the footer (Chromium's text metrics kept the
centre just above it). Red in WebKit on origin/main 2eee900dc, 2 of 2
runs; at 1700 WebKit and Chromium pass, en and zh.
2026-10-14 09:25:02 +08:00
yetone 18e82adc62 gui: the window's pages down a sidebar in groups, the open page's tabs under it, and a button to have the header's tabs instead
From 1024 points wide (SIDE_AT) the window lays its pages down the left
as a Mac app's sidebar: Work (Agents, Sessions, Library), Models
(Providers, Routing, Gateway), Insights (Usage), Extend (Plugins), with
Settings and the gateway's address at the foot. The open page's own tabs
(Usage, Library, Plugins, Settings) are listed under it, opening and
folding on an iOS-like spring, and the page's strip is hidden. The header
becomes a breadcrumb, and pages whose head held only tools have them in
the title bar. Graphite: the open page is in the text's ink, not purple.
A pressed row darkens and never shrinks. The selection under the tabs
sets off as the row is pressed, on a 0.3s curve (it felt behind the
finger), and is the list's only shape: a sub-row hovered or pressed has
no ground of its own, which showed a block under the finger before the
selection slid there. The page's tab is clicked at once, so what is
typed next goes to it.

The title bar's button (or ⌃⌘S, Ctrl+Shift+S), there at every width,
picks the sidebar or the header's tabs. The choice is kept in
localStorage magpie.navLayout (side or top) at every width, so it is laid
out from the first frame; picked in a narrow window the sidebar is 184
points under 860. The two trade places in
a view transition: the sidebar slides, each tab flies to its place, and
the page slides as one. Without view transitions or under reduced
motion, the change is at once.

With nothing picked, narrower than 1024 the page beside a sidebar would
be narrower than Usage's requests table needs, so the header's tabs come
back. A resize
drops what a click held (heldWidth). Usage's KPI strip goes two to a line
by the room the page gives it (a container query), and Japanese counts
wrap there. Tests whose window is 1024+ were updated for the sidebar,
and docs/subsystems/gui-shell.md says how it works.

Run: sidebar.test.cjs and side-toggle.test.cjs 16/16 in chromium and
webkit, in en, zh, zh-TW, ja and de. Each was broken by hand (press
shrink, address cut, press glide, sub-row ground, view transition, kept
choice) and went red. Every page at 560 points with the sidebar picked,
zh and de, both engines: nothing scrolls sideways. session-identity's
ledger row sits under the footer beside the sidebar; WebKit's click
doesn't scroll to it, so the test wheels it up first. Animation frames were checked from a recorded video. The 105
affected GUI files in both engines; their reds were rerun alone and fixed
(filter-ime: the sub-row's click now at once; session-identity, above) or
fail the same on main (tray-logos). The full GUI suite in chromium, on
the rebase onto d5cae267a, was cut short at 352 tests on the owner's
"ship": 6 reds (account-alias, account-models, codex-auto-review,
codex-credits, context-text) each pass alone, here and on main d5cae267a,
so they are timing under the full run's load and are to be filed. After
rebasing onto e4e22b23e: sidebar, side-toggle, session-identity,
filter-ime, library-instr-busy, usage-speed-count and view-scrollbar,
50/50 in chromium and webkit. go build ./... passes.
2026-10-12 00:41:34 +08:00
2cc663d0a2 gui: protect unsaved edits and confirm destructive actions (#820)
* gui: edited forms ask before they are discarded, removals ask before they take effect, and the header keeps its first layout — Cancel, Escape, the backdrop and a page change could throw away a provider's draft, and several account, key, plugin and library removals took effect at once. Modified provider, settings, library and routing forms now ask before discarding; unmodified forms still close without asking, and refresh or closing the browser tab uses its leave confirmation. Removal and discard confirmations are in-app dialogs over the intact editor, centered, with Cancel focused first, Tab kept inside, Escape canceling and focus returned afterwards; destructive buttons have readable foregrounds in light and dark themes. Text and connection settings have Save/Cancel rather than saving on blur; simple switches still save at once. Editors associate labels and help with fields, make the background inert while open and keep focus through redraws; navigation keeps browser back/forward history and its current-page state, errors remain until dismissed or replaced, and focus and validation can scroll into view. Mobile settings tabs have larger targets, fields use 16px text and page zoom stays available. layout.js applies mode and platform before the header paints, theme.js applies the saved text size before styles, and mode-specific window controls stay hidden while app.js downloads. zh/ja/de strings added. routing-shape's global .rt-day selector selected the hidden By session button on WebKit; its history click now stays in .rt-days. ux-safety covers unchanged and modified closes, canceled and confirmed removals, Escape, backdrop, modal focus, light/dark centering and button contrast, explicit saves, browser history and sync-form discard. Rebased onto upstream/main 2f183c4c. Chromium and WebKit each pass 31 related browser tests in en and zh; gui-ja and gui-de pass all 6 browser and translation-parity tests. go vet -tags nogui ./..., go build -tags nogui, go test -tags nogui ./internal/gui, JavaScript syntax checks and git diff --check pass.

Co-authored-by: XYenon <register@xyenon.bid>

* gui: edited providers, routing groups and library forms ask before their drafts are discarded, and only immediate removals ask before taking effect — Settings keep saving on Enter and blur, switches save at once, and the reader's scroll position is restored after an unasked-for scroll. Header rows, fallback models, group members, patterns and rules stay ordinary reversible draft edits. The confirmation dialog keeps its own readable destructive colors; the window's text selection, muted and faint colors, timed status messages, replaceState navigation and iOS viewport policy stay as before. The keyboard scroll assertion is restored, and click-scroll's date buttons are scoped to .rt-days .rt-day so WebKit cannot pick a hidden request-grouping button. The safety tests cover dirty editor closes and page changes, immediate provider deletion, labels, modal focus, Escape and backdrop cancellation, with the withdrawn settings, history and persistent-error assertions removed. First-paint layout and the saved theme/text size remain early.

Co-authored-by: XYenon <register@xyenon.bid>

* gui: old WebKit gets its layout before the header paints, and browser tests answer the new discard and removal questions — compat.js runs before layout.js, whose viewport setup uses ES5; the confirmation uses vh rather than Safari 15.4 dynamic viewport units. Opening a provider from its address keeps the editor pending until its page loads, and fields keep their own nested labels when Names & levels is reopened. An empty model preference map is compared as Save sends it, so opening model settings without changing anything closes without a question. Removal tests assert nothing is sent before confirmation; draft tests answer Discard and retain their Save and Cancel assertions. Plugin migration uses the reader’s wheel rather than a scripted scroll, keeping every scroll assertion. Targeted WebKit regressions pass 40/40, Chromium regressions pass 41/41, and the model-setting and editor-safety checks pass in both engines. go vet -tags nogui ./..., go build -tags nogui, JavaScript syntax checks and git diff --check pass.

Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847
Co-authored-by: XYenon <register@xyenon.bid>

* gui tests: the upstream model list keeps folding with the new discard question — models-fold answers Discard only after picking another model; the short list and an unchanged folded list still close without asking. ux-safety waits for its Relay row rather than matching loading placeholders. Rebased onto upstream/main c353f7bd, including the new model-list expansion. models-fold passes in WebKit and Chromium, as do the English and Chinese editor-safety checks; the related model drafts and first-paint phone tests pass on WebKit.

Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847
Co-authored-by: XYenon <register@xyenon.bid>

* gui: an editor redraw keeps its removal confirmation and menus interactive — Only a fresh modal makes the existing background inert, and closing restores exactly the elements it changed. A redraw no longer disables a confirmation or popup appended over the editor; elements already inert and overlays added later retain their own state. The original background is retained if a new editor interrupts the closing animation. ux-safety redraws Relay twice under its Remove confirmation, clicks Cancel, and verifies no deletion was sent; it also picks a menu item after an editor redraw and checks background restoration. The regression reproduced on WebKit before the fix. All 8 English and Chinese safety checks pass on WebKit and Chromium. The related WebKit removal, draft, routing and phone checks pass, with account-arrange passing separately after a detached-element race in the concurrent run. go vet -tags nogui ./..., go test -tags nogui ./internal/gui, go build -tags nogui, JavaScript syntax and git diff --check pass.

Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847
Co-authored-by: XYenon <register@xyenon.bid>

* gui tests: editor safety uses the page's boot preferences, not its settings — gateway in boot.js is now the gateway-mode flag, whereas settings.gateway is the gateway's URL. Spreading settings into the fixture boot data mistook the URL for gateway mode and redirected a dirty editor's attempted page change back to Providers. The fixture now emits the same language, theme, text size and web fields as the server. The 8 English and Chinese editor-safety tests pass on Chromium and WebKit; gateway-mode, plugin middleware and plugin-market pass on WebKit, and phone-web passes separately after a scroll race under concurrent load. Rebased onto upstream/main 2f135ed4 with gateway-mode navigation and initialization retained. go vet -tags nogui ./..., go test -tags nogui ./internal/gui, JavaScript syntax and git diff --check pass.

Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847
Co-authored-by: XYenon <register@xyenon.bid>

* gui: upstream's new removals and fields follow the editor-safety rules too — Audited GUI changes from the original PR base 2f183c4c through upstream/main 9debc583, including earlier rebases. Bulk group removal uses the in-app consequence dialog rather than a second click, and clearing middleware options asks before deleting saved options. Cancel sends nothing and keeps the selection or editor. Custom group context, Settings' compact threshold, the inline key-weight input and middleware JSON have accessible names; the JSON note/error and group context hint are linked, and invalid input is exposed. The copy-out-of-date skill action is a keyboard button supporting Enter and Space. A skill's immediately saved per-agent transfer choices update the modal baseline, so Done, Escape and navigation no longer ask to discard already saved changes. Settings save behavior, draft-only removals, scroll guard, viewport and themes stay intact. Chinese, Japanese and German consequence strings added; obsolete bulk-removal armed styles and strings removed. The six affected browser files pass across Chromium and WebKit in English and Chinese (54 tests after scoping compact-at to its provider rather than skeletons). Additional provider price, key import/weight, group member/first-token, caller-key, purpose and gateway-mode regressions pass on WebKit; key-weight also passes in Chromium, with a concurrent status-message race passing separately. go vet -tags nogui ./..., go test -tags nogui ./internal/gui, go build -tags nogui, JavaScript syntax and git diff --check pass. The Chinese bulk confirmation was rendered and inspected on WebKit.

Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847
Co-authored-by: XYenon <register@xyenon.bid>

* gui: new upstream key removals and nested group jumps keep the editor-safety rules — Bulk deletion of failing, off and matching keys uses the app's consequence dialog, with Cancel and Escape sending nothing and a redraw leaving its buttons interactive. The shared group-editor entry asks before replacing a dirty draft, and nested navigation waits for acceptance before upstream's explicit scroll. Codex's Sign out uses its existing confirmation once. Group and key filters have accessible names. A focused model-price input is included in leave protection before its change/blur parser runs, and reverting the raw value is clean. Settings saving, scroll protection, draft-only removal, viewport and themes retain their upstream behavior. The affected flows pass in Chromium and WebKit, English and Chinese; Names & levels also passes in Japanese and German. The price fixture focuses before filling because the previous blur normalizes sibling fields, a race reproduced on upstream. go vet -tags nogui ./..., go test -tags nogui ./internal/gui, go build -tags nogui, JavaScript syntax and git diff --check pass. The Chinese bulk-key dialog was rendered and inspected on WebKit.

Co-authored-by: XYenon <register@xyenon.bid>
Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847

* gui tests: Codex's newly removable active account waits for the consequence question (#820) — The latest upstream multiaccount Remove path uses accountAction's immediate-removal dialog. Its test now verifies that the first click sends nothing, Cancel keeps the account, and accepting sends exactly one login/forget request. The original account, status and translation assertions remain. Rebased onto upstream/main 8d3cf5f8; the final Codex, nested-group, bulk-key, focused-price and editor-safety tests pass 48/48 across Chromium and WebKit in English and Chinese. Upstream's new quota, skill-group, hit-rate and translation checks pass; search-first's detached-element failure reproduces on isolated upstream. The complete WebKit suite ran 1413 tests before this final upstream delta, with 1289 passes and 124 failures; failing files were compared with upstream or rerun separately. Syntax and diff checks, go vet and the nogui build pass.

Co-authored-by: XYenon <register@xyenon.bid>
Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847

* gui: the Sessions agent strip reports which reused button is selected (#820, #929) — Rebased onto upstream/main 1330b966, retaining the strip's own scrolling, visible selected agent and preserved buttons. Each redraw updates aria-pressed for the selected agent and clears it for the previous selection. The regression checks All initially, the unselected alternatives, then Zed selected with All cleared; on unmodified upstream it fails with null instead of true. Both strip files pass 8/8 across Chromium and WebKit in English and Chinese, including narrow and wide layout and scroll assertions. The latest ChatGPT API, Codex and editor-safety browser checks pass 32/32. Final GUI, Agent, Provider and Gateway Go checks, go vet -tags nogui ./..., Linux nogui and Windows builds, syntax and diff checks pass. Linux native GUI build is blocked by the orb's GTK 4.8 lacking APIs used by Wails beta.24. The complete WebKit run finished with 1289 passes and 124 failures; all failing files were checked against upstream or rerun separately, with details retained in the review artifacts. The full Go suite's sole sessions rewrite failure also reproduces on upstream.

Co-authored-by: XYenon <register@xyenon.bid>
Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847

* gui: closing editors immediately give clicks back to the page (#820, #944) — Restore the background when the close animation starts and protect it again when an editor reopens. Both New group buttons and the model entry ask before replacing a dirty routing draft; creating a group from a provider waits for navigation to be accepted. The GUI shell reference describes these transitions.

The real mouse click during closing fails without the change in all four engine/language combinations, with null instead of received. The unguarded New group and model entries fail waiting for the discard question; the old model navigation creates a routing draft even after Cancel. ux-safety, provider-remove, click-scroll and group-new-head pass 50/50 in Chromium and WebKit, English and Chinese. Closing/reopening also passes five additional rounds, 20/20. After the final upstream translation and TUI additions, i18n-keys, Japanese/German, ux-safety and group-new-head pass 23/23. Ten Chromium update-wait runs have no no-click-scroll failure; two fail on the Restarting status assertion, also reproduced on upstream.

The complete WebKit run finished with 1,307 passes and 141 failures across 1,448 tests, with no skips or cancellations. It is not green: failures in 63 of its 70 failing files also occur on upstream; the other seven files pass separate PR reruns. The complete suite preceded the final upstream translation deduplication, whose resolved keys and values are unchanged, and the TUI/docs additions. go vet and the Linux GUI build with the Makefile's gtk3 tag, Linux nogui and Windows builds, GUI/TUI Go tests, syntax and diff checks pass. Full nogui Go tests are not green: the sessions same-size rewrite check and the final run's WebDAV slow-transfer stall both reproduce on upstream with -race -count=20 under an isolated HOME with pinned caches.

Co-authored-by: XYenon <register@xyenon.bid>
Amp-Thread-ID: https://ampcode.com/threads/T-01a108b0-c6a0-768d-ad6a-9a571a10a847

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-10-06 06:57:49 +08:00
yetone 55be06ea24 gui: whether "· routing group" follows a group's name is set over the groups on Routing, for all of them, not in one group's editor (PAMI on Discord) — #868 put the agents' lists names setting (Settings' Provider in model names) in each group's editor too, where it read as that group's alone though it is one setting for every group and every provider's models. It now sits over the groups, under Find groups on their own, with its three choices and what it sets; a group's editor says only what its group will be called and that "· routing group" is set above, and follows a pick there with its unsaved name kept. Provider Names & levels keeps its choices. name-suffix-where-named (WebKit, en and zh) fails without the change; group-found-off and group-fold follow the new row. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass (internal/provider crashed once on a concurrent map write in TestCloudflareDecideModelsTested's test server, and passes alone). 2026-10-05 17:22:04 +08:00
yetone bbb9729748 gui, provider: where a model or routing group is named, it says what agents' lists will call it and offers dropping the suffix there; a group the user made counts as a name they set (#868)
The reporter's screenshot was Codex's model menu, where a long name plus " · Relay" or " · routing group" is cut off. Magpie can't widen an agent's menu. What it can do is shorten the label. Models can already be renamed (provider editor › Names & levels), groups have a Name, and Settings › Provider in model names (#335) can drop the suffix. The reporter found none of these.

Changes:
- The provider editor's Names & levels and a routing group's editor now each have the three choices: Off, Not on names I set, On.
- Each says what the agents' lists will show, e.g. "My Sol · Relay" or "Fast · routing group".
- The line follows the name as it is typed and the choice as it is picked.
- A pick posts settings/plain-names once and doesn't scroll.
- "Not on names I set" now covers routing groups the user made or changed (Entry.Named = !g.Auto) as well as renamed models, still only where the name is unique in the list. A group magpie found keeps its suffix.
- zh, ja, de strings.

Tests:
- TestPlainOwnNamesGroups fails on the old code.
- name-suffix-where-named.test.cjs (WebKit, en and zh) fails 4/4 on the old assets.
- group-fold.test.cjs: viewport raised to 1500 for the taller editor.
- Pass on WebKit: group-context, plain-names, provider-same-as, provider-levels-save, gui-ja, gui-de, click-scroll, agent-models, agent-model-groups, group-* and routing-*.
- Fail the same on origin/main: group-from-model-add at 600x420, provider-levels-scroll.
- go vet passes. The darwin, GOOS=linux nogui and GOOS=windows builds pass. go test -tags nogui -count=1 ./... passes under a temp HOME.
2026-10-05 14:03:51 +08:00
yetone 56d5341636 routing: an open group folds back into its row from its editor's heading (ARNO on Discord: 路由组详情现在可以单击展开,是否可以再加上单击收起) — a group's row opened its editor on a click, and only Cancel closed it. The editor's heading of an existing group is now a button (pointer, "Click to fold it", aria-expanded, Enter or Space from the keyboard) that folds it back while nothing in it has changed; with a change it stays open and says to Save or Cancel first, so a stray click never throws an edit away. Folding saves nothing. zh and ja strings. group-fold.test.cjs (WebKit, en and zh: click, Enter, a change kept with the warning, Cancel, nothing posted) fails on the old code. group-first-token, group-arrange, group-member-off, group-patterns and gui-ja pass on WebKit; group-from-model-add's 600x420 case fails the same on origin/main. go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./internal/gui/ under a temp HOME pass. 2026-10-04 21:50:16 +08:00