Repository navigation
fix(website): collapse the desktop top bar instead of clipping it - #15656
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
2 similar comments
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
ab5ff7a to
2b161de
Compare
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS The desktop bar now runs two collapse ladders that must be kept in step by hand, and the PR itself says reviving measurement "still needs a ruling." Watch
[DESIGN-REVIEWED] d64b162 Description read[DESCRIPTION-READ] d737924a13547d0bf96a9e95c51cecdc7a8a13be3ff33323331ebb866b64309c That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS When the crews list fails, its error message shrinks to a useless stub with a blank gap after it, and it still takes the pinned crews' room. No first-time reader has seen these screens. Watch
Suggestions
[UX-REVIEWED] d64b162 Description read[DESCRIPTION-READ] f41deba2472f814781c77395e561f1f2068e95fd189646ff66d363d75df18559 That sha256 names everything this verdict read: the PR description, plus the 15 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The measured ladder fixes the cause, but the desktop now runs two ladders kept in step by a hand-copied selector map, and a new feedback-label step rides along with no named harm. Not justified as shipped
What this change shipsInventory (10 items) — 7 justifiedIntent: keep every desktop top-bar item, and above all the connection dot, on screen at every width on prerelease builds. FIX.
[FIRST-PRINCIPLES-REVIEWED] d64b162 Description read[DESCRIPTION-READ] 2cbed1f3b8ed11d7098ef9a4b41bfa5ddf12b060cb31c179a98c3e434ac9f9e6 That sha256 names the PR description this verdict read. Recompute it with |
|
|
2b161de to
04a5e50
Compare
|
self-added: yes
|
|
|
|
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
|
|
|
|
|
|
|
|
|
|
On prerelease builds the "Report problem" chip widened the right group past the widths its container-query rungs were measured against, so the readout capsule clipped from the left, connection dot first. The desktop header keeps its three tracks and its container rungs, so the search stays centred, and adds a measured backstop (`.topbar.tb-measured`): useTopbarCollapse reads each group's contents through a display:contents wrapper and folds more, per group and in the phone ladder's order, wherever the container rungs still leave the group overflowing. Its level never sits below the last step the container rungs have folded, so both fold in one order. Pinned crews still give way before anything collapses. Phones are unchanged.
9e69502 to
d64b162
Compare
|
Round 13 (d64b162): rebased onto cc7e798, which carries #17309, main's fix for the One addition, for the Design item on the hook's selector map being tested one way only: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reviewed, not approving (crew-pr-reviewer). This is a large (+1987/-172) layout change to the desktop top bar. It needs a maintainer's or design review with screenshots. |
Problem / Motivation
Goal: At every desktop width, the top bar collapses its own items instead of clipping them, so the connection dot always stays on screen.
On nightly and insider builds, the "Report problem" chip makes the top bar's right group wider than the widths its collapse steps were measured for. The readout capsule then spills off the left of its group: the connection dot goes first, then most of CPU/MEM/DSK. In English this happens in bands between 1638px and 970px (first screenshot). Stable builds have no chip. #16744 reports a related overlap: at 1512px with the Command Bar app on, the search input covers the capsule's CPU and memory readings.
Why it matters
The dot is the bar's only connection signal, and everyone on a prerelease build loses it at common laptop widths. The chip is the second extra, after the update pill, that needs its own measured threshold shift. Extension segments, longer locales and any future pill would each need another, plus rules for every combination of them.
Not a goal
What changed (motivation → approach → change)
When a side of the desktop top bar would still overflow, it now folds more of its own items to icons or hides them, in a fixed order, instead of cutting them off. Main's collapse rules and the centred search stay as they are.
tb-measured)useTopbarCollapse, which folds more wherever a group's contents still overflow its halfA container query sees a group's width, not whether its contents fit. So
website/src/lib/useTopbarCollapse.tsreads each group's content width before paint through a.tb-measurewrapper that has no box of its own (display:contents) except during the read, picks the lowest step that fits the group's half, and setstbl-N(identity) andtbr-N(actions) classes on the header;website/src/App.tsxwraps both groups and runs it for the desktop header. The groups stay size containers, so an item hides when either a rung inwebsite/src/index.cssor a measured step says so: the bar folds no later than main and never clips a built-in item. The measured step never sits below the last step main's rungs have folded, so both fold in one order and nothing comes back while the window narrows. Each side keeps the phone ladder's order, plus one new step that turns the feedback labels into icons before the pill goes: Back/Forward, crew names, the active crew chip; metrics numbers to the waveform icon, feedback labels to icons, credits, the feedback pill, the capsule down to the dot, and last the update pill's label, so no built-in item can push the bell out.FeedbackPill.tsxwraps both labels so they can go, names Request a Feature as an icon, and gives Report problem the same styled tip. The hook re-checks on resize, on element, text, group-class, font-family or theme changes, and on font loads. A group that still overflows at its last step (the open Windows menu, an extension widget) clips its own end; the right group clips from its far end, the bell first, so the dot goes last.Pinned crews still give way first: the chip row adds no measured width and grows into spare room through the switcher wrappers (
tb-crew-growinInstanceTabBar.tsx). The crews list's error notice gives way only by its message, keeps its warning icon and hand-off whole, and takes spare room before the pins, up to 320px. The metrics control (website/src/shell/topbar/metricsReadout.tsx) keeps the same contents at every step and only changes what a click does, or the measurement would feed on its own result. When the metrics fail to load, the control is a plain icon and anErrorNoticewith its agent hand-off follows the capsule; it folds to its two icons with the capsule. The failure holds through each refetch, which react-query runs aspending, so the notice and the step no longer blink on every poll.A maintainer asked, off this PR, that the search stay anchored at every width. Measuring brings back what 626f147 removed on purpose, here as a backstop to its container rungs; that still needs a ruling.
Backwards compatibility
Breaking: an actions group that still overflows after its last step now clips its far end (the bell first, the connection dot last), where main clipped its leading edge. Only a registered top-bar widget or capsule segment past its ~40px budget can get there; their own
@containerrules keyed off.tb-rightkeep firing on both forms. Writer sweep on origin/main @ cc7e798: no in-repo code registers a widget or segment (only the registries,website/src/extensions.tsandwebsite/src/test/extensionSeams.test.tsx); editions live outside this repo. Phones, APIs, settings and stored state are unchanged.Reader: website/docs/extension-seams.md:Width budget for both top-bar seams -- app -- updated here for the measured backstop and the clip direction, and both seams now state that a registered component must not resize with the collapse level
Tests
website/src/test/useTopbarCollapse.test.ts: each group settles on its own lowest fitting step, from 0 and from a higher stored step, and stops at its last; it measures through the group's.tb-measurewrapper and subtracts the group's padding (each fails on measuring the group itself); a group without the wrapper, or with no box, keeps every item; a step the container rungs have folded is a floor the level never drops below, and a step without a container rung never is (each fails without the floor); the hook's selector map and the stylesheet's container rungs name the same items in both directions; the wrapper's inline style is restored exactly and the group's is never written; a group gaining an element, changing its text or changing its own class re-settles (the text case fails withoutcharacterData, the class case without the class observer), and so does a font-family or theme change on<html>. The CSS steps match the hook's counts per group and keep the phone ladder's order; the wrapper isdisplay:contentsat every width; the metrics icon stand-in shows at the measured metrics step, and main's container rules show and hide it otherwise; the desktop form sets no track list of its own, so the search stays centred, and right-alignssafe; the capsule step skips the Liquid Glass layers ahead of the dot; pinned chips drop their name floor once names hide; the crews error notice gives way only by its message; the metrics failure notice folds to its icons at the capsule step and never gives way; the rules apply from the 768px breakpoint.website/src/test/App.metricsPopover.test.tsx: the metrics control renders the same elements in both bands, and only the collapsed one opens a popover. It fails on a control that swaps to a bare icon, which made the bar flip between two steps without settling. A failed fetch shows anErrorNoticewith its agent hand-off after the capsule, the same in both bands; the capsule's plain icon still hides the readings in the inline band and opens the card that reports the failure in the collapsed band. In the collapsed band the glyph shows whether the card is pinned, through a group variant that reads the trigger'saria-expanded, so the classes stay the same in both bands; the muted variant compiles!important, because a theme's own.text-accentoverride (Kiro dark) otherwise wins.website/src/test/App.shell.owners.test.ts: the pinned metrics-owner call now passes the actions group's level, so the owner re-reads its probe when that level moves.website/src/test/InstanceTabBar.test.tsx: every wrapper between the inline bar and the pinned row carriestb-crew-grow. A wrapper without it holds the row at 0px, so every pin reads as cut. The list-failure notice carriestb-crew-notice, its message carriestb-crew-notice-msg(the only part that gives way), and the full message is its tooltip.website/src/test/FeedbackPill.test.tsx: Report problem shows its own styled tip on hover and on keyboard focus, with no nativetitlebeside it; the tip repeats the button's accessible name, so it is not also its description.website/src/test/metricsReadout.popoverLevel.test.tsx: the pinned metrics popover and the hover card close when the actions ladder changes level, which can move or hide their trigger without a window resize.website/src/test/AppRootCoverage.test.tsx: the failure notice goes away when the capsule's metrics icon hides the readings.website/src/test/metricsReadout.failureHold.test.tsx: a failing fetch keeps reporting the failure while a refetch is in flight and clears once a frame lands; it fails on readingisErroralone.website/src/test/UpdatePill.test.tsx: the pill's label carries the hook the last actions step folds, and the pill stays named.website/scripts/capture-topbar-flow.mjs: pass/fail sweep of the capture harness (website/capture/topbar-search-variants.tsx, which renders the three pills as the Liquid Glass panes App.tsx ships) over 24 states (English and Chinese, crew switcher and pins, update pill, nightly chip) from 1920 to 768px in 2px steps. It passes: at every width the search is centred at its window width and nothing clips, overlaps or overflows; pins never move the actions ladder and move the identity ladder by no more than their one 4px gap.Manual verification
mcr.microsoft.com/playwright:v1.58.2-nobleimage, 4px steps).Screenshots / video
Fork PR without write access, so the evidence is committed under
temp-screenshots/topbar-flow/. The real-dashboard captures come from a local gateway running this branch.Recording: a live resize from 1920 to 768px and back, then a stand-in for the update pill mounting and unmounting while the window is still (the corner label shows the window width and each group's level).
Pinned crews, update pill and nightly chip together
Related Issues
Fixes #16744
Pattern harvest
Not generalizable: the defect is the top bar's hand-measured collapse thresholds, which desktop keeps, with a measured ladder added as their backstop.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)