fix(dashboard): stop the navbar overflowing the page at narrow widths - #1107
Merged
Conversation
Below a narrow viewport the top nav pushed the document wider than the screen, so the whole page scrolled sideways and slid the app off-screen. The nav's two fixed clusters were both shrink-0: brand mark + "The Framework" wordmark on one side, "New session" + the icon buttons on the other. Together with the project picker they could not fit a phone-width viewport, and nothing was allowed to give. Below sm the nav folds to what fits: the mark stays (still the link home) but the wordmark drops, "New session" collapses to its + icon (still aria-labelled), and the picker caps narrower and truncates. At sm and up it is unchanged. Verified in a real browser at 375/420px (no page scroll) and 1200px (labels back); jsdom has no layout engine so it cannot see this. Closes #980
suleimansh
marked this pull request as ready for review
July 24, 2026 11:20
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.
Closes #980.
At a narrow viewport the top nav pushed the whole document wider than the screen, so the page scrolled sideways and slid the app off-screen. Same failure shape as #904, and jsdom can't see it (no layout engine), so I reproduced and verified in a real browser.
Root cause
The nav has two
shrink-0clusters — brand mark + "The Framework" wordmark on the left, "New session" + the icon buttons on the right — plus the project picker. Measured at 420px: brand 147px + picker ~122px + right cluster 217px, all fixed, so the<header>laid out at 538px and forced page scroll. The header'sscrollWidthexactly equalled the document's, confirming it was the sole cause; the wide page content below sits inside the workspace row'soverflow-hiddenand is clipped (which is why #980 noted the content itself is fine).Fix
Below
smthe nav folds to what fits, the standard responsive-nav move:+icon, stillaria-labelled so it stays named for a screen reader.max-w-40vsmax-w-56) and truncates a long name, so a long project can't blow the nav out either.At
smand up everything is exactly as before.Verified in a real browser (zero quota)
Drove the built dashboard against a local daemon at several widths, reading
document.documentElement.scrollWidthvsclientWidth:Screenshots (420 / 1200) confirmed the
+-only button renders cleanly and the full labels return at desktop width.Tests
BrandLinkthat the wordmark keeps its responsivehidden sm:inlineclasses, so a future tidy-up can't silently bring the overflow back. jsdom can't assert the actual hide (no CSS/layout), so the browser drive above is the real proof.