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).
The owner (10-28, screenshot of Usage › Sessions with 13 agents in a strip
across the page): "这应该是个 Combo Box". The agent filter was a segmented
strip, one segment per agent in range, that scrolled sideways in itself
once it ran past the window (#929). It is now the same sessPick button
as 全部模型 and 全部文件夹, with the same searchable menu: "All agents",
then every agent with sessions or usage in the range, the most used
first, each with its tokens under the other two filters. One agent in
range still leaves it hidden; the pick still resets to All when its agent
leaves the range. The request ledger's agent filter was already this menu.
#sessAgent left the CSS rules for scrolling strips; the strip's own test
(sess-agent-strip, #929's sideways scroll) is gone with the strip, and
usage-sessions-agents-fit now checks the menu: no sideways scroll at 860
and 560 wide, the three filters on one line inside the window, the
menu's order, search, a pick shown on the button and kept when the page
is drawn again, All clearing it, one agent hidden. sessions-empty-range
and sessions-overview-once pick their agent from the menu.
Run on mote (node 22, Playwright 1.62.0):
- usage-sessions-agents-fit, sessions-empty-range, sessions-overview-once:
24 of 24, Chromium and WebKit, every language they cover.
- usage-sessions-agents-fit against origin/main's page.js, client.js and
app.css: red in all four (BUTTON.sess-pick expected, a div of segments).
- go test -tags nogui -run Budget ./internal/gui: ok.
- 122 other GUI files that touch Usage, sess-pick or i18n, concurrency 3,
beside another session's full GUI suite (load 36-75): 1944 pass, 24
fail in gateway-caller-keys, gateway-key-cycle, i18n-keys,
mcp-oauth-app, usage-ledger and web-page. Rerun alone at concurrency
1 on this tree and on origin/main (d4f1d6480, then c4972b36e after the
rebase): the same reds on both. gateway-key-cycle is #4072,
gateway-caller-keys #3797, usage-ledger's "newest live route" #4078,
web-page's #gateway .dot #4079. i18n-keys' "masking…" was fixed on
main in 174250b27. mcp-oauth-app passes alone on both.
- At this tree, rebased onto 6ecc65b6d (the pushed tree):
usage-sessions-agents-fit, sessions-empty-range,
sessions-overview-once, i18n-keys and click-scroll 50 of 50, and
go test -tags nogui -run Budget ./internal/gui ok.
Not run: the whole GUI suite (another session's was running on mote).
Follow-up to liubing's #1743 patch, which put cursor and opencode in
HasTranscript. That moved their search from magpie's recorded
transcript to SearchSession, whose byte prefilter (mayHold) reads
s.Path. For these agents s.Path isn't the conversation:
- OpenCode's JSON storage: the session info file, without messages,
so every word missed;
- OpenCode's and Cursor's SQLite stores: the newest pages are in the
-wal, so a live chat's latest turns missed.
linesFile now skips the prefilter for them (a Cursor .jsonl still
gets it).
cursorTranscript also handed the CLI store's system message ("You
are a coding agent.") to the transcript as a said part; system
messages are skipped, as the listing already does.
The patch's tests commit left TestSearchSessionWithoutATranscript
red (it used cursor as the agent without a transcript; now gemini).
sessions-empty-range.test.cjs runs in every language, de at 420px.
Run: go test -tags nogui -count=1 ./internal/sessions/ ok, and -race
ok; sessions-empty-range 10/10 (Chromium+WebKit, en zh zh-TW ja de);
sessions-today/overview/toolbar/search/manage/calendar-fill/paging
GUI tests pass.
Broken by hand: prefilter always on -> TestSearchOpenCodeFiles and
TestSearchCursorLiveChat red; system skip removed ->
TestSearchCursorLiveChat red. Also broke the patch itself: editor
files not appended, readOnly Delete guard, stats message dates, CLI
dedupe, HasTranscript entries, parseCursor readOnly dispatch, and
the "All sessions" button (via MAGPIE_TEST_APP_JS); each went red.
Co-authored-by: liubing <lb0806@foxmail.com>
The new Go tests fail on upstream 6a8b2c68 with missing editor sessions and ErrNoTranscript; the date-range UI test fails on the missing history shortcut.