From dee1afa40083a5f0b1070f0f75148abe1c2b03ad Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 2 Nov 2026 10:22:04 +0800 Subject: [PATCH] usage: what is hidden from the Overview can be found again (yuu003348 on Discord) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit yuu003348 on Discord: "观测/用量/概览 从概览中隐藏 后 无法取消隐藏". The way back was there: a "{n} hidden" line under the cards (#quotaHid), each row with Unhide, Show all from two. But it was drawn in --faint (#b9b9c2 on #f4f4f6, 1.77:1, 11.5px), so it couldn't be found; the Agents list's line (ikunbots on X) is the same class. - app.css: .us-hid .us-hidline is --muted (3:1 or more in light; ~5:1 in dark by the tokens), for both lines. - plugins/usage/page.js: while any are hidden, a card's menu and an Agents row's menu end with "Show {n} Hidden". It opens the line under its list, puts the keyboard on it and brings it into sight on the menu's click (openHidden, scrollOnPurpose). hiddenQuotas() is the one count both the line and the menu read. - i18n: "Show {n} Hidden" in zh, zh-TW, ja, de. - docs/subsystems/gui-shell.md says both. - usage-cards-hide / usage-agents-hide now expect the new item when something is hidden already. Run (mote, node --test): - usage-hidden-way-back.test.cjs (new): chromium and webkit, en/zh/zh-TW/ja/ de, 1200, 560 and 390 (touch long-press): 2 of 2 ok (32 cases). - 130 Usage/menu/tray GUI files: the only reds the change made were usage-cards-hide and usage-agents-hide's exact menu lists, now updated. Every other red there is red at origin/main fdfce4d98 too, run alone side by side (216 tests at base, 248 at head, the same 72 fail by name): balance-fix (#4683), menu-input-scroll (#3402), tray-cell-click and usage-fold "most on one screen" (#4790, #3415), usage-ledger "newest live route" (#3104, #4078), usage-agents-hide "unhiding a row leaves the hidden line where it was" (#2276, #3414; it fails after the menu checks). usage-cards-hide is ok at head. - go test ./internal/gui: ok but TestMainWindowCorners/macOS_26_SDK (#3949). No Go changed, so no gofmt or vet. Broken by hand: on the old assets the new test is red on contrast ("#quotaHid .us-hidline reads rgb(185, 185, 194) on rgb(244, 244, 246): 1.77:1"); with the new CSS and the old page.js it is red on the menu (no "Show 1 Hidden"). Not tried: the real app or a real account; dark mode's contrast is from the tokens, not measured in a test; Windows and Linux webviews; the whole GUI suite (the change is a menu item and a colour, no new API call or layout). --- docs/subsystems/gui-shell.md | 4 +- internal/gui/assets/app.css | 2 +- internal/gui/assets/plugins/usage/i18n.js | 4 + internal/gui/assets/plugins/usage/page.js | 24 ++- internal/gui/tests/usage-agents-hide.test.cjs | 14 +- internal/gui/tests/usage-cards-hide.test.cjs | 16 +- .../gui/tests/usage-hidden-way-back.test.cjs | 181 ++++++++++++++++++ 7 files changed, 225 insertions(+), 20 deletions(-) create mode 100644 internal/gui/tests/usage-hidden-way-back.test.cjs diff --git a/docs/subsystems/gui-shell.md b/docs/subsystems/gui-shell.md index 2733317c0..37b5cf2f2 100644 --- a/docs/subsystems/gui-shell.md +++ b/docs/subsystems/gui-shell.md @@ -502,8 +502,8 @@ covers it in both engines, every language and a narrow window. - There are no native `