From 887ea212372818943e5f5dcc6bfeb08385a55edb Mon Sep 17 00:00:00 2001 From: Andrew Aquino Date: Tue, 2 Jun 2026 11:49:10 -0700 Subject: [PATCH] feat: show Spinner before agent logs are rendered (#25820) related to DEVEX-313 https://github.com/user-attachments/assets/5fb074bd-7ee7-4f11-9c0a-30567cd71abc --- site/src/modules/resources/AgentRow.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/site/src/modules/resources/AgentRow.tsx b/site/src/modules/resources/AgentRow.tsx index 46c306613e..f1c44ef1e8 100644 --- a/site/src/modules/resources/AgentRow.tsx +++ b/site/src/modules/resources/AgentRow.tsx @@ -305,7 +305,9 @@ export const AgentRow: FC = ({ ...sortedSourceLogTabs, ]; const hasAnyLogs = agentLogs.length > 0; - const logTabsMeasureEnabled = hasStartupFeatures && hasAnyLogs && showLogs; + const shouldExpandLogs = showLogs || (!hasStartupFeatures && hasAgentIssues); + const shouldShowLogsTabs = hasStartupFeatures && hasAnyLogs; + const logTabsMeasureEnabled = shouldShowLogsTabs && showLogs; const { containerRef: logTabsListContainerRef, visibleTabs: visibleLogTabs, @@ -529,7 +531,7 @@ export const AgentRow: FC = ({ {runningScriptsCount} )} - {healthIssues.length > 0 && ( + {hasAgentIssues && ( = ({ )} - +
- {healthIssues.length > 0 && ( + {/* + Collapse's `in` condition is needed here, + or else the Spinner will also show as Collapse is closing + */} + {shouldExpandLogs && !(hasAgentIssues || shouldShowLogsTabs) && ( + + )} + {hasAgentIssues && (
{healthIssues.map((issue) => ( = ({ ))}
)} - {hasStartupFeatures && hasAnyLogs && ( + {shouldShowLogsTabs && (