Skip to content

fix: url refresh after switching deployments #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
- improved workspace status reporting (icon and colors) when it is failed, stopping, deleting, stopped or when we are
establishing the SSH connection.

## 0.2.2 - 2025-05-21
### Fixed

### Added
- url on the main page is now refreshed when switching between multiple deployments (via logout/login or URI handling)

## 0.2.2 - 2025-05-21

- render network status in the Settings tab, under `Additional environment information` section.
- quick action for creating new workspaces from the web dashboard.
Expand Down
3 changes: 3 additions & 0 deletions src/main/kotlin/com/coder/toolbox/CoderRemoteProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.coder.toolbox.util.DialogUi
import com.coder.toolbox.util.withPath
import com.coder.toolbox.views.Action
import com.coder.toolbox.views.AuthWizardPage
import com.coder.toolbox.views.CoderPage
import com.coder.toolbox.views.CoderSettingsPage
import com.coder.toolbox.views.NewEnvironmentPage
import com.coder.toolbox.views.state.AuthWizardState
Expand Down Expand Up @@ -340,7 +341,9 @@ class CoderRemoteProvider(
this.client = client
pollJob?.cancel()
environments.showLoadingMessage()
coderHeaderPage = NewEnvironmentPage(context, context.i18n.pnotr(client.url.toString()))
pollJob = poll(client, cli)
context.ui.showUiPage(CoderPage.emptyPage(context))
goToEnvironmentsPage()
}

Expand Down
4 changes: 4 additions & 0 deletions src/main/kotlin/com/coder/toolbox/views/CoderPage.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ abstract class CoderPage(
)
}
}

companion object {
fun emptyPage(ctx: CoderToolboxContext): UiPage = UiPage(ctx.i18n.pnotr(""))
}
}

/**
Expand Down
Loading