@@ -227,7 +227,7 @@ class CoderRemoteProvider(
227227 val url = context.settingsStore.workspaceCreateUrl ? : client?.url?.withPath(" /templates" ).toString()
228228 context.desktop.browse(
229229 url
230- .replace(" \$ workspaceOwner" , client?.me() ?.username ? : " " )
230+ .replace(" \$ workspaceOwner" , client?.me?.username ? : " " )
231231 ) {
232232 context.ui.showErrorInfoPopup(it)
233233 }
@@ -333,8 +333,11 @@ class CoderRemoteProvider(
333333 }
334334 context.logger.info(" Starting initialization with the new settings" )
335335 this @CoderRemoteProvider.client = restClient
336- coderHeaderPage.setTitle(context.i18n.pnotr(restClient.url.toString()))
337-
336+ if (context.settingsStore.useAppNameAsTitle) {
337+ coderHeaderPage.setTitle(context.i18n.pnotr(restClient.appName))
338+ } else {
339+ coderHeaderPage.setTitle(context.i18n.pnotr(restClient.url.toString()))
340+ }
338341 environments.showLoadingMessage()
339342 pollJob = poll(restClient, cli)
340343 context.logger.info(" Workspace poll job with name ${pollJob.toString()} was created while handling URI $uri " )
@@ -421,7 +424,11 @@ class CoderRemoteProvider(
421424 context.logger.info(" Cancelled workspace poll job ${pollJob.toString()} in order to start a new one" )
422425 }
423426 environments.showLoadingMessage()
424- coderHeaderPage.setTitle(context.i18n.pnotr(client.url.toString()))
427+ if (context.settingsStore.useAppNameAsTitle) {
428+ coderHeaderPage.setTitle(context.i18n.pnotr(client.appName))
429+ } else {
430+ coderHeaderPage.setTitle(context.i18n.pnotr(client.url.toString()))
431+ }
425432 context.logger.info(" Displaying ${client.url} in the UI" )
426433 pollJob = poll(client, cli)
427434 context.logger.info(" Workspace poll job with name ${pollJob.toString()} was created" )
0 commit comments