@@ -184,6 +184,8 @@ export default function () {
184184 </ div >
185185 )
186186
187+ const wide = createMemo ( ( ) => diffs ( ) . length === 0 )
188+
187189 return (
188190 < div class = "relative bg-background-stronger w-screen h-screen overflow-hidden flex flex-col" >
189191 < header class = "h-12 px-6 py-2 flex items-center justify-between self-stretch bg-background-base border-b border-border-weak-base" >
@@ -214,48 +216,39 @@ export default function () {
214216 < div
215217 classList = { {
216218 "@container relative shrink-0 pt-14 flex flex-col gap-10 min-h-0 w-full mx-auto" : true ,
217- "px-21 @4xl:px-6 max-w-2xl" : diffs ( ) . length > 0 ,
218- "px-6 max-w-2xl" : diffs ( ) . length === 0 ,
219+ "px-21 @4xl:px-6 max-w-2xl" : ! wide ( ) ,
220+ "px-6 max-w-2xl" : wide ( ) ,
219221 } }
220222 >
221223 { title ( ) }
222224 < div class = "flex items-start justify-start h-full min-h-0" >
223225 < Show when = { messages ( ) . length > 1 } >
224226 < >
225- < div
226- classList = { {
227- "xl:hidden" : true ,
228- "absolute right-[90%]" : diffs ( ) . length > 0 ,
229- "absolute right-full" : diffs ( ) . length === 0 ,
230- } }
231- >
227+ < div class = "xl:hidden absolute right-full" >
232228 < MessageNav
233- classList = { {
234- "mt-0.5 mr-8" : diffs ( ) . length === 0 ,
235- "mt-2.5 mr-3" : diffs ( ) . length > 0 ,
236- } }
229+ class = "mt-2 mr-3"
237230 messages = { messages ( ) }
238231 current = { activeMessage ( ) }
239232 onMessageSelect = { setActiveMessage }
240- size = { ! diffs ( ) . length ? "normal" : " compact"}
233+ size = " compact"
241234 />
242235 </ div >
243236 < div
244237 classList = { {
245238 "hidden xl:block" : true ,
246- "absolute right-[90%]" : diffs ( ) . length > 0 ,
247- "absolute right-full" : diffs ( ) . length === 0 ,
239+ "absolute right-[90%]" : ! wide ( ) ,
240+ "absolute right-full" : wide ( ) ,
248241 } }
249242 >
250243 < MessageNav
251244 classList = { {
252- "mt-0 .5 mr-8 " : diffs ( ) . length === 0 ,
253- "mt-2 .5 mr-3 " : diffs ( ) . length > 0 ,
245+ "mt-2 .5 mr-3 " : ! wide ( ) ,
246+ "mt-0 .5 mr-8 " : wide ( ) ,
254247 } }
255248 messages = { messages ( ) }
256249 current = { activeMessage ( ) }
257250 onMessageSelect = { setActiveMessage }
258- size = { ! diffs ( ) . length ? "normal" : "compact" }
251+ size = { wide ( ) ? "normal" : "compact" }
259252 />
260253 </ div >
261254 </ >
@@ -271,14 +264,14 @@ export default function () {
271264 </ SessionTurn >
272265 </ div >
273266 </ div >
274- < Show when = { diffs ( ) . length } >
267+ < Show when = { diffs ( ) . length > 0 } >
275268 < div class = "relative grow px-6 pt-14 flex-1 min-h-0 border-l border-border-weak-base" >
276269 < SessionReview diffs = { diffs ( ) } class = "pb-20" />
277270 </ div >
278271 </ Show >
279272 </ div >
280273 < Switch >
281- < Match when = { diffs ( ) . length } >
274+ < Match when = { diffs ( ) . length > 0 } >
282275 < Tabs class = "md:hidden" >
283276 < Tabs . List >
284277 < Tabs . Trigger value = "session" class = "w-1/2" classes = { { button : "w-full" } } >
0 commit comments