@@ -136,6 +136,7 @@ import { ctxIsAborted, runWithRequestContext, runWithSubjectId } from "../util/r
136136import { SubjectId } from "../auth/subject-id" ;
137137import { ApplicationError , ErrorCodes } from "@gitpod/gitpod-protocol/lib/messaging/error" ;
138138import { IDESettingsVersion } from "@gitpod/gitpod-protocol/lib/ide-protocol" ;
139+ import { getFeatureFlagEnableExperimentalJBTB } from "../util/featureflags" ;
139140
140141export interface StartWorkspaceOptions extends Omit < GitpodServer . StartWorkspaceOptions , "ideSettings" > {
141142 excludeFeatureFlags ?: NamedWorkspaceFeatureFlag [ ] ;
@@ -301,16 +302,11 @@ export class WorkspaceStarter {
301302
302303 let ideSettings = options . ideSettings ;
303304
304- const enableExperimentalJBTB = await getExperimentsClientForBackend ( ) . getValueAsync (
305- "enable_experimental_jbtb" ,
306- false ,
307- { user } ,
308- ) ;
309-
310305 // if no explicit ideSettings are passed, we use the one from the last workspace instance
311306 if ( lastValidWorkspaceInstance ) {
312307 const ideConfig = lastValidWorkspaceInstance . configuration ?. ideConfig ;
313308 if ( ideConfig ?. ide ) {
309+ const enableExperimentalJBTB = await getFeatureFlagEnableExperimentalJBTB ( user . id ) ;
314310 const preferToolbox = ! enableExperimentalJBTB
315311 ? false
316312 : ideSettings ?. preferToolbox ??
@@ -922,11 +918,7 @@ export class WorkspaceStarter {
922918 } ;
923919 if ( ideConfig . ideSettings && ideConfig . ideSettings . trim ( ) !== "" ) {
924920 try {
925- const enableExperimentalJBTB = await getExperimentsClientForBackend ( ) . getValueAsync (
926- "enable_experimental_jbtb" ,
927- false ,
928- { user } ,
929- ) ;
921+ const enableExperimentalJBTB = await getFeatureFlagEnableExperimentalJBTB ( user . id ) ;
930922 const ideSettings : IDESettings = JSON . parse ( ideConfig . ideSettings ) ;
931923 configuration . ideConfig ! . ide = ideSettings . defaultIde ;
932924 configuration . ideConfig ! . useLatest = ! ! ideSettings . useLatestVersion ;
0 commit comments