Fix mobile credential row overflow#513
Merged
Merged
Conversation
Merged
4 tasks
DorianZheng
added a commit
that referenced
this pull request
May 14, 2026
…ay inside on mobile (#518) PR #513 added CopyableValue (`min-w-0 flex-1 overflow-x-auto` on the value span) so long SSH commands and API keys would scroll inside the row instead of pushing siblings. The fix works in isolation but the row itself still escapes its dialog on narrow viewports — reproducer is the Sandboxes "Create SSH Access" dialog, where the ssh command renders past the right edge of AlertDialogContent. Root cause: `AlertDialogContent` uses `display: grid` with no explicit `grid-template-columns`, so it gets a single implicit auto column whose items default to `min-width: auto` (= min-content). With `whitespace-nowrap` on the CopyableValue value span, that min-content is the full unbreakable SSH command, so the grid item grows past `max-w-[calc(100%-2rem)]` and visually clips at the viewport. `DialogContent` has the same shape with `flex flex-col` items (which also default to `min-width: auto` on the cross axis). Fix: - AlertDialogContent: add `grid-cols-[minmax(0,1fr)]` so the single column is `minmax(0,1fr)` instead of implicit auto. Items can now shrink below content width, and CopyableValue's internal `overflow-x-auto` engages. - DialogContent: add `[&>*]:min-w-0` so every direct flex-col child gets `min-width: 0`. Same effect: children can shrink, content scrolls inside the row. Fixes every existing CopyableValue + future long-content cases in one place instead of patching every call site.
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.
Summary
CopyableValuecomponent for dashboard credential/token rows.Root Cause
Long unbroken SSH commands/API keys were rendered inside flex rows without a
min-w-0/flex-1contract on the value child. On narrow screens, the value kept its min-content width and pushed or shrank neighboring action controls instead of scrolling inside the row.Validation
git diff --cached --checkpassed before commit.make fmt:checkpassed but skipped dashboard changes.make lintpassed but skipped dashboard changes.npm install --package-lock=false --ignore-scripts --legacy-peer-depsafter the initial build found missing Nx modules.npm exec -- nx run dashboard:buildstill fails in existing Vite/tsconfig resolution before transforming dashboard modules:failed to resolve "extends":"../../tsconfig.base.json" in apps/dashboard/tsconfig.json.