File tree 2 files changed +16
-1
lines changed
site/src/modules/workspaces/WorkspaceTiming
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -118,3 +118,11 @@ export const DuplicatedScriptTiming: Story = {
118
118
] ,
119
119
} ,
120
120
} ;
121
+
122
+ // Loading when agent script timings are empty
123
+ // Test case for https://github.com/coder/coder/issues/15273
124
+ export const LoadingWhenAgentScriptTimingsAreEmpty : Story = {
125
+ args : {
126
+ agentScriptTimings : undefined ,
127
+ } ,
128
+ } ;
Original file line number Diff line number Diff line change @@ -60,7 +60,14 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
60
60
} ) ;
61
61
62
62
const [ isOpen , setIsOpen ] = useState ( defaultIsOpen ) ;
63
- const isLoading = 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
+ const isLoading = [
67
+ provisionerTimings ,
68
+ agentScriptTimings ,
69
+ agentConnectionTimings ,
70
+ ] . some ( ( t ) => t . length === 0 ) ;
64
71
65
72
// Each agent connection timing is a stage in the timeline to make it easier
66
73
// to users to see the timing for connection and the other scripts.
You can’t perform that action at this time.
0 commit comments