Repository navigation
A long namespace truncates in the header and leaves the search its width - #155
Merged
Merged
Conversation
The namespace picker's wrapper never shrank at desktop width, so a long name pushed the search box down to a sliver. The picker is now capped at min(320px, 28vw), the search keeps a 240px floor, and the full name is in the trigger's title. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
A cut namespace shows whole in the dashboard tooltip on hover and focus, not a native title. The picker keeps a 96px floor and the search 72px (160px from lg), so neither collapses between md and lg; the e2e test checks 768, 1024 and 1400 px. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…on focus and for a name that fits Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…ot read twice Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…ocus only Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
…e test covers a code index Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Lareb Zafar <[email protected]>
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.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
A long namespace name no longer squeezes the dashboard's header search: the name truncates, and a tooltip shows it whole.
Why
At desktop width the namespace picker's wrapper was
md:shrink-0 md:max-w-none, so the trigger'struncatenever applied. An 80-character name rendered in full and left the search field about 110 px wide, its results popover cut to the same width.The picker is now capped at
min(320px, 24vw)and shrinks first. Each side keeps a floor so neither collapses between themdandlgbreakpoints, where the sidebar leaves 170 to 290 px for both: the picker 96 px, the search 72 px, and 160 px fromlg(where the account name joins the right cluster). Widths with an 80-character name and the sidebar open:A cut name shows whole in the dashboard's
Tipon hover and keyboard focus of the trigger (shut while the picker is open), measured withuseClampedasAgentBadgedoes. The static label shown with auth disabled does the same.End truncation rather than middle truncation: CSS does it with no script, and the tooltip shows the whole name.
The picker's 96 px floor is a fixed
min-width, so a name shorter than about four characters leaves up to 8 px before the separator (dev: an 88 px button in a 96 px slot;benchfills it). A floor that applies only when the name is cut needscalc-size()or a measured width; neither is worth 8 px.Scope and risk
Header layout, the namespace picker trigger, and the static namespace label shown with auth disabled. The phone layout is unchanged (the wrapper keeps
max-w-[60%]belowmd). Nothing server-side.Compatibility, rollout and rollback
Tests
frontend/e2e/namespace-picker.spec.ts, with an 80-character namespace at 1400, 1024 and 768 px, and a code-index namespace at 768 px: the name is truncated and still shows some of itself, the trigger is at least 96 px, the search meets its floor, and the page does not scroll sideways. Keyboard focus and hover each show the whole name in a tooltip that is not tied to the button as a description; opening the panel shuts it and sets the button'sdata-state="open". A second test: a name that fits gets no tooltip on focus. The long-name test fails onmain.frontend/src/components/NamespacePicker.static.test.tsx: with auth disabled, a cut name takes a tab stop and shows whole in a tooltip; a name that fits stays plain text.E2E_PORT=<port> npx playwright test e2e/namespace-picker.spec.ts --project=desktop: 13 passed.a11y,overlap,keyboardandfocus-ringsspecs: 179 passed.npm run buildandnpm run budget: pass.src/layoutandsrc/components: the Header and NamespacePicker tests pass. The local run has 5 time-zone failures inListTime,ListPagerandMemoryCardthatmainhas too on the same machine.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. I checked the layout in a browser and measured the header at 768, 900, 1024 and 1280 px.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
npm --prefix frontend run build) and its tests pass, iffrontend/changed.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code