Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(site/src/pages/UserSettingsPage/SecretsPage): prevent Add secret dialog overflow - #27649

Merged
dylanhuff-at-coder merged 1 commit into
mainfrom
dylan/fix-secret-dialog-divider-overflow
Jul 30, 2026
Merged

fix(site/src/pages/UserSettingsPage/SecretsPage): prevent Add secret dialog overflow#27649
dylanhuff-at-coder merged 1 commit into
mainfrom
dylan/fix-secret-dialog-divider-overflow

Conversation

@dylanhuff-at-coder

@dylanhuff-at-coder dylanhuff-at-coder commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

closes PLAT-408
Fixes a horizontal overflow in the Add secret dialog introduced by #26725. The "or add individually" divider renders two Separator components in a flex items-center row. Separator is styled w-full shrink-0, so each separator took the full dialog width and refused to shrink, making the row roughly twice the dialog width and forcing a horizontal scrollbar.

Adding flex-1 to both separators sets flex-basis: 0%, which overrides w-full for main-axis sizing, so the two separators split the space around the label instead of overflowing.

Verified with a local dev instance and a headless browser: the dialog renders at its normal width with no horizontal scroll (document.body.scrollWidth no longer exceeds the viewport).

Decision log
  • Root cause confirmed by reading site/src/components/Separator/Separator.tsx: the base class list is bg-border shrink-0 ... data-[orientation=horizontal]:w-full ..., so two horizontal separators in one flex row each demand 100% of the container width.
  • Chose flex-1 on the call site over changing the shared Separator component, since the component matches the upstream shadcn/ui implementation and other usages rely on the full-width default.
  • flex-1 works regardless of the shrink-0 base class because it sets flex-basis: 0%; the separators grow equally from zero, so shrink behavior is irrelevant.

Generated by Coder Agents on behalf of @dylanhuff-at-coder.

…dialog overflow

The 'or add individually' divider used two full-width Separators in a
flex row. Separator is styled w-full shrink-0, so each one took the
full dialog width and the row overflowed horizontally. Give each
separator flex-1 so they split the space around the label instead.
@dylanhuff-at-coder
dylanhuff-at-coder marked this pull request as ready for review July 30, 2026 17:21
@dylanhuff-at-coder
dylanhuff-at-coder merged commit e30a7bc into main Jul 30, 2026
51 of 54 checks passed
@dylanhuff-at-coder
dylanhuff-at-coder deleted the dylan/fix-secret-dialog-divider-overflow branch July 30, 2026 22:14
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants