@@ -29,7 +29,7 @@ import {
2929 useFixResearchDiagramMutation ,
3030 useInfraResearchQuery ,
3131} from 'generated/graphql'
32- import { capitalize , isEmpty , truncate } from 'lodash'
32+ import { capitalize , truncate } from 'lodash'
3333import { ReactNode , useMemo , useState } from 'react'
3434import { useMatch , useNavigate } from 'react-router-dom'
3535import {
@@ -112,7 +112,7 @@ export function InfraResearch() {
112112 if ( ! ( infraResearch || loading ) )
113113 return < EmptyState message = "Infra research not found." />
114114
115- const { status, analysis, diagram } = infraResearch ?? { }
115+ const { status, analysis, diagram, threads } = infraResearch ?? { }
116116 const isRunning = status === InfraResearchStatus . Running
117117
118118 const headerButtons =
@@ -169,8 +169,10 @@ export function InfraResearch() {
169169 { status && (
170170 < InfraResearchStatusChip
171171 status = { status }
172- clickable = { ! isEmpty ( infraResearch ?. threads ) }
173- onClick = { ( ) => goToInfraResearch ( id ) }
172+ { ...( ( isRunning || ( threads ?. length ?? 0 ) > 1 ) && {
173+ clickable : true ,
174+ onClick : ( ) => goToInfraResearch ( id ) ,
175+ } ) }
174176 />
175177 ) }
176178 { ! isChatbotOpen && headerButtons }
0 commit comments