Skip to content

Commit 73c4eb9

Browse files
committed
layout fixes to embedded mode
1 parent be53ccb commit 73c4eb9

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ export const ChatV2 = () => {
289289
const showRagSelector = (ragIndices?.length ?? 0) > 0
290290
const rightMenuOpen = !!activeToolResult
291291
const rightMenuWidth = rightMenuOpen ? '300px' : '0px'
292+
const leftMenuWidth = !isEmbeddedMode ? { md: '300px', lg: '400px' } : { md: '0px', lg: '0px' }
292293

293294
// Handle layout shift when right menu opens (tool result becomes visible)
294295
const prevScrollYProportional = useRef(0)
@@ -415,10 +416,8 @@ export const ChatV2 = () => {
415416
position: 'relative',
416417
flexDirection: 'column',
417418
overflowY: 'visible',
418-
// Padding for navbar
419-
marginTop: !isEmbeddedMode ? '4rem' : '0',
420419
// Padding for left menu
421-
marginLeft: { md: '300px', lg: '400px' },
420+
marginLeft: leftMenuWidth,
422421
}}
423422
>
424423
<Box
@@ -431,8 +430,8 @@ export const ChatV2 = () => {
431430
paddingTop: '1rem',
432431
width: {
433432
sm: '100vw',
434-
md: `calc(100vw - 300px - ${rightMenuWidth})`,
435-
lg: `calc(100vw - 400px - ${rightMenuWidth})`,
433+
md: `calc(100vw - ${leftMenuWidth.md} - ${rightMenuWidth})`,
434+
lg: `calc(100vw - ${leftMenuWidth.lg} - ${rightMenuWidth})`,
436435
},
437436
}}
438437
ref={scrollRef}

0 commit comments

Comments
 (0)