@@ -121,14 +121,15 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
121
121
}
122
122
123
123
if ( this . props . dontAutostart ) {
124
+ // we saw errors previously, or run in-frame
124
125
this . fetchWorkspaceInfo ( undefined ) ;
125
- return ;
126
+ } else {
127
+ // dashboard case (w/o previous errors): start workspace as quickly as possible
128
+ this . startWorkspace ( ) ;
126
129
}
127
130
128
- // dashboard case (no previous errors): start workspace as quickly as possible
129
- this . startWorkspace ( ) ;
130
131
// query IDE options so we can show them if necessary once the workspace is running
131
- getGitpodService ( ) . server . getIDEOptions ( ) . then ( ideOptions => this . setState ( { ideOptions } ) ) ;
132
+ this . fetchIDEOptions ( ) ;
132
133
}
133
134
134
135
componentWillUnmount ( ) {
@@ -260,6 +261,17 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
260
261
}
261
262
}
262
263
264
+ /**
265
+ * Fetches the current IDEOptions config for this user
266
+ *
267
+ * TODO(gpl) Ideally this would be part of the WorkspaceInstance shape, really. And we'd display options based on
268
+ * what support it was started with.
269
+ */
270
+ protected async fetchIDEOptions ( ) {
271
+ const ideOptions = await getGitpodService ( ) . server . getIDEOptions ( ) ;
272
+ this . setState ( { ideOptions } ) ;
273
+ }
274
+
263
275
notifyDidOpenConnection ( ) {
264
276
this . fetchWorkspaceInfo ( undefined ) ;
265
277
}
@@ -283,6 +295,9 @@ export default class StartWorkspace extends React.Component<StartWorkspaceProps,
283
295
startedInstanceId : workspaceInstance . id ,
284
296
workspaceInstance,
285
297
} ) ;
298
+
299
+ // now we're listening to a new instance, which might have been started with other IDEoptions
300
+ this . fetchIDEOptions ( ) ;
286
301
}
287
302
288
303
await this . ensureWorkspaceAuth ( workspaceInstance . id ) ;
0 commit comments