Skip to content

fix: display build timings when all timings are loaded #15728

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Stay on loading state when agent script timings are empty
  • Loading branch information
BrunoQuaresma committed Dec 3, 2024
commit b16fad165c8733c60150b0dfce5df73ab2669e36
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,11 @@ export const DuplicatedScriptTiming: Story = {
],
},
};

// Loading when agent script timings are empty
// Test case for https://github.com/coder/coder/issues/15273
export const LoadingWhenAgentScriptTimingsAreEmpty: Story = {
args: {
agentScriptTimings: undefined,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
});

const [isOpen, setIsOpen] = useState(defaultIsOpen);
const isLoading = timings.length === 0;

// If any of the timings are empty, we are still loading the data. They can be
// filled in different moments.
const isLoading = [
provisionerTimings,
agentScriptTimings,
agentConnectionTimings,
].some((t) => t.length === 0);

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