4794de398ea8337d223a91e207181c56fcf4ad76
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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 |
||
|
|
db965824d9 |
gui: on the Requests tab a read the reader moved on from is cancelled, and Refresh waits for the one on its way (Vantiboo1ean)
Vantiboo1ean (Discord, ~750k requests): on Usage > Requests each filter, model pick or refresh sent another read of the page and of the heatmap. The page dropped the answers it no longer wanted, but the requests kept running. A browser opens about 6 connections to one host, so the newest read queued behind them and the page spun on, and every press added another read. Now loadLedger and loadLedHeat go through ledRead: - A read with a different query aborts the one before it (AbortController; api() takes a signal). - A read of the same query (the refresh button, the timer) joins the one already on its way instead of sending a second. - An aborted read returns quietly and is never shown as an error. The server side (the reads themselves taking seconds) is the commit before this one. Tests: - usage-ledger-abort.test.cjs (new) runs in Chromium and WebKit at 1180 and 560 px with every answer held. It types three narrowings and checks that the page and heatmap reads for the first two are cancelled and the wanted one is not. It checks that Refresh pressed during that read sends no second read, that the newest answer is drawn, that "abort" is never shown, and that a later refresh reads afresh. Against the old assets (MAGPIE_ASSETS) it fails: the stale reads are left running. - usage-ledger-chart.test.cjs accepts that its held first read is now cancelled by the second click. - No new strings. Run: the Usage GUI suite (32 files: usage-*, ledger-*, request-archive*, panel-usage, routing-upstream, web-page …): - WebKit: 150/150. - Chromium: 149/150. The one failure is panel-usage "chromium zh" (the tray panel shows 4 tabs, where the test expects 3). It fails the same way, run alone, on the base |