paultian on Discord (#feedback): Routing, Usage and Providers each kept
their own "Hide accounts" state, so turning it on in one page left the
others showing emails. Now window.hideAccounts is one switch, one
localStorage value (magpie.maskEmails), behind #rtMask, #usageMask and
#pvMask alike. Flipping it in any page applies to every page at once,
and a storage event carries it to other windows and the tray panel.
The old magpie.maskProviders value is folded in on first load (hidden
if either value was on) and then removed, so nobody who hid accounts
on one page sees them shown after updating. The tooltip and the
Settings line now say "on every page" instead of "on this page", in
every language.
Tests: provider-mask.test.cjs checks that one switch hides accounts on
every page and in a second window, that the state survives a reload,
and that an old maskProviders=1 comes through as hidden.
account-mask's expected tooltip text is updated.
Run on mote (GUI files at base 05aba5ca4; the Go asset/budget tests again
at this head after rebasing on a92cc3f33):
- go test -run 'Budget|I18n|Asset|Script|Strings|Lang' ./internal/gui: ok
- The masking/privacy GUI files at --test-concurrency=2, chromium and
webkit, every language (account-mask-alias-plan, account-eye,
window-mask, usage-fold, masking-demo-unblurred, account-alias,
provider-mask, account-eye-provider, account-mask,
privacy-hides-accounts, account-mask-sessions, mask-emails,
plugin-name-unmasked, i18n-keys, masking-records): 403 of 408 pass.
The 5 reds:
- provider-mask "chromium en 420" (a click timed out). Rerun with
usage-fold at concurrency 1: provider-mask is all green, and that
run is 146 of 150.
- usage-fold, 4 subtests: "17 subscriptions and 29 accounts" in
chromium and webkit, and "several accounts" in webkit en and zh.
They fail the same 4 at origin/main 625938a2f at concurrency 1
(6 of 10 pass). That is #3415 / #4790, not this change.
- Not touched: Go code, so no go vet.
Broken by hand: with the old assets, provider-mask's one-switch tests
go red; with the maskProviders migration taken out, the
old-value-comes-through test goes red.
Not tried: the whole GUI suite (the owner's rule is to ship each
verified fix right away), and the real tray panel on Windows/Linux
following a switch flipped in the main window. Only the browser
storage event is tested.
Shinji_Zl's WorkBuddy account is named 他. With account names hidden,
Usage → Overview and the quota cards still showed it: noteAccount and
names() kept only names of two characters or more, and mask() skipped
text nodes shorter than two.
A name of one character is now kept when it is a single letter past
ASCII (nameLike: a CJK name like 他), never one ASCII letter or digit,
which would mask every "a" or "1" on the page. Such a name is masked
only where it stands apart: next to another letter or digit of any
script it is part of a word (inWord: 其他 keeps its 他). mask() now
looks at text nodes of any length.
The core scripts' budget is kept, not raised: the new code is written
short, and three of the masking block's comments are cut to what they
say (the stand-in letters, names(), the accounts shown).
Run (mote, on e7185daeb):
- the GUI files that mask names or show account names
(--test-concurrency=4): 674 tests, 651 pass. 22 reds are
usage-agents-hide, which fails the same 22 alone at origin/main
f849ccced (#2276, #3414). One is account-mask chromium zh's click on
#usageMask timing out (#3951, same on main in a whole run); the file
passes 5 of 5 runs alone here and 5 of 5 at origin/main.
- broken by hand: app.js as on main, account-mask 0 of 4; the inWord
line taken out, 0 of 4 (the 他 of 其他 is masked, 4 names not 3).
- TestCoreScriptBudget (go test ./internal/gui -run Budget) and
i18n-keys: ok.
Not tried: the whole GUI suite (14k tests, ~200 known reds), and the
reporter's real WorkBuddy account.
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).
outloudvi on Discord: with Hide accounts on, the Plugins page blurred
"API key" in Kiro's summary ("…or an API key"). A plugin's account with
no name is labelled "API key" or "Signed in" by pluginLabels (with
" (2)" for a second one), and every account name was hidden wherever it
appeared, so any sentence with those words was blurred too. They are now
in NOT_ACCOUNTS, the " (n)" slot suffix stripped before the check. A
key's tail ("API key …abcd") is still hidden.
Run:
- account-mask.test.cjs, with Kiro accounts "API key" and
"Signed in (2)" and a sentence holding both words: 4/4 (chromium,
webkit, en, zh). On the old app.js it is red 4/4.
- privacy-hides-accounts, account-eye, window-mask, mask-emails and
account-alias: 68/70 at load ~200. The reds were different webkit
subtests each run (5s timeouts in account-alias and account-eye), so I
counted them as load and didn't file them.
- i18n-keys 4/4; go test ./internal/gui -run Budget ok.
Not run: the whole GUI suite, and the change in the real app.
With Hide accounts on, the panel's agent model picker (Hermes Agent's,
CODEX group: "GPT-6-Astra via magpie <address>") showed the Codex
account's address. In the panel the mask covered #view-agents only, and
the picker (#pop), menus and dialogs sit outside it, at the body. The
panel now masks the whole body, as its comment already said. The window
masks Routing and Usage as before. Its picker names no account, so it
needs no change.
Every picker shares this one #pop and #list, so this covers every
agent's picker in the panel. The TUI has no Hide accounts setting.
Run, at 8b84dc902 in its own worktree:
- account-mask.test.cjs: a picker row holding an address, its text and
its tooltip, is masked and comes back on unmask. chromium+webkit, en+zh:
4/4 pass. With the app.js change reverted it is 4/4 red.
- Every GUI file that opens the panel or masks (226 files, 3441 tests,
chromium+webkit, every language): 13 red under load (avg ~130-250).
Rerun one file at a time, 4 files stay red, and they are red the same
way on origin/main 63be47717: provider-advanced-fold (#2552),
usage-fold (#2163), model-id-space (#2536) and rest-try-now (filed now
as #2564). None of them uses the panel's mask.
- Go: gofmt -l clean; go vet -tags nogui on darwin, linux and windows ok.
For the full go test -timeout 45m ./... run, see the next commit.
Both tests opened the page in a new browser context, cleared their
localStorage keys and reloaded at once. A new context's storage is already
empty, and the reload lands while the page's first reads (agents/cli,
agents/install, usage, upstream, update, whatsnew) are on their way. WebKit
logs each fetch it cancels as "Fetch API cannot load … due to access
control checks." with source "javascript", which Playwright's WebKit turns
into a pageerror, and the tests' final assert.deepEqual(errors, []) failed.
The app catches every one of those reads; nothing is wrong in the page.
Instrumented runs show it: requestfailed "cancelled" for whatsnew/update
and the two page errors within 70ms after the first reload, none after.
Verified (Playwright 1.62.1, macOS arm64), WebKit "several accounts"
(en+zh), 8 copies at once, 5 rounds:
- before: 3 of 80 cases red, each with "Fetch API cannot load … due to
access control checks" right after the first reload
- after: 80 of 80 pass, no page error
- usage-fold.test.cjs + account-mask.test.cjs, Chromium and WebKit,
10 runs: 100/100 pass (10 cases each run)
Geequlim's account names were masked on Routing and they couldn't tell how to see them: the Routing and Usage "Hide accounts" buttons (and the request log's "Clear filter") carried their tooltip as data-tt="…" with no title, and translateStatic only read title, so no tooltip ever showed. A data-tt with a value is now the title's English; and while accounts are hidden the button's tooltip reads "Accounts are masked for a screenshot — click to show them" (账号已打码,方便截图分享,点一下即可显示). account-mask.test.cjs checks both and fails on the old code; it and mask-emails.test.cjs pass in WebKit (en, zh). go vet ./internal/gui, builds (darwin, GOOS=linux, GOOS=windows) and go test ./internal/gui under a temp HOME pass.