Skip to content

Commit 11e1166

Browse files
committed
move home chat to optical center
1 parent 5a51891 commit 11e1166

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/home

apps/sim/app/workspace/[workspaceId]/home/home.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,12 @@ export function Home({ chatId, userName, userId, initialResourceId = null }: Hom
309309
<div className='absolute top-[8.5px] right-[16px] z-10'>
310310
<CreditsChip />
311311
</div>
312-
<div className='flex min-h-full flex-col items-center px-6 pt-[24vh] pb-[2vh]'>
312+
{/* Asymmetric padding biases the group up so the full cluster (heading + input + suggestions) sits at the optical center */}
313+
<div className='flex min-h-full flex-col items-center justify-center px-6 pt-[2vh] pb-[22vh]'>
313314
<h1 className='mb-7 max-w-[48rem] text-balance font-season text-[30px] text-[var(--text-primary)]'>
314315
What should we get done{firstName ? `, ${firstName}` : ''}?
315316
</h1>
316-
<div ref={initialViewInputRef} className='w-full'>
317+
<div ref={initialViewInputRef} className='relative w-full max-w-[48rem]'>
317318
<UserInput
318319
ref={initialViewUserInputRef}
319320
defaultValue={initialPrompt}
@@ -325,9 +326,12 @@ export function Home({ chatId, userName, userId, initialResourceId = null }: Hom
325326
onContextAdd={handleContextAdd}
326327
onContextRemove={handleInitialContextRemove}
327328
/>
328-
<SuggestedActions
329-
onSelectPrompt={(prompt) => initialViewUserInputRef.current?.populatePrompt(prompt)}
330-
/>
329+
{/* Anchored out of flow so expanding/collapsing never shifts the centered input */}
330+
<div className='absolute inset-x-0 top-full'>
331+
<SuggestedActions
332+
onSelectPrompt={(prompt) => initialViewUserInputRef.current?.populatePrompt(prompt)}
333+
/>
334+
</div>
331335
</div>
332336
</div>
333337
</div>

0 commit comments

Comments
 (0)