Skip to content
Closed
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
refactor: explicitly request the main page with URL visible
- i.e. with the header page expanded
  • Loading branch information
fioan89 committed Apr 3, 2025
commit 3f71848ca062d77f53c64c6cac16dc24ccf48145
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class CoderRemoteEnvironment(
while (context.cs.isActive && workspaceStillExists) {
if (wsRawStatus == WorkspaceAndAgentStatus.DELETING || wsRawStatus == WorkspaceAndAgentStatus.DELETED) {
workspaceStillExists = false
context.envPageManager.showPluginEnvironmentsPage(true)
context.envPageManager.showMainPageWithUrlVisible()
} else {
delay(1.seconds)
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ class CoderRemoteProvider(
* than using multiple root pages.
*/
private fun goToEnvironmentsPage() {
context.envPageManager.showPluginEnvironmentsPage(true)
context.envPageManager.showMainPageWithUrlVisible()
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.coder.toolbox

import com.jetbrains.toolbox.api.remoteDev.ui.EnvironmentUiPageManager

fun EnvironmentUiPageManager.showMainPageWithUrlVisible() {
showPluginEnvironmentsPage(true)
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.coder.toolbox.sdk.CoderRestClient
import com.coder.toolbox.sdk.v2.models.Workspace
import com.coder.toolbox.sdk.v2.models.WorkspaceAgent
import com.coder.toolbox.sdk.v2.models.WorkspaceStatus
import com.coder.toolbox.showMainPageWithUrlVisible
import com.jetbrains.toolbox.api.localization.LocalizableString
import kotlinx.coroutines.TimeoutCancellationException
import kotlinx.coroutines.delay
Expand Down Expand Up @@ -322,7 +323,7 @@ private suspend fun CoderToolboxContext.showInfoPopup(

private fun CoderToolboxContext.popupPluginMainPage() {
this.ui.showWindow()
this.envPageManager.showPluginEnvironmentsPage(true)
this.envPageManager.showMainPageWithUrlVisible()
}

/**
Expand Down
Loading