Repository navigation
Workbench: routing under the generator when a narrow panel is tall enough, and the grouped profile by provider then level - #269
Merged
Conversation
…ough, and the grouped profile by provider then level Below 760 px the stage now weighs the panel's height as well: when the generator without its grouped profile and the whole routing pane fit the visible height together, routing stands under the generator and usage under routing, with no Routing or Usage tabs, and p and s hide and show them as at wider widths. Otherwise the narrow layout stays as it was. The fit is measured from what is rendered, on resize and on structural changes only, never on a readout or launch-line change, with the same quantities in both arrangements and a small grace so it never oscillates. The grouped profile orders its groups by provider (the default role's first, then the panel's provider order) and within a provider by catalog tier, then thinking, then alias; roles keep routing order. Refs #239
… a resize settles The narrow panel now decides whether routing fits under the generator from routing's height without its fallback chains, measured even while they show, so showing the chains never sends routing back to a tab; their extra lines scroll. The generator's head counts every line but the Show controls only the stacked arrangement adds. The size is taken once a resize has settled, so a drag tries the stacked arrangement once rather than at every pixel, and a try keeps the Routing and Usage tabs (without room) so focus on one stays unless the stage really stacks. A flip to stacked is measured again as laid out, a fallback-font measurement is dropped when the fonts are ready, and a probe whose routing did not show ends. The grouped profile is a named group, aliases compare by code unit, and the browser verifier asserts the short and tall narrow arrangements, p and f when stacked. Refs #239
atyrode
force-pushed
the
fix/narrow-stacked-routing
branch
from
October 12, 2026 00:18
a89eddf to
6de7dd8
Compare
…old, and the stacked cache says its bound
atyrode
marked this pull request as ready for review
October 12, 2026 00:36
Owner
Author
Verdict: passHead
|
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In a narrow but tall panel (the operator's preview: about 658×1033 CSS px) the generator showed the compact grouped profile with half the panel empty, and Routing and Usage were tabs.
useModechose the layout from the panel's width alone (NARROW_BELOW_PX = 760), never its height. The grouped profile was also ordered by where each group's first role appears in routing, which read as no order at all.Behaviour
p/shide and show the panes exactly as at wider widths. Hidden routing brings the grouped profile back into the generator and Show routing into its head. When they do not fit, the narrow layout is unchanged: the grouped profile in the generator, and Routing and Usage tabs.web.tsx(useStacked,bareHeight,bareRoutingHeight), never against a fixed height.data-bootlifts), or when the stage's structure changes: entering narrow, the routing's rows or the generator's rows, routing hidden or shown, a return to the main view, or the fonts becoming ready. It is never judged because the readout, the launch line or the fallback chains changed. Whatever then runs past the panel scrolls, so the launch never moves under the pointer and showing the chains never sends routing back to a tab.data-reveal) that only the stacked arrangement adds; Defaults and Revert wrapping still count. The bar and routing are weighed as the stacked arrangement last laid them out at that width and route count. Routing is weighed without the lines its chains run past each lead, even while the chains show.data-probing) and settles back if it does not fit. During the try, the Routing and Usage tabs keep their nodes but take no room, so focus on one stays unless the stage really stacks. A flip to stacked is measured once more as laid out. Measurements taken in a fallback font are dropped when the fonts are ready. A probe whose routing did not show ends.data-mode="narrow"spacing is kept in both narrow arrangements. The arrangement itself is shown bydata-stacked. Atabbedflag replaces the arrangement uses ofnarrowinweb.tsxandpanel-keys.ts(PanelKey.narrowbecametabbed).routing-model.tsprofileGroups): groups go by provider first, thedefaultrole's provider leading and the rest infamilyOrder(orderedFamilies). Within a provider they go by the lead's catalog tier, strongest first (elite, smart, normal, fast), then by thinking level, highest first on the thinking scale, then by alias compared by code unit. Roles keep routing order inside a group, and the glide between groups is unchanged. The grouped block is nowrole="group"named "roles by model".docs/configuration.md(top bar, grouped profile, usage, keys and layout paragraphs) and README describe the rule. The browser verifier now reads the arrangement from the tabs. Its geometry sweep adds the stacked main view at 620, 320 and 170 px, 2400 px tall. A newnarrowArrangementsstep asserts:phides and shows routing while the stage stays stacked;fchanges neither the arrangement nor the horizontal overflow.Verification
Measured on 6de7dd8 (on main 8c0c849). The final head 9ec7903 changes only comments, the docs' tier sentence and one test row, from the delta review. The design lab ran real Chromium with the real Code and OMP bundles and no providers, in
layout=full.data-stackedscrollWidth/clientWidthtruetruedata-stackedwith 0 flips over 40 frames. Routing grows from 431 to 479 px (658) and to 647 px (390), the viewport's scrollHeight grows, and its scrollWidth stays equal to its clientWidth. With the chains shown, the routing height used for the fit measures 431 px, and the boundary is the same 946/945 px as with them hidden. At a new width of 600 px with the chains shown, the probe found a 972 px boundary (stacked at 968, tabs at 967).launchinteraction and an in-page click both change its line from empty to "Verification stopped while checking models: design_lab_native_effects_disabled". The arrangement does not flip, and the launch's top stays at 423 px.pandshide and show routing and usage, and Hide, Show routing and Show usage work by click. When tabbed,pandsopen and close the Routing and Usage tabs.bun run checkpasses, andbun test test/routing.test.ts test/panel-keys.test.tsgives 18 pass.scripts/gate.shon 6de7dd8 exited 0 (PASS (412s)), and on the final head 9ec7903 it exited 0 again. Both runs used Bun 1.4.2 on two CPUs. The final run gave 428 pass and 0 fail andPASS (408s), including the newnarrowArrangementsstep and the stacked geometry pass. Native verification returned{"ok":true}for bothatyrode.ompandatyrode.code.Not exercised: reduced motion was not emulated in the lab; the verifier's new step does run under reduced motion inside the gate. The keys in the lab were synthetic
KeyboardEvents and the clickselement.click(), whereas the verifier step uses CDP input. The 170 and 240 px checks constrain the panel element, because the lab cannot shoot below 320 px. The fonts-ready re-measurement was not observed directly.Refs #239