fix(tabs): wrap the pill nav instead of spilling off-screen past 8 Sparks - #82
Open
de1tydev wants to merge 1 commit into
Open
fix(tabs): wrap the pill nav instead of spilling off-screen past 8 Sparks#82de1tydev wants to merge 1 commit into
de1tydev wants to merge 1 commit into
Conversation
…arks With more than ~7 units the tab pills (all shrink-0 / nowrap) ran past the nav's rounded container and, from 9 units on, past the right edge of the page itself: at 1440x900 with 10 Sparks the document scrolled 299px wide and the last two tabs plus the + button were unreachable. - .pill-nav wraps onto further rows, so every tab stays inside the nav. - flex-basis 0 keeps the header itself on one line (previously the nav and the settings/theme controls each wrapped onto their own header row). - border-radius 23px == the old fully-rounded look at the 45.5px one-row height, and stays sane once the nav is 2+ rows. - rectSortingStrategy replaces horizontalListSortingStrategy so drag-reorder animates correctly across rows. Verified with 2/8/10/16 units at 1920/1440/1280/1024/800px: no overflow, and with <=7 units the layout geometry is byte-identical to before. Claude-Session: https://claude.ai/code/session_01K8Uebe5LQVjrAMkWXacCXd
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
The tab bar spills outside its rounded container — and then off the right edge of the page — once a deployment has more than ~7 Sparks registered.
.pill-navis a flex container that keeps its defaultnowrap, every child (OverviewTab/TabChrome/ the add button) isshrink-0withwhite-space: nowrap, and the container sets nooverflowbehaviour. So when the tabs no longer fit there is nothing to give: they are simply painted outside the nav and outside the viewport..dashboard-shellcaps the page atmax-width: 1440px, so a wider monitor does not help.flex: 1 1 automakes it worse: the nav's hypothetical main size is its full content width, so the header's ownflex-wrappushes the nav onto a second line and the settings/theme controls onto a third — and the nav still overflows after taking a whole row.Measured on
main(e03b9d6) at 1440x900 with 10 units:The last two tabs and the
+button are off-screen and unclickable.Threshold sweep at 1440x900 (real-length unit names):
The new
hideWorkerssetting reduces the tab count, but it does not fix this: a deployment with 8+ non-worker Sparks (or with the setting off) still overflows.Fix
Three declarations on
.pill-navplus one dnd-kit strategy swap:flex-wrap: wrapflex: 1 1 auto→1 1 0border-radius: 50px→23pxhorizontalListSortingStrategy→rectSortingStrategyI deliberately did not use horizontal scrolling: seeing every machine at a glance is the point of this bar, and a scroller hides units behind an edge.
Verification
tsc --noEmitclean;npm test190 passed / 0 failed.+button inside the nav. 10 units wrap to 2 rows at 1440, 16 units to 3.left/top/width, and the header height are value-for-value identical to before at 1024 / 1280 / 1440 / 1920. Only the computedborder-radiusstring changes (50px → 23px), which renders the same.POST /api/sparks/reorder.< 768pxuses the hamburger branch and never renders.pill-nav— unaffected (checked at 600px).https://claude.ai/code/session_01K8Uebe5LQVjrAMkWXacCXd