Beside the sidebar, Library's, Plugins' and Settings' heads sit in the
title bar after the breadcrumb, between --tools-l (the crumb's right +
16) and the window's buttons, laid out flex-end. When the tools needed
more than that room they ran on to the left, over the crumb: at about
650pt with the sidebar, Library -> MCP servers had 「发现」 over
「MCP 服务器」's last character. The crumb never gave way to them.
app.js tools() now shares the room out, laying out and reading each
step in its one frame, the next only if the tools still run over:
1. the crumb whole (its natural width from its parts, the last one's
scrollWidth) and the tools with their words;
2. body.tools-tight: Library's Discover / Library folder / Backups and
Plugins' "Mirrors in China" show their icon (or switch) alone. Each
keeps its name as aria-label (a hidden span leaves the accessible
name) and its tooltip as before (the folder's path, the backups'
note and path, Discover's and the mirrors' sentences);
3. --crumb-max: the crumb drops its leading parts ("Work /"), a part
and its slash at a time, and last cuts the page's name at its end.
In the side-nav head the Library buttons and the mirror switch are
flex: none and Plugins' search keeps 120px, so what doesn't fit shows
as running over rather than shrinking out of sight. The views'
MutationObserver also asks tools() again, as a tab's own tools change
(Discover only on MCP servers and Skills) without the crumb resizing.
title-bar-tools.test.cjs (new): every Library tab, Plugins' three and
Settings, sidebar picked, window mode, at 560 (the window's least),
650, 760, 900, 1024 and 1280px, in zh, zh-TW, ja, de and en, Chromium
and WebKit. No tool lies over the shown title or another tool or out
of the bar, no label is cut, an icon-only tool has aria-label and
title, only leading crumb parts go and the page's name shows, whole
from 650px. Against the old assets (MAGPIE_GUI_ASSETS) it fails in all
five languages at 560px Library Instructions ("a tool lies over the
title"); with the change Chromium 5/5 and WebKit 5/5. Looked at
screenshots of zh Library MCP servers and Plugins Discover at 560, 650
and 760px.
docs/subsystems/gui-shell.md says how the title bar gives way.
Run with both #2623's and #2625's changes, on b7d9616d0 (macOS, Go
1.26.8, load average 80-270 from other sessions):
- gofmt -l: nothing. go vet -tags nogui ./... with GOOS darwin, linux and
windows: clean.
- set -o pipefail; go test -timeout 45m ./...: every package ok except
internal/agent (2702s) and internal/gateway (2721s), which ran past
45m under the load (#2544, #2108; no test hung, each was seconds into
its run). Rerun with -timeout 90m: internal/agent ok (2816s);
internal/gateway's only red is TestDesktopSubagentUnsetDoesNotDecode,
"allocated 1 times" (10/10 green alone, filed as #2699). The textcalls
tests passed in that run.
- The whole GUI suite, both engines (NODE_PATH at playwright@1.62.0). It
ran in two parts, because another session deleted the first part's log
mid-run; the files from provider-* on were run again. title-bar-tools
passed 10/10 inside the suite. The reds are red the same way on
b7d9616d0's assets, rerun beside them (MAGPIE_GUI_ASSETS) at
concurrency 1-2:
- segs-glide 20/20: filed #2683.
- sidebar under load: filed #2684; 4/6 red on the old assets.
- lightweight: filed #2638.
- Already filed:
- usage-agents-hide (#2276), routing-bodies (#2559, #2658),
routing-keys-fold (#1612), routing-model-rest (#2115),
routing-wb-restricted (#1905), rest-try-now (#2564), s3-sync (#2448).
- quota-count-wrap, quota-name-translated and usage-fold (#2399),
usage-checkin (#2549), usage-refresh (#2184), usage-ledger (#1876).
- codex-predictions (#2624), github-sync (#2631), login-import (#1307).
- The rest were Playwright launch timeouts under load (#2371).
- After rebasing on origin/main 85eef5d87: title-bar-tools Chromium 5/5,
WebKit 5/5. Before that, WebKit zh and ja failed on a page error, "Fetch
API cannot load /api/providers due to access control checks". That is
WebKit's report of a sidebar read cancelled by the test going to the
next page (#1350, #1307). The test now leaves that one WebKit message
out. Against b7d9616d0's assets, WebKit ja is still red: "a tool lies
over the title at 560px library instructions".
Not tried in the real app on Linux (WebKitGTK) or Windows (WebView2);
no motion or new browser API is involved, only layout.