Skip to content

Commit 28239f2

Browse files
stefanonardoclaude
andcommitted
OCPBUGS-81630: Fix unnecessary error on Node Terminal tab
Show a loading spinner while the debug pod is being created, instead of briefly flashing "Debug pod not found or was deleted." The error occurred because useK8sWatchResource(null) returns loaded=true before pod creation completes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 46a9c16 commit 28239f2

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

frontend/packages/console-app/src/components/nodes/NodeTerminal.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,15 @@ const NodeTerminal: FC<NodeTerminalProps> = ({ obj: node }) => {
249249
};
250250
}, [nodeName, isWindows]);
251251

252-
return errorMessage ? (
253-
<NodeTerminalError error={errorMessage} />
254-
) : (
255-
<NodeTerminalInner pod={pod} loaded={loaded} loadError={loadError} />
256-
);
252+
if (errorMessage) {
253+
return <NodeTerminalError error={errorMessage} />;
254+
}
255+
256+
if (!podName) {
257+
return <LoadingBox />;
258+
}
259+
260+
return <NodeTerminalInner pod={pod} loaded={loaded} loadError={loadError} />;
257261
};
258262

259263
export default NodeTerminal;

0 commit comments

Comments
 (0)