Thanks to visit codestin.com
Credit goes to github.com

Skip to content

revise recent projects flow to be less confusing #464

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 11 commits into from
Aug 19, 2024
Prev Previous commit
use let instead of git add .
  • Loading branch information
bcpeinhardt committed Aug 19, 2024
commit 30204730ea2fbdabcbf74a7ab2e9f049aa613bd7
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
if (deploymentError != null) {
Triple(UIUtil.getErrorForeground(), deploymentError, UIUtil.getBalloonErrorIcon())
} else if (workspaceWithAgent != null) {
val inLoadingState = listOf(WorkspaceStatus.STARTING, WorkspaceStatus.CANCELING, WorkspaceStatus.DELETING, WorkspaceStatus.STOPPING).contains(workspaceWithAgent?.workspace?.latestBuild?.status)

Check warning on line 179 in src/main/kotlin/com/coder/gateway/views/CoderGatewayRecentWorkspaceConnectionsView.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

Unnecessary safe call on a non-null receiver of type WorkspaceAgentListModel?

Triple(
workspaceWithAgent.status.statusColor(),
Expand Down Expand Up @@ -213,8 +213,8 @@
// We only display an API error on the first workspace rather than duplicating it on each workspace.
if (deploymentError == null || showError) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might want to add this check back or something similar to it. It is poorly named but basically it was making sure we only display an API error on the first workspace rather than duplicating it on each workspace (it was pretty noisy, especially since the API errors can get long).

For example, say you have 5 workspaces and your token expires, you see a message about being unauthorized and to check your token 5 times on the page.

Or we could group workspaces under a deployment heading and show the API error under the deployment heading, but that might be out of scope for this PR.

Copy link
Collaborator Author

@bcpeinhardt bcpeinhardt Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like atm the moment I actually have this inside the connections.foEach loop (which makes me think with multiple WorkpaceProjectIDE combos it would render multiple times). I didn't notice because I was visually testing with one recent connection.
I'll pull it out of the loop and add the check.

^^^ My adhd is going to quickly become a driving force for building out E2E suites.

row {
if (status.third != null) {
icon(status.third!!)
status.third?.let {
icon(it)
}
label("<html><body style='width:350px;'>" + status.second + "</html>").applyToComponent {
foreground = status.first
Expand Down
Loading