Skip to content

Commit 1b38e5f

Browse files
committed
fix(web): truncate project names only when needed
The draft heading cut project names off at a fixed width, even when there was enough room to show the whole name. Names now get a whole line before they truncate, and the ? stays with it.
1 parent c77a7b7 commit 1b38e5f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎apps/web/src/components/chat/DraftHeroHeadline.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ export function DraftHeroHeadline({
304304
<ComboboxTrigger
305305
render={<InlineButton tone="picker" />}
306306
data-draft-project-trigger=""
307-
className="pointer-events-auto max-w-64 align-baseline"
307+
// Leaves room for the trailing "?" so a truncated name keeps it on its line.
308+
className="pointer-events-auto max-w-[calc(100%-1em)] align-baseline"
308309
/>
309310
}
310311
>
@@ -411,7 +412,9 @@ export function DraftHeroHeadline({
411412
{isScratchDraft ? (
412413
<>What should we work on?</>
413414
) : hasResolvedProject ? (
414-
<>What should we build in {projectSelector}?</>
415+
<>
416+
What should we build in <span className="whitespace-nowrap">{projectSelector}?</span>
417+
</>
415418
) : canChooseProject ? (
416419
<>{projectSelector} to start</>
417420
) : (

0 commit comments

Comments
 (0)