Repository navigation
fix(content): keep a long title or pick inside the New content dialog - #1318
Conversation
The dialog is a CSS grid, and its one column sized to its widest content: a long opportunity title picked in Create from scratch (the trigger's value is a bare text node, so `truncate` couldn't cut it) or a long title in Start widened the column past the dialog, pushing the cards, page type chips and Continue / Open editor outside it. The column is now minmax(0, 1fr), and the pick sits in its own truncating span beside the chevron. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk A small production fix, reported in the app: with a long opportunity title, the New content dialog overflowed its edge, in the picker and again in Start. It's one file, web only; the cause and the checks are in the description. It touches |
… it wider Start can be taller than a laptop window: at 650 px the dialog's title and Back / Open editor fell outside it, out of reach. The dialog now caps its height at the window's (less 2rem) and scrolls, with its footer kept in view (sticky). It is also wider, 672 px instead of 576 px, so the page type chips and the options wrap less. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@gkhngyk One more commit after testing every step (db010a4). Start was taller than a laptop-height window (650 px), with its title and Back / Open editor out of reach. The dialog now caps at the window's height and scrolls, with its footer sticky. At the user's request it's also wider: 672 px instead of 576 px. The description lists the flows and sizes checked. |
gkhngyk
left a comment
There was a problem hiding this comment.
Looks good. With the grid column at minmax(0,1fr), a long pick or title truncates instead of widening the dialog. The dialog now fits the window, and the sticky footers keep the buttons in reach.
Tested on top of main together with #1316 (the two merge cleanly): web 2,482 tests, tsc, lint and Prettier pass.
schema.sql is rebuilt with build-schema.sh after 00224, 00228 and ansvisor#1318. Claude-Session: https://claude.ai/code/session_0121amRjX7UFrgmGELAtkc7A
Summary
Found on production: Library → + New content → Create from scratch, then picking an opportunity with a long title (e.g. "Defend the coffee subscription comparison with up-to-date pricing and shipping details").
DialogContentis a CSS grid with one auto-sized column, and that column takes the width of its widest content.truncatecouldn't cut it.truncatetoo, but its single line still set the column's minimum width.new-content-dialog.tsxonly):grid-cols-[minmax(0,1fr)], so content can't widen it and long text truncates;min-w-0 flex-1 truncatespan beside the chevron;max-h-[calc(100dvh-2rem)]) and scrolls, with its footer sticky so the buttons stay in view;sm:max-w-2xl) instead of 576 px, so the page type chips and the options wrap less.Related issue
None. Reported in the app.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Checked with the longest titles and own pages with very long paths, in light and dark. The flows: Library (opportunity, prompt, topic → Continue) and the Plan's Optimize, Create and View. The sizes: 1366×650, 1280×800 and 1024×768. In every step, nothing went past the dialog's edges and the dialog stayed inside the window (measured in the page).
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/): no errors; the 6 warnings are in files this PR does not touchyarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Also run:
yarn test(2,424 tests, including a new one for the column and the truncating pick) andyarn build. Web only, no migration, no new dependency.🤖 Generated with Claude Code