AE-Shree commited on
Commit
0b1db59
Β·
1 Parent(s): ae81ce5

Final Change

Browse files
frontend/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>CLM Dashboard</title>
7
- <script type="module" crossorigin src="/assets/index-D8328XGk.js"></script>
8
  <link rel="stylesheet" crossorigin href="/assets/index-DHB-7DK0.css">
9
  </head>
10
  <body style="margin:0;background:#f1f5f9">
 
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
  <title>CLM Dashboard</title>
7
+ <script type="module" crossorigin src="/assets/index-DPHOn9DW.js"></script>
8
  <link rel="stylesheet" crossorigin href="/assets/index-DHB-7DK0.css">
9
  </head>
10
  <body style="margin:0;background:#f1f5f9">
frontend/src/components/Dashboard.jsx CHANGED
@@ -253,7 +253,7 @@ export default function Dashboard() {
253
 
254
  // ── SSE streaming ─────────────────────────────────────────────────────────
255
  const startStream = useCallback((diff) => {
256
- const d = diff || diffRef.current
257
  if (esRef.current) { esRef.current.close(); esRef.current = null }
258
  if (replayTimer.current) { clearTimeout(replayTimer.current); replayTimer.current = null }
259
 
@@ -439,7 +439,7 @@ export default function Dashboard() {
439
  borderRadius: 8, padding: '8px 20px', fontWeight: 700,
440
  fontSize: 13, cursor: 'pointer' }}>⏹ Stop</button>
441
  : !streamDone && (
442
- <button onClick={startStream}
443
  style={{ background: '#6366f1', color: '#fff', border: 'none',
444
  borderRadius: 8, padding: '8px 20px', fontWeight: 700,
445
  fontSize: 13, cursor: 'pointer' }}>
@@ -648,14 +648,16 @@ export default function Dashboard() {
648
  const sc = typeof h.score === 'number' ? h.score : null
649
  const col = sc == null ? '#64748b'
650
  : sc >= 0.5 ? '#16a34a' : sc >= 0.3 ? '#f59e0b' : '#ef4444'
 
 
651
  return (
652
  <div key={h.ep} style={{ display: 'flex', gap: 8,
653
  padding: '3px 0', borderBottom: '1px solid #f8fafc', color: col }}>
654
  <span style={{ color: '#94a3b8', minWidth: 24 }}>#{h.ep}</span>
655
  <span style={{ textTransform: 'capitalize', minWidth: 52,
656
- color: '#475569' }}>{h.difficulty}</span>
657
  <span style={{ fontWeight: 700 }}>{sc != null ? sc.toFixed(4) : 'β€”'}</span>
658
- <span style={{ color: '#94a3b8' }}>{h.steps ?? 0}s</span>
659
  </div>
660
  )
661
  })}
 
253
 
254
  // ── SSE streaming ─────────────────────────────────────────────────────────
255
  const startStream = useCallback((diff) => {
256
+ const d = (typeof diff === 'string' && diff) ? diff : diffRef.current
257
  if (esRef.current) { esRef.current.close(); esRef.current = null }
258
  if (replayTimer.current) { clearTimeout(replayTimer.current); replayTimer.current = null }
259
 
 
439
  borderRadius: 8, padding: '8px 20px', fontWeight: 700,
440
  fontSize: 13, cursor: 'pointer' }}>⏹ Stop</button>
441
  : !streamDone && (
442
+ <button onClick={() => startStream()}
443
  style={{ background: '#6366f1', color: '#fff', border: 'none',
444
  borderRadius: 8, padding: '8px 20px', fontWeight: 700,
445
  fontSize: 13, cursor: 'pointer' }}>
 
648
  const sc = typeof h.score === 'number' ? h.score : null
649
  const col = sc == null ? '#64748b'
650
  : sc >= 0.5 ? '#16a34a' : sc >= 0.3 ? '#f59e0b' : '#ef4444'
651
+ const diff = typeof h.difficulty === 'string' ? h.difficulty : 'β€”'
652
+ const steps = typeof h.steps === 'number' ? h.steps : 0
653
  return (
654
  <div key={h.ep} style={{ display: 'flex', gap: 8,
655
  padding: '3px 0', borderBottom: '1px solid #f8fafc', color: col }}>
656
  <span style={{ color: '#94a3b8', minWidth: 24 }}>#{h.ep}</span>
657
  <span style={{ textTransform: 'capitalize', minWidth: 52,
658
+ color: '#475569' }}>{diff}</span>
659
  <span style={{ fontWeight: 700 }}>{sc != null ? sc.toFixed(4) : 'β€”'}</span>
660
+ <span style={{ color: '#94a3b8' }}>{steps}s</span>
661
  </div>
662
  )
663
  })}