Skip to content

Commit 27d7660

Browse files
intel352claude
andcommitted
fix: LogEntry.id → number, onStepClick → optional in ExecutionLogViewer
- LogEntry.id: string → number (engine DB emits integer IDs) - ExecutionLogViewerProps.onStepClick: required → optional - LogRowProps.onStepClick: required → optional; guard call with ?.() - moduleName button styled as non-interactive when no onStepClick provided Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 903d409 commit 27d7660

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/components/ExecutionLogViewer.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useState, useEffect, useRef, useMemo } from 'react';
22

33
export interface LogEntry {
4-
id: string;
4+
id: number;
55
level: 'debug' | 'info' | 'warn' | 'error';
66
message: string;
77
moduleName?: string;
@@ -29,7 +29,7 @@ function formatTime(iso: string): string {
2929

3030
interface LogRowProps {
3131
entry: LogEntry;
32-
onStepClick: (stepName: string) => void;
32+
onStepClick?: (stepName: string) => void;
3333
}
3434

3535
function LogRow({ entry, onStepClick }: LogRowProps) {
@@ -73,18 +73,18 @@ function LogRow({ entry, onStepClick }: LogRowProps) {
7373
</span>
7474
{entry.moduleName && (
7575
<button
76-
onClick={() => onStepClick(entry.moduleName!)}
76+
onClick={() => onStepClick?.(entry.moduleName!)}
7777
style={{
7878
background: '#313244',
7979
border: 'none',
8080
borderRadius: 3,
81-
color: '#89b4fa',
81+
color: onStepClick ? '#89b4fa' : '#6c7086',
8282
fontSize: 10,
83-
cursor: 'pointer',
83+
cursor: onStepClick ? 'pointer' : 'default',
8484
padding: '1px 5px',
8585
flexShrink: 0,
8686
}}
87-
title="Click to highlight step"
87+
title={onStepClick ? 'Click to highlight step' : undefined}
8888
>
8989
{entry.moduleName}
9090
</button>
@@ -136,7 +136,7 @@ export interface LogFilter {
136136

137137
export interface ExecutionLogViewerProps {
138138
logs: LogEntry[];
139-
onStepClick: (stepName: string) => void;
139+
onStepClick?: (stepName: string) => void;
140140
filter?: LogFilter;
141141
}
142142

0 commit comments

Comments
 (0)