fix(ui): lay out the task form by container width, not viewport - #6355
Merged
Conversation
The Quick Task dashboard widget squeezed its description textarea down to one character per line. TaskAddForm's compact row keyed its layout off viewport breakpoints, but a dashboard tile is ~250px wide on a 2560px screen — so every `sm:` was unconditionally true and pinned the wide side-by-side row into the narrowest column. The expanded options and the reviewer table (a ~32rem grid) overflowed the tile the same way. Both components now declare `@container` on their own root and key their layout off container queries. The container lives on the component rather than the grid cell because ReviewerPicker also renders in drawers, the settings page and the schedule panel, none of which provide a container ancestor — a cell-level one would leave those stuck in the stacked form. Also guards the flex/grid items that hold selects with `min-w-0` so they shrink instead of overflowing, and wraps the rows whose contents can't. The hover-vs-touch `md:` affordances stay viewport-based; they really are about the device. Records the convention in the dashboard AGENTS.md so the next page component reused as a widget doesn't reintroduce it.
@md (448px) sat well below the viewport `sm:` (640px) it replaced, so a phone would have gone horizontal where it used to stack — leaving the textarea ~200px. @XL (576px) is roughly that old threshold once page padding is subtracted, and it's where the textarea, the 10rem app picker and the Add button each still get usable width. Same reasoning moves the provider/model/effort row to @lg: two 10rem selects plus a flexible model select don't fit in 448px.
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
The Quick Task dashboard widget squeezed its description textarea down to one character per line.
TaskAddFormkeyed its layout off viewport breakpoints, but a dashboard tile is ~250px wide on a 2560px screen — so everysm:was unconditionally true and pinned the wide side-by-side row into the narrowest column. The expanded options overflowed the tile the same way, as didReviewerPicker's ~32rem reviewer table.Both components now declare
@containeron their own root and key their layout off container queries. The container lives on the component rather than the dashboard grid cell becauseReviewerPickeralso renders inSlashDoRunDrawer, the schedule panel and the Code Reviewers settings tab — none of which provide a container ancestor, so a cell-level container would leave those permanently stuck in the stacked form.Thresholds are set from each layout's actual content minimum rather than copied across from the viewport values: the compact row goes horizontal at
@xl(576px ≈ the old 640px viewport once page padding is subtracted, so phones keep the stacked form), the provider/model/effort row at@lg, and the reviewer table at@xlagainst its ~32rem grid.Also guards the flex/grid items holding
<select>s withmin-w-0so they shrink instead of overflowing, and wraps the rows whose contents can't. The two hover-vs-touchmd:affordances stay viewport-based — those really are about the device, not the box.client/src/components/dashboard/AGENTS.mdrecords the convention, so the next page component reused as a widget doesn't reintroduce it.Test plan
clientsuite: 620 tests / 48 files pass acrosscomponents/cos,QuickTaskWidget, andresponsiveGridConventions.test.js; the full suite is 866/868 files, with the 2 failures (a11yConventions,FableLoomStory.browser) reproducing identically on a cleanorigin/mainworktree.vite buildsucceeds; verified indist/assets/index-*.cssthatcontainer-type:inline-sizeand the@container (width>=24/32/36rem)tiers are emitted, and that Tailwind's scanner still extracts the 7-track grid template now that it lives in aWIDE_TRACKSconstant.TaskConfigDrawer,size="md") leaves the picker 600px, above its 576px threshold.