Skip to content

Commit 8cd1e70

Browse files
committed
fix: only block server start for profile validation errors
The ServerStatusToggle was using rawConfigErrors.length > 0 which included all config errors like genai-disabled. This caused the Start button to be disabled even when the profile was valid. Now filters to only profile validation errors: - no-active-profile - invalid-label-selector - no-custom-rules This fixes the e2e test failure where the Start button was disabled. Signed-off-by: Ian Bolton <[email protected]>
1 parent 15f24de commit 8cd1e70

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

webview-ui/src/components/AnalysisPage/AnalysisPage.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ const AnalysisPage: React.FC = () => {
135135

136136
const selectedProfile = profiles.find((p) => p.id === activeProfileId);
137137

138+
// Profile validation errors that should block server start
139+
const profileValidationErrors = rawConfigErrors.filter(
140+
(e) =>
141+
e.type === "no-active-profile" ||
142+
e.type === "invalid-label-selector" ||
143+
e.type === "no-custom-rules",
144+
);
145+
const hasProfileValidationErrors = profileValidationErrors.length > 0;
146+
138147
const [isExpanded, setIsExpanded] = useState(false);
139148

140149
return (
@@ -160,7 +169,7 @@ const AnalysisPage: React.FC = () => {
160169
isStarting={isStartingServer}
161170
isInitializing={isInitializingServer}
162171
onToggle={handleServerToggle}
163-
hasWarning={rawConfigErrors.length > 0}
172+
hasWarning={hasProfileValidationErrors}
164173
/>
165174
</ToolbarItem>
166175
{!isGenAIDisabled && (

0 commit comments

Comments
 (0)