@@ -43,12 +43,15 @@ function Card({
4343 inline,
4444 fixture,
4545 rows = 1 ,
46+ automationRows = 0 ,
4647} : {
4748 threadRef : ScopedThreadRef ;
4849 inline : boolean ;
4950 fixture : ReturnType < typeof setup > ;
5051 /** Rows of 100px shown at full density. Compact always takes 50px. */
5152 rows ?: number ;
53+ /** Rows of 100px in an automations list shown at full density. */
54+ automationRows ?: number ;
5255} ) {
5356 return (
5457 // The web root renders in StrictMode, which re-runs ref callbacks on every mount.
@@ -73,9 +76,14 @@ function Card({
7376 contentKey = { String ( rows ) }
7477 >
7578 { ( density ) => (
76- < p style = { { height : density === "full" ? rows * 100 : 50 } } >
77- Details for { threadRef . threadId }
78- </ p >
79+ < >
80+ < p style = { { height : density === "full" ? rows * 100 : 50 } } >
81+ Details for { threadRef . threadId }
82+ </ p >
83+ { density === "full" && automationRows > 0 ? (
84+ < section data-thread-automations-panel style = { { height : automationRows * 100 } } />
85+ ) : null }
86+ </ >
7987 ) }
8088 </ ThreadDetailsCard >
8189 </ ChatCanvasContext >
@@ -158,3 +166,14 @@ it("returns to full density when hidden items make the content fit", async () =>
158166 await screen . rerender ( < Card threadRef = { threadB } inline fixture = { fixture } rows = { 2 } /> ) ;
159167 await expect . element ( card ) . toHaveAttribute ( "data-density" , "full" ) ;
160168} ) ;
169+
170+ it ( "keeps full density when many automations make the content tall" , async ( ) => {
171+ using fixture = setup ( ) ;
172+ await using _screen = await render (
173+ < Card threadRef = { threadB } inline fixture = { fixture } rows = { 2 } automationRows = { 6 } /> ,
174+ ) ;
175+ await expect . element ( page . getByText ( "Details for thread-b" ) ) . toBeVisible ( ) ;
176+ await expect
177+ . element ( page . getByRole ( "region" , { name : "Thread details" } ) )
178+ . toHaveAttribute ( "data-density" , "full" ) ;
179+ } ) ;
0 commit comments