@@ -58,15 +58,18 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
5858] . sort ( ( a , b ) => {
5959return new Date ( a . started_at ) . getTime ( ) - new Date ( b . started_at ) . getTime ( ) ;
6060} ) ;
61+
6162const [ isOpen , setIsOpen ] = useState ( defaultIsOpen ) ;
6263const isLoading = timings . length === 0 ;
6364
64- // All stages
65+ // Each agent connection timing is a stage in the timeline to make it easier
66+ // to users to see the timing for connection and the other scripts.
6567const agentStageLabels = Array . from (
6668new Set (
6769agentConnectionTimings . map ( ( t ) => `agent (${ t . workspace_agent_name } )` ) ,
6870) ,
6971) ;
72+
7073const stages = [
7174...provisioningStages ,
7275...agentStageLabels . flatMap ( ( a ) => agentStages ( a ) ) ,
@@ -120,7 +123,8 @@ export const WorkspaceTimings: FC<WorkspaceTimingsProps> = ({
120123:mergeTimeRanges ( stageTimings . map ( toTimeRange ) ) ;
121124
122125// Prevent users from inspecting internal coder resources in
123- // provisioner timings.
126+ // provisioner timings because they were not useful to the
127+ // user and would add noise.
124128const visibleResources = stageTimings . filter ( ( t ) => {
125129const isProvisionerTiming = "resource" in t ;
126130return isProvisionerTiming