Commit Graph
3 Commits
Author SHA1 Message Date
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 8e44c2f351 gui: the dot on Plugins says what it is, and leads to the plugins with an update
The owner, on the sidebar's dot beside Plugins: no one can tell what it
means, and once they click it, they should see which plugins need
updating. It meant "a plugin update is waiting", said only in a hover
title, and Plugins opened on whatever tab was last open.

- Sidebar: under Plugins, Installed reads "1 update" / "N updates" in the
  dot's colour in place of its count, with a title saying where to update.
- Opening Plugins while an update waits lands on Installed.
- Installed names the plugins with a newer version in a bar above the
  list, with Update all beside them (moved there from the footer).
  Each row still shows its own "vX out" and Update.
- Strings in zh, zh-TW, ja and de; the docs (en, zh, ja) say the same.

Run:
- plugin-updates.test.cjs: chromium and webkit, en zh zh-TW ja de, at
  1024 (sidebar) and 600 (tab bar), 22 ok. Also ok in both engines:
  plugin-git, plugin-update-button, plugin-check-updates,
  plugin-card-update, plugin-prerelease, nav-sub-unroll, sidebar,
  builtins, i18n-keys. go test ./internal/gui/ -run
  'TestCoreScriptBudget' ok.
- Broken by hand, each red: no sidebar label (the 1024 cases), no jump
  to Installed, no bar (every case).
- Looked at in WebKit screenshots, zh at 1024 and de at 600.

Full run, with the rest of its series:
  this series (P5, the Plugins dot, the probe test, P6, and a
  built-ins-on commit since dropped for main's own 5a2414acd) was run
  together, at load 200-660.
  At the pushed tree, 88dfab2d3 on origin/main 5380114da (rebased
  from 210bc2b77, no conflicts; its GUI assets and tests are the same
  bytes as the tree the GUI runs below used, diff -rq): gofmt clean,
  vet darwin/linux nogui/windows ok, TestCoreScriptBudget ok
  (1,446,845 of 1,447,000). go test -timeout 45m ./... at load
  193-278: 62 packages ok, red in TestMainWindowCorners (#1936) and
  TestPluginStreamLargeReplies JSON_fast (client timeout; alone 1 of
  3 red here, 0 of 3 on 5380114da side by side at load ~280; the
  series doesn't touch the stream path; #2551 reopened with the
  output, taken). Two earlier runs at this tree are discarded: one
  stopped when the disk filled, one when another session's go clean
  -cache emptied the build cache mid-run. The whole GUI suite at
  this tree was not finished (the disk filled); the files the series
  reaches ran (1318 tests, 124 red), and the 39 red files ran again
  at concurrency 1 on both trees: here 148 ok 120 red, origin/main
  135 ok 127 red. Both sides' reds are page.goto/launch timeouts
  under load (66 here, 71 there) and the same assertions:
  title-bar-tools' and settings-proxy-auth's "access control checks"
  on a cut-off /api/providers read (#2740, taken next), sidebar's
  "the list unrolls" and WebKit "#prefs pressed darkens" (#2684;
  alone, 1 red here, 3 on main), side-toggle (#2732); plugin-move
  red on main only. Six files again one by one on both trees:
  plugin-actions red 1 of 6 here, a 5s goto of ?view=plugins at load
  260; plugin-clash red on both; plugin-own-icon, plugin-gateway,
  plugin-checkin ok on both; settings-proxy-auth ok here, 3 red on
  main.
  At 976c9893a (on origin/main 6f950653f): go test -timeout 45m ./...
  red only in TestMainWindowCorners (#1936, the window's process
  killed at its deadline) and TestSetAnswersWhileDevinAndProvidersHang
  (#1375, 3 of 3 alone). The whole GUI suite, both engines: 10834
  tests, 237 red in 73 files, 184 of them a 180s browser launch. Those
  73 files run again at concurrency 2: 52 green, among them every
  plugin-* and agent-* file and plugin-actions; the 21 still red were
  run at origin/main f191d6423 and are red there too: codex-predictions
  (#2624), lightweight (#2638), segs-glide (#2683), usage-agents-hide
  (#2276), provider-advanced-fold (#2552), routing-bodies (#2559),
  routing-model-rest and rest-try-now (#2115, #2564), routing-keys-fold
  (#1612), routing-wb-restricted (#1905), routing-request-metrics
  (#2571), quota-count-wrap and quota-name-translated (#2228), s3-sync
  (#2448), usage-checkin (#2549), usage-ledger-abort (#2700),
  tencent-access-key (#2733), usage-range (#2734); side-toggle's WebKit
  motion red 1 of 3 on main, 0 of 3 here (#2732); usage-fold green alone.
  Rebased onto origin/main 717b69f78 (60725faa1, no conflicts): gofmt
  clean, vet darwin/linux nogui/windows ok; go test -timeout 45m ./...
  red in TestSetAnswersWhileDevinAndProvidersHang (#1375) and agent and
  gateway at the 45m alarm with tests still moving at load 400+, both ok
  alone (1173s, 1167s); 105 GUI files the series reaches (plugin*,
  sidebar*, side-*, settings*, title*, header*, agent-*): 1322 tests,
  23 red, run alone 214 of 218 ok, the 4 left in sidebar and
  sidebar-overlay-scrollbar (WebKit), red on 717b69f78 too (#2684,
  #1863). The whole GUI suite was not run again after the rebase.
2026-10-18 07:13:10 +08:00
yetone e9b16ca184 gui: a plugin's Update is a button the size of Install, in green, on its card, its row and Update all (#1587, timonwong)
timonwong saw a plugin update announced on Plugins but the button that
brings it hard to find: on a card it was a small chip among the meta
chips ("Update to v0.0.9"), on the Installed row a text link, and Update
all a text link in the footer.

- One updateButton() makes every plugin Update: .pm-act (Install's height,
  min width, padding, font and corners) with .pm-up, green-soft with
  green text, filled green on hover (the app's own tokens; no stripes).
  Its title says the version (or the repo's newer commit for a git one),
  and for a community package that magpie updates by itself within the
  hour.
- A card's one button is Update in place of Signed in / Installed, as an
  app store's Update takes Open's place, and the card's version reads
  "v0.0.7 → v0.0.9" then. Sign in, not done yet, and Move keep their
  place; the Installed row offers Update then. The plugin's page uses the
  same button (actionFor).
- The Installed row's Update and the footer's Update all are the same
  green button.
- The class is pm-up, not update: the title bar's app-update pill owns
  .update (margin, height 22px), which the first try picked up.

Tests:
- new plugin-update-button.test.cjs: at 520px, Chromium and WebKit, en,
  zh, zh-TW, ja, de: the card's Update, the row's Update and Update all
  have Install's height, min width, padding, font, corners and margins,
  are at least Install's width, have a colour that isn't Install's, fit in
  the card, no sideways scroll. On the old plugins.js/css 7/7 fail; with
  the class named update the margins check fails.
- plugin-card-update.test.cjs follows the chip to the card's button.
- every plugin*.test.cjs, both engines: 274/274. The
  first run caught Update taking Sign in's place on the plugin's page
  (plugin-market), fixed by the order above.
JS/CSS only; no Go changed.
2026-10-11 20:10:05 +08:00