@@ -143,8 +143,7 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
143
143
try { if ( li >= 0 ) sess . setLeftIdx ( li ) ; } catch { }
144
144
}
145
145
} catch ( e ) {
146
- console . warn ( '[FDV] loadLeft(URL) error:' , e ) ;
147
- // ignore errors here; show via UI if needed later
146
+ console . warn ( "[FDV] loadLeft(URL) error:" , e ) ;
148
147
}
149
148
}
150
149
if ( leftLoadedUrlLocal ) {
@@ -186,10 +185,10 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
186
185
if ( sessLeftLen === 0 && kernelsLeft . length > 0 ) {
187
186
if ( leftLoadedUrl ) {
188
187
sess . setLeftFromUrl ( leftLoadedUrl , kernelsLeft ) ;
189
-
188
+
190
189
} else {
191
190
sess . setLeftFromLocal ( kernelsLeft ) ;
192
-
191
+
193
192
}
194
193
sess . setLeftIdx ( Math . max ( 0 , leftIdx ) ) ;
195
194
}
@@ -423,7 +422,6 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
423
422
setLeftLoadedFromLocal ( true ) ;
424
423
setLeftLoadedUrlLocal ( null ) ;
425
424
sess . setLeftFromLocal ( processed ) ;
426
- console . debug ( '[FDV] loadLeft(Local): kernels=' , processed . length ) ;
427
425
// select first by default
428
426
setLeftIdx ( 0 ) ;
429
427
try { sess . setLeftIdx ( 0 ) ; } catch { }
@@ -439,14 +437,14 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
439
437
} ;
440
438
441
439
return (
442
- < div className = "p-6 " >
443
- < h1 className = "text-2xl font-bold text-gray-800 mb-3 " > File Diff</ h1 >
440
+ < div className = "p-4 " >
441
+ < h1 className = "text-xl font-semibold text-gray-800 mb-2 " > File Diff</ h1 >
444
442
445
- < div className = "bg-white rounded-lg p-3 mb-3 shadow border border-gray-200" >
446
- < div className = "grid grid-cols-1 md:grid-cols-2 gap-3 " >
443
+ < div className = "bg-white rounded-lg p-3 mb-3 border border-gray-200" >
444
+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-2 " >
447
445
< div >
448
446
< div className = "text-sm text-gray-500 mb-1" > Left Source (json_url)</ div >
449
- < div className = "flex items-center gap-2 mb-2 " >
447
+ < div className = "flex items-center gap-2 mb-1 " >
450
448
< input
451
449
type = "url"
452
450
placeholder = "https://.../trace.ndjson.gz"
@@ -461,7 +459,7 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
461
459
Load
462
460
</ button >
463
461
</ div >
464
- < div className = "flex items-center gap-2 mb-2 " >
462
+ < div className = "flex items-center gap-2 mb-1 " >
465
463
< input
466
464
type = "file"
467
465
accept = ".ndjson,.ndjson.gz,.gz,.jsonl"
@@ -481,22 +479,22 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
481
479
< button
482
480
className = "px-2 py-1 text-sm bg-gray-100 hover:bg-gray-200 rounded border"
483
481
disabled = { leftArrayResolved . length === 0 }
484
- onClick = { ( ) => { console . debug ( '[FDV] click Left→Overview' , { leftIdx } ) ; setHideDiff ( true ) ; setTimeout ( ( ) => sess . gotoOverview ( 'left' ) , 0 ) ; } }
482
+ onClick = { ( ) => { setHideDiff ( true ) ; setTimeout ( ( ) => sess . gotoOverview ( 'left' ) , 0 ) ; } }
485
483
>
486
484
Left → Kernel Overview
487
485
</ button >
488
486
< button
489
487
className = "px-2 py-1 text-sm bg-gray-100 hover:bg-gray-200 rounded border"
490
488
disabled = { leftArrayResolved . length === 0 }
491
- onClick = { ( ) => { console . debug ( '[FDV] click Left→IR' , { leftIdx } ) ; setHideDiff ( true ) ; setTimeout ( ( ) => sess . gotoIRCode ( 'left' ) , 0 ) ; } }
489
+ onClick = { ( ) => { setHideDiff ( true ) ; setTimeout ( ( ) => sess . gotoIRCode ( 'left' ) , 0 ) ; } }
492
490
>
493
491
Left → IR Code
494
492
</ button >
495
493
</ div >
496
494
</ div >
497
495
< div >
498
496
< div className = "text-sm text-gray-500 mb-1" > Right Source (json_b_url)</ div >
499
- < div className = "flex items-center gap-2 mb-2 " >
497
+ < div className = "flex items-center gap-2 mb-1 " >
500
498
< input
501
499
type = "url"
502
500
placeholder = "https://.../trace.ndjson.gz"
@@ -512,7 +510,7 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
512
510
{ loadingRight ? "Loading..." : "Load" }
513
511
</ button >
514
512
</ div >
515
- < div className = "flex items-center gap-2 mb-2 " >
513
+ < div className = "flex items-center gap-2 mb-1 " >
516
514
< input
517
515
type = "file"
518
516
accept = ".ndjson,.ndjson.gz,.gz,.jsonl"
@@ -551,7 +549,7 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
551
549
</ div >
552
550
553
551
{ /* Aligned kernel selectors row */ }
554
- < div className = "grid grid-cols-1 md:grid-cols-2 gap-3 mt-2" >
552
+ < div className = "grid grid-cols-1 md:grid-cols-2 gap-2 mt-2" >
555
553
< div >
556
554
< label className = "block text-sm font-medium text-gray-700 mb-1" > Left Kernel</ label >
557
555
< select
@@ -584,7 +582,7 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
584
582
</ div >
585
583
</ div >
586
584
587
- < div className = "grid grid-cols-1 md:grid-cols-3 gap-3 mt-3 " >
585
+ < div className = "grid grid-cols-1 md:grid-cols-3 gap-2 mt-2 " >
588
586
< div >
589
587
< label className = "block text-sm font-medium text-gray-700 mb-1" > Mode</ label >
590
588
< div className = "flex items-center gap-2" >
@@ -643,3 +641,5 @@ const FileDiffView: React.FC<FileDiffViewProps> = ({ kernelsLeft, selectedLeftIn
643
641
} ;
644
642
645
643
export default FileDiffView ;
644
+
645
+
0 commit comments