@@ -89,6 +89,10 @@ export const Build: React.FC<Props> = React.memo((props) => {
89
89
margin : "0" ,
90
90
} as const ;
91
91
92
+ function renderErrorHeader ( errorIsInformational : boolean ) : string {
93
+ return errorIsInformational ? "Output messages" : "Error output" ;
94
+ }
95
+
92
96
function render_tab_item (
93
97
title : string ,
94
98
stdout : string ,
@@ -175,13 +179,15 @@ export const Build: React.FC<Props> = React.memo((props) => {
175
179
fontSize : `${ font_size * 0.9 } px` ,
176
180
} }
177
181
>
178
- { stderrIsInformational ? "Output messages" : "Error output" }
182
+ { renderErrorHeader ( stderrIsInformational ) }
179
183
</ div >
180
184
< div
181
185
style = { {
182
186
flex : 1 ,
183
187
overflowY : "auto" ,
184
- background : error ? COLORS . ANTD_BG_RED_L : COLORS . GRAY_LLL ,
188
+ background : stderrIsInformational
189
+ ? COLORS . GRAY_LLL
190
+ : COLORS . ANTD_BG_RED_L ,
185
191
padding : "5px" ,
186
192
borderRadius : "3px" ,
187
193
} }
@@ -296,6 +302,7 @@ export const Build: React.FC<Props> = React.memo((props) => {
296
302
let isLongRunning = false ;
297
303
let stdoutTail = "" ;
298
304
let stderrTail = "" ;
305
+ let errorIsInformational = false ;
299
306
300
307
build_logs . forEach ( ( infoI , key ) => {
301
308
const info : ExecuteCodeOutput = infoI ?. toJS ( ) ;
@@ -304,13 +311,16 @@ export const Build: React.FC<Props> = React.memo((props) => {
304
311
const start = info . start ;
305
312
stdoutTail = tail ( info . stdout ?? "" , 100 ) ;
306
313
stderrTail = tail ( info . stderr ?? "" , 100 ) ;
307
- // Update state for auto-scrolling effect - combine for backward compatibility
314
+ // Update state for auto-scrolling effect
308
315
const combinedLog =
309
316
stdoutTail +
310
- ( stderrTail ? "\n--- Error Output ---\n" + stderrTail : "" ) ;
317
+ ( stderrTail
318
+ ? `\n--- ${ renderErrorHeader ( ! info . exit_code ) } ---\n` + stderrTail
319
+ : "" ) ;
311
320
if ( combinedLog !== shownLog ) {
312
321
setShownLog ( combinedLog ) ;
313
322
}
323
+ errorIsInformational = ! info . exit_code ;
314
324
isLongRunning ||=
315
325
typeof start === "number" &&
316
326
webapp_client . server_time ( ) - start > WARN_LONG_RUNNING_S * 1000 ;
@@ -451,7 +461,7 @@ export const Build: React.FC<Props> = React.memo((props) => {
451
461
flexShrink : 0 ,
452
462
} }
453
463
>
454
- Error output (stderr)
464
+ { renderErrorHeader ( errorIsInformational ) } (stderr)
455
465
</ div >
456
466
< div
457
467
ref = { stderrContainerRef }
0 commit comments