@@ -48,9 +48,6 @@ import { formatCost } from '@/providers/utils'
4848import { useLogDetailsUIStore } from '@/stores/logs/store'
4949import { MAX_LOG_DETAILS_WIDTH_RATIO , MIN_LOG_DETAILS_WIDTH } from '@/stores/logs/utils'
5050
51- /**
52- * Workflow Output section with code viewer, copy, search, and context menu functionality
53- */
5451export const WorkflowOutputSection = memo (
5552 function WorkflowOutputSection ( { output } : { output : Record < string , unknown > } ) {
5653 const contentRef = useRef < HTMLDivElement > ( null )
@@ -258,18 +255,10 @@ export const WorkflowOutputSection = memo(
258255export type LogDetailsTab = 'overview' | 'trace'
259256
260257interface LogDetailsContentProps {
261- /** The log to display */
262258 log : WorkflowLogRow
263- /** Fires when the active tab changes, so embedders can gate their own keyboard handlers */
264259 onActiveTabChange ?: ( tab : LogDetailsTab ) => void
265260}
266261
267- /**
268- * Tabbed body for a single log: overview details and trace spans, plus the
269- * execution snapshot modal. Used as the body of the `LogDetails` sidebar and
270- * embedded directly inside the Mothership resource panel — keep the two in
271- * sync by editing this component, not by re-implementing it elsewhere.
272- */
273262export function LogDetailsContent ( { log, onActiveTabChange } : LogDetailsContentProps ) {
274263 const [ isExecutionSnapshotOpen , setIsExecutionSnapshotOpen ] = useState ( false )
275264 const [ activeTab , setActiveTab ] = useState < LogDetailsTab > ( 'overview' )
@@ -310,7 +299,7 @@ export function LogDetailsContent({ log, onActiveTabChange }: LogDetailsContentP
310299 ! permissionConfig . hideTraceSpans
311300
312301 const showTraceTab = ! permissionConfig . hideTraceSpans && isLikelyExecution
313- // double-cast-allowed: contract trace span schema is intentionally permissive (optional duration/startTime/endTime to tolerate legacy persisted JSON); the canonical TraceSpan used by TraceView/ExecutionSnapshot requires them, and runtime data from the executor always supplies them.
302+ // double-cast-allowed: contract schema makes duration/startTime optional for legacy persisted JSON; runtime data always supplies them.
314303 const traceSpans = log . executionData ?. traceSpans as unknown as TraceSpan [ ] | undefined
315304
316305 const resolvedTab : LogDetailsTab = activeTab === 'trace' && ! showTraceTab ? 'overview' : activeTab
@@ -634,33 +623,18 @@ export function LogDetailsContent({ log, onActiveTabChange }: LogDetailsContentP
634623}
635624
636625interface LogDetailsProps {
637- /** The log to display details for */
638626 log : WorkflowLogRow | null
639- /** Whether the sidebar is open */
640627 isOpen : boolean
641- /** Callback when closing the sidebar */
642628 onClose : ( ) => void
643- /** Callback to navigate to next log */
644629 onNavigateNext ?: ( ) => void
645- /** Callback to navigate to previous log */
646630 onNavigatePrev ?: ( ) => void
647- /** Whether there is a next log available */
648631 hasNext ?: boolean
649- /** Whether there is a previous log available */
650632 hasPrev ?: boolean
651- /** Callback to retry a failed execution */
652633 onRetryExecution ?: ( ) => void
653- /** Whether a retry is currently in progress */
654634 isRetryPending ?: boolean
655- /** Fires when the active tab changes, so the parent can gate its own keyboard handlers */
656635 onActiveTabChange ?: ( tab : LogDetailsTab ) => void
657636}
658637
659- /**
660- * Sidebar panel displaying detailed information about a selected log.
661- * Wraps `LogDetailsContent` with sidebar chrome — resize handle, header, and
662- * keyboard navigation between logs.
663- */
664638export const LogDetails = memo ( function LogDetails ( {
665639 log,
666640 isOpen,
@@ -687,9 +661,6 @@ export const LogDetails = memo(function LogDetails({
687661 const { handleMouseDown } = useLogDetailsResize ( )
688662
689663 const maxVw = `${ MAX_LOG_DETAILS_WIDTH_RATIO * 100 } vw`
690- // CSS-side clamp matching `clampPanelWidth` in stores/logs/utils.ts: the
691- // floor is itself capped at the max-vw ratio so a narrow viewport doesn't
692- // let the min outpace the cap and cover the table behind the panel.
693664 const effectiveWidth = `clamp(min(${ MIN_LOG_DETAILS_WIDTH } px, ${ maxVw } ), ${ panelWidth } px, ${ maxVw } )`
694665
695666 useEffect ( ( ) => {
@@ -700,8 +671,7 @@ export const LogDetails = memo(function LogDetails({
700671
701672 if ( ! isOpen ) return
702673
703- // When the Trace tab is active, arrow keys belong to TraceView's own
704- // span-navigation handler. Log-to-log navigation should not hijack them.
674+ // Trace tab owns arrow keys for span navigation.
705675 if ( activeTabRef . current === 'trace' ) return
706676
707677 if ( e . key === 'ArrowUp' && hasPrev && onNavigatePrev ) {
0 commit comments