Skip to content

Commit bf2b6d8

Browse files
committed
fix: fix AG-UI story layout overflow
Apply flex: 1 + minHeight: 0 directly on the Chat component via its style prop and add overflow: hidden on the outer container. Removes the intermediate wrapper div so the Chat's h-full theme class resolves against the flex parent correctly, preventing the input bar from overflowing past the bottom edge. https://claude.ai/code/session_015b5wa5VYLPgMqspBpffpSj
1 parent 3e62f23 commit bf2b6d8

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

stories/AgUi.stories.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,21 @@ export const Basic = () => {
3838
bottom: 0,
3939
padding: 20,
4040
margin: 20,
41-
borderRadius: 5
41+
borderRadius: 5,
42+
display: 'flex',
43+
flexDirection: 'column',
44+
overflow: 'hidden'
4245
}}
4346
>
44-
<div style={{ paddingBottom: 8 }}>
47+
<div style={{ paddingBottom: 8, flexShrink: 0 }}>
4548
<Input
4649
placeholder="AG-UI agent endpoint URL"
4750
value={endpoint}
4851
onChange={e => setEndpoint((e.target as HTMLInputElement).value)}
4952
/>
5053
</div>
5154
<Chat
55+
style={{ flex: 1, minHeight: 0 }}
5256
viewType="console"
5357
sessions={agui.sessions}
5458
activeSessionId={agui.activeSessionId}
@@ -120,17 +124,21 @@ export const WithToolCalls = () => {
120124
bottom: 0,
121125
padding: 20,
122126
margin: 20,
123-
borderRadius: 5
127+
borderRadius: 5,
128+
display: 'flex',
129+
flexDirection: 'column',
130+
overflow: 'hidden'
124131
}}
125132
>
126-
<div style={{ paddingBottom: 8 }}>
133+
<div style={{ paddingBottom: 8, flexShrink: 0 }}>
127134
<Input
128135
placeholder="AG-UI agent endpoint URL"
129136
value={endpoint}
130137
onChange={e => setEndpoint((e.target as HTMLInputElement).value)}
131138
/>
132139
</div>
133140
<Chat
141+
style={{ flex: 1, minHeight: 0 }}
134142
viewType="console"
135143
sessions={agui.sessions}
136144
activeSessionId={agui.activeSessionId}

0 commit comments

Comments
 (0)