Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb16fad1

Browse files
committed
Stay on loading state when agent script timings are empty
1 parent2181bec commitb16fad1

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

‎site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.stories.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,11 @@ export const DuplicatedScriptTiming: Story = {
118118
],
119119
},
120120
};
121+
122+
// Loading when agent script timings are empty
123+
// Test case for https://github.com/coder/coder/issues/15273
124+
exportconstLoadingWhenAgentScriptTimingsAreEmpty:Story={
125+
args:{
126+
agentScriptTimings:undefined,
127+
},
128+
};

‎site/src/modules/workspaces/WorkspaceTiming/WorkspaceTimings.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
6060
});
6161

6262
const[isOpen,setIsOpen]=useState(defaultIsOpen);
63-
constisLoading=timings.length===0;
63+
64+
// If any of the timings are empty, we are still loading the data. They can be
65+
// filled in different moments.
66+
constisLoading=[
67+
provisionerTimings,
68+
agentScriptTimings,
69+
agentConnectionTimings,
70+
].some((t)=>t.length===0);
6471

6572
// Each agent connection timing is a stage in the timeline to make it easier
6673
// to users to see the timing for connection and the other scripts.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp