Skip to content

fix(ship): widen Create release dialog (was clamping to 384px) - #218

Open
prellr wants to merge 1 commit into
mainfrom
fix/create-release-dialog-width
Open

prellr wants to merge 1 commit into
mainfrom
fix/create-release-dialog-width

Conversation

@prellr

@prellr prellr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

The bug

The Create release modal rendered its form out of the dialog's bounds — the inputs and PR rows spilled off the right side, over the faint backdrop (looked transparent on the right).

Root cause: the dialog sets className="max-w-2xl", but the base DialogContent hard-codes sm:max-w-sm (384px). max-w-2xl is a base utility and sm:max-w-sm is a responsive one, so tailwind-merge keeps both — and on desktop the sm: rule wins. The box clamped to 384px while the form is built for 672px, so the content overflowed.

Proven with the project's own tailwind-merge:

cn(base, "max-w-2xl")    -> "max-w-sm max-w-2xl"        # sm:max-w-sm wins ≥640px → 384px (bug)
cn(base, "sm:max-w-2xl") -> "max-w-[calc(100%-2rem)] max-w-2xl"  # 672px at sm+ (fixed)

The fix

One line: max-w-2xl → sm:max-w-2xl, matching how every other wide dialog in the codebase already does it (sm:max-w-xl, sm:max-w-lg, sm:max-w-2xl, …).

Test plan

  • views typecheck + eslint clean; create-release-dialog.test.tsx (6) pass.
  • Browser: the modal is 672px-wide on desktop, content fully contained, no right-side overflow.

Same latent pattern elsewhere (not in this PR)

issues/.../label-picker.tsx also uses bare max-w-2xl (same 384px clamp — though its short content mostly fits), and skill-add-dialog.tsx / ship-concierge-setup-dialog.tsx use bare max-w-md (clamp 448→384, minor). Worth a sweep to sm:-prefix them, but they're not visibly broken like this one.

🤖 Generated with Claude Code

The dialog passed `className="max-w-2xl"`, but the base DialogContent hard-codes
`sm:max-w-sm`. Because `max-w-2xl` is a base utility and `sm:max-w-sm` is a
responsive one, tailwind-merge keeps BOTH — and on desktop the `sm:` rule wins,
so the box clamped to 384px while the form (title/description/PR rows) is laid
out for 672px. The content overflowed to the right past the faint bg-black/10
backdrop — "out of bounds, transparent on the right."

Fix: use `sm:max-w-2xl` so it overrides the base `sm:max-w-sm`, matching how
every other wide dialog in the codebase sets its width. Proven via tailwind-merge:
  cn(base, "max-w-2xl")    -> max-w-sm max-w-2xl   (sm:max-w-sm wins on desktop)
  cn(base, "sm:max-w-2xl") -> calc(100%-2rem) 2xl  (correct: 672px at sm+)

views typecheck + eslint clean; create-release-dialog tests (6) pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant