Commit Graph
3 Commits
Author SHA1 Message Date
yetone 054bdb8bbe gui tests: the sidebar's room
18e82adc6 shows the sidebar from 1024pt, so the window's pages are 212pt
narrower and start at x=212. Eight files assumed the old room:

- header-centre measures the tabs' gap from the layout button.
- phone-web's desktop browser at 1000pt, under the sidebar's width.
- routing-pause and routing-pointer-pin wheel over the view, not the
  sidebar at x<212.
- routing-scroll-end takes its columns from .rt-more's own width
  (routing.js byWidth); usage-pack opens at 1512 to keep 1300 of room.
- purpose-filter closes the menu by a scroll that ends at the view's
  top, and measures once the rows and scroll are at rest.
- sessions-overview scrolls the shape card no further than a third down,
  and waits a frame after a resize: WebKit starts the reduced-motion
  transition of the sidebar's padding and settles it in the next frame.

Run: all eight, plus sidebar, side-toggle, session-identity and
usage-ledger, pass in Chromium and WebKit; each failed with 18e82adc6
and passed on d4eae3618 with it reverted.
2026-10-12 01:58:58 +08:00
yetone 18e82adc62 gui: the window's pages down a sidebar in groups, the open page's tabs under it, and a button to have the header's tabs instead
From 1024 points wide (SIDE_AT) the window lays its pages down the left
as a Mac app's sidebar: Work (Agents, Sessions, Library), Models
(Providers, Routing, Gateway), Insights (Usage), Extend (Plugins), with
Settings and the gateway's address at the foot. The open page's own tabs
(Usage, Library, Plugins, Settings) are listed under it, opening and
folding on an iOS-like spring, and the page's strip is hidden. The header
becomes a breadcrumb, and pages whose head held only tools have them in
the title bar. Graphite: the open page is in the text's ink, not purple.
A pressed row darkens and never shrinks. The selection under the tabs
sets off as the row is pressed, on a 0.3s curve (it felt behind the
finger), and is the list's only shape: a sub-row hovered or pressed has
no ground of its own, which showed a block under the finger before the
selection slid there. The page's tab is clicked at once, so what is
typed next goes to it.

The title bar's button (or ⌃⌘S, Ctrl+Shift+S), there at every width,
picks the sidebar or the header's tabs. The choice is kept in
localStorage magpie.navLayout (side or top) at every width, so it is laid
out from the first frame; picked in a narrow window the sidebar is 184
points under 860. The two trade places in
a view transition: the sidebar slides, each tab flies to its place, and
the page slides as one. Without view transitions or under reduced
motion, the change is at once.

With nothing picked, narrower than 1024 the page beside a sidebar would
be narrower than Usage's requests table needs, so the header's tabs come
back. A resize
drops what a click held (heldWidth). Usage's KPI strip goes two to a line
by the room the page gives it (a container query), and Japanese counts
wrap there. Tests whose window is 1024+ were updated for the sidebar,
and docs/subsystems/gui-shell.md says how it works.

Run: sidebar.test.cjs and side-toggle.test.cjs 16/16 in chromium and
webkit, in en, zh, zh-TW, ja and de. Each was broken by hand (press
shrink, address cut, press glide, sub-row ground, view transition, kept
choice) and went red. Every page at 560 points with the sidebar picked,
zh and de, both engines: nothing scrolls sideways. session-identity's
ledger row sits under the footer beside the sidebar; WebKit's click
doesn't scroll to it, so the test wheels it up first. Animation frames were checked from a recorded video. The 105
affected GUI files in both engines; their reds were rerun alone and fixed
(filter-ime: the sub-row's click now at once; session-identity, above) or
fail the same on main (tray-logos). The full GUI suite in chromium, on
the rebase onto d5cae267a, was cut short at 352 tests on the owner's
"ship": 6 reds (account-alias, account-models, codex-auto-review,
codex-credits, context-text) each pass alone, here and on main d5cae267a,
so they are timing under the full run's load and are to be filed. After
rebasing onto e4e22b23e: sidebar, side-toggle, session-identity,
filter-ime, library-instr-busy, usage-speed-count and view-scrollbar,
50/50 in chromium and webkit. go build ./... passes.
2026-10-12 00:41:34 +08:00
yetone 7ed38530f6 gui: the header's tabs stay in the middle when closed up, and halfway between the edge and the buttons when in the row (emo172, #442) — at text size 110% on Windows the header's tabs sat about 67px left of the middle: fitTop's cramped both closed the tabs up and put them in the row, where auto margins left a third of the room to their left and two thirds to their right. The closer tabs are now tried in the middle first; only when they don't fit there does a new inrow step put them in the row, with the buttons' auto margin dropped so the room either side is the same, give or take the header's padding against the row's gap. header-centre.test.cjs fails without the change. 2026-10-01 23:38:15 +08:00