diff --git a/site/src/modules/resources/AgentRow.tsx b/site/src/modules/resources/AgentRow.tsx index d331a940ff..69739a53e5 100644 --- a/site/src/modules/resources/AgentRow.tsx +++ b/site/src/modules/resources/AgentRow.tsx @@ -150,6 +150,9 @@ export const AgentRow: FC = ({ const showVSCode = hasVSCodeApp && !browser_only; const hasStartupFeatures = Boolean(agent.logs_length); + const runningScriptsCount = agent.scripts.filter( + (s) => s.run_on_start && !s.status, + ).length; const healthIssues = getAgentHealthIssues(agent); const hasAgentIssues = healthIssues.length > 0; const hasWarningIssues = healthIssues.some((i) => i.severity === "warning"); @@ -510,7 +513,7 @@ export const AgentRow: FC = ({ Logs {agent.lifecycle_state === "starting" && - agent.log_sources.length > 0 && + runningScriptsCount > 0 && healthIssues.length === 0 && ( = ({ loading={true} className="text-content-secondary -ml-1" /> - {agent.log_sources.length} + {runningScriptsCount} )} {healthIssues.length > 0 && (