ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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). |
||
|
|
7c8f0da0ea |
gui: the Agents page's hidden agents come last, behind a disclosure shut until opened (0xZaTe on Discord)
0xZaTe (#feedback): after hiding agents, they looked pinned, not hidden
(看着反而像是一个置顶功能了 … 现在反而更显眼了). renderAgents put the
fold's groups in the order [Hidden, Not set up], so once the fold was
opened (its button then reads 「收起」, which is what they saw under Codex)
the hidden rows, each with a Show pill, sat right under the agent in use,
above the ones nothing is set on.
What changed (internal/gui/assets/app.js, app.css, i18n.js):
- In the fold, Not set up comes first. The hidden ones come last, behind
a line of their own, 「已隐藏(2)」 / "Hidden (2)", with a disclosure
chevron (right shut, down open), as a Finder sidebar section does. It
is shut by default (showHiddenAgents), its rows inert while shut, and
it unrolls on the same curve as the fold, the panel's edge moving with
it (fit) and the view following (unrollInView).
- The fold's button counts only the ones nothing is set on ("Show 3
more"), no longer "Show 5 more (2 hidden)".
- With nothing but hidden ones folded, the fold is theirs: no second
disclosure inside it, its button still reads "{n} hidden agents", and
opening it leaves the hidden rows open, so Show on one of them doesn't
shut the rest behind a new line once another goes under Not set up.
- New strings in zh, zh-TW, ja, de; the unused "Show {n} more ({h}
hidden)" is dropped.
Siblings checked: the window and the tray panel draw the Agents list
with the same code, so both get it. The Usage page's hidden clients are
already a shut "{n} hidden" line under the list. The panel's Arrange
(usage tab) is an edit mode that lists every subscription with Show/Hide
in place, as iOS's edit lists do, so it is left as is. The model picker
is a checklist.
Tests:
- new agents-hidden-last.test.cjs: the reporter's list (Codex connected,
two hidden, three not set up). Order of the fold, the hidden rows out
of sight and inert until their line is opened, then shown under it
with Show, the button's count, no sideways scroll. Window at 420px and
the tray panel at 380px, Chromium and WebKit, en/zh/zh-TW/ja/de, plus
the hidden-only case. Run against the old app.js/app.css/i18n.js it
fails on the order ([Hidden, agy, commandcode, Not set up, ...]).
- hidden-agent-cleared and rollup-short updated for the new order and
count.
Run (macOS, playwright 1.62.0, both engines): agents-hidden-last,
hidden-agent-cleared, rollup-short, show-unset-agent, fold-show-grip,
agent-grip, grip-inset, panel-fold, panel-arrange, panel-effort,
panel-profiles, click-scroll, usage-agents-hide, removed-hide,
i18n-keys, gui-zh-tw, gui-ja, gui-de, lightweight and every agent-*
test: all green. go test -tags nogui ./internal/gui/ ok; gofmt -l clean;
go vet ./..., GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet
./... clean. Screenshots of the window and the panel in zh checked by
eye. Not run: the whole GUI suite (no shared class or API changed).
|
||
|
|
460057a225 | gui: a hidden agent put back to its defaults goes under Not set up at once (Hu9956, #842), and a restart to update shows what changed before it restarts (Hu9956, #844) — #842: an agent hidden by hand stayed under Hidden with its Show (the eye) after its model was set back to Default; only turning its switch off and on moved it, since nothing ever dropped its hiding (the server leaves agentsHidden alone). Now when a hidden agent's settings change (wired, added, drift or a field's value) so that nothing is set on it, its hiding is dropped and saved with the arrangement at once, it goes under Not set up without the eye, and the status line says so; a state answer read before that save, still naming it hidden, doesn't hide it again. One hidden while nothing was set on it, and left alone, stays hidden. #844: the header's Update pill and Settings › About's Restart to update restarted on the click, and what the update brought was only in Settings › About › What's new. Now in the window they open a sheet first: Update to v…, What changed since v<current>, every release after this one up to the new one, newest first (the update's own notes at once, the full list when GET /api/update/notes answers: the site's notes feed for (current, latest], the update's notes when the feed is out of reach), Later and Restart to update; only the latter restarts. A failed swap still restarts again at once; the panel keeps its one-click pill. zh, ja, de strings. hidden-agent-cleared.test.cjs (the groups, the hiding saved once, the late answer, no scroll) and update-notes-ask.test.cjs (the pill and the Settings button ask first, both releases' notes, Later sends nothing, the sheet's button restarts, no scroll, no left border) pass on WebKit in en and zh and fail on the old code; looked at in screenshots. TestUpdateNotesRoute (the releases between, the fallback, none) fails on the old code. update-wait.test.cjs now confirms the sheet; it and update-hide, update-auto, update-check, header-centre, header-zoom-fit, show-unset-agent, fold-show-grip, agent-grip, agent-start-pick, agent-path-same, removed-hide, profile-confirm, agent-update-all, gui-ja, gui-de and click-scroll pass on WebKit (click-scroll's pointer subtests are flaky the same on origin/main). go vet, builds (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui -count=1 ./... under a temp HOME pass. |