File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/logs/components/log-details Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,7 +299,15 @@ export const LogDetails = memo(function LogDetails({
299299} : LogDetailsProps ) {
300300 const [ isExecutionSnapshotOpen , setIsExecutionSnapshotOpen ] = useState ( false )
301301 const [ activeTab , setActiveTab ] = useState < LogDetailsTab > ( 'overview' )
302+ const [ prevLogId , setPrevLogId ] = useState ( log ?. id )
302303 const [ copiedRunId , setCopiedRunId ] = useState ( false )
304+
305+ // Reset tab to overview when the selected log changes so the user never gets
306+ // trapped on the Trace tab (which would suppress arrow-key log navigation).
307+ if ( prevLogId !== log ?. id ) {
308+ setPrevLogId ( log ?. id )
309+ setActiveTab ( 'overview' )
310+ }
303311 const copiedRunIdTimerRef = useRef < number | null > ( null )
304312 const scrollAreaRef = useRef < HTMLDivElement > ( null )
305313
You can’t perform that action at this time.
0 commit comments