@@ -221,7 +221,7 @@ const SerialPanel = ({
221221 ( ! activeTraceback || deviceSync === SyncStatus . OUT_OF_SYNC ) ;
222222 // The traceback only belongs in the header when collapsed; when expanded
223223 // it's already visible in the terminal itself.
224- const showTraceback = Boolean ( compact && activeTraceback ) ;
224+ const compactTraceback = compact ? activeTraceback : undefined ;
225225 // The status colour for a source: red for an (up-to-date) runtime error, a
226226 // darker shade when there's code to flash/run, otherwise the terminal
227227 // background. Applied per source so a healthy tab stays neutral even if the
@@ -316,7 +316,7 @@ const SerialPanel = ({
316316 boxSize = { 5 }
317317 />
318318 </ Text >
319- ) : showTraceback ? (
319+ ) : compactTraceback ? (
320320 < HStack spacing = { 1 } pr = { 1 } maxW = "20rem" overflow = "hidden" >
321321 < Icon
322322 as = { RiErrorWarningLine }
@@ -332,11 +332,11 @@ const SerialPanel = ({
332332 // Keep the line-number span the same size as the message.
333333 sx = { { span : { fontSize : "inherit" } } }
334334 >
335- < MaybeTracebackLink traceback = { activeTraceback } />
335+ < MaybeTracebackLink traceback = { compactTraceback } />
336336 </ Box >
337337 </ HStack >
338338 ) : null }
339- { ( showDeviceSync || showTraceback ) && (
339+ { ( showDeviceSync || compactTraceback ) && (
340340 < Divider
341341 orientation = "vertical"
342342 height = { 6 }
@@ -345,7 +345,7 @@ const SerialPanel = ({
345345 />
346346 ) }
347347 < CollapsibleButton
348- mode = { showTraceback ? "icon" : "button" }
348+ mode = { compactTraceback ? "icon" : "button" }
349349 variant = "unstyled"
350350 display = "flex"
351351 fontWeight = "normal"
0 commit comments