fix(site): delink agent health from script failures#26124
Draft
matifali wants to merge 2 commits into
Draft
Conversation
Agent connectivity status should be separate from script execution failures. Previously, when any startup or shutdown scripts failed, the entire agent panel would show warning badges and colors, incorrectly suggesting agent connectivity issues. This change: - Adds getAgentConnectivityIssues() to return only connection-related issues - Adds getAgentScriptIssues() to return only script-related issues - Updates getAgentHealthIssues() to combine both types for complete visibility - Updates AgentRow to use connectivity issues only for panel styling and warnings - Script failures remain visible in their dedicated script tabs with error indicators Fixes coder#26025
- Remove unused healthIssues variable and getAgentHealthIssues import from AgentRow - Replace remaining hasAgentIssues reference with hasConnectivityIssues - Update AgentStatus to show ready dot for start_error and start_timeout - Remove unused StartTimeoutLifecycle and StartErrorLifecycle components - Update border classes to show success for start_error and start_timeout - Fix comment in AgentRow.stories.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent connectivity status should be separate from script execution failures.
Previously, when any startup or shutdown scripts failed, the entire agent panel would show warning badges and border colors, incorrectly suggesting agent connectivity issues.
Fixes #26025
Closes DEVEX-437
Changes
site/src/modules/workspaces/health.tsgetAgentConnectivityIssues()returning only connection-related issues (disconnected, timeout, shutting down, connecting)getAgentScriptIssues()returning only script-related issues (exit failure, timed out, pipes left open)getAgentHealthIssues()to combine both for backward compatibilitysite/src/modules/resources/AgentRow.tsxsite/src/modules/workspaces/health.test.tsgetAgentConnectivityIssuesandgetAgentScriptIssuesgetAgentHealthIssuestestsBehavior after fix
Implementation details
The core change splits
getAgentHealthIssues()into two focused functions:getAgentConnectivityIssues()for agent panel border/badge/alert decisionsgetAgentScriptIssues()for script tab error indicatorsgetAgentHealthIssues()remains as a composition of both for any callers needing the full picture.Logs auto-open whenever
lifecycle_state !== "ready"(includingstart_error). The default tab is "All Logs"; a separate effect auto-selects the first failed script tab once its output is available.