-
Notifications
You must be signed in to change notification settings - Fork 887
feat(workspaces): change sorting order of the workspace list #7594
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have a second pair of backend eyes on this PR so that we can be sure that we do not need to mangle with database queries instead.
Co-authored-by: Cian Johnston <cian@coder.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but CI complains about some tests:
=== FAIL: coderd TestSortWorkspaces/then_sort_by_last_used_at_(recent_first) (0.00s)
workspaces_internal_test.go:173:
Error Trace: C:/a/coder/coder/coderd/workspaces_internal_test.go:173
Error: Not equal:
expected: []string{"running-userA3", "running-userA2", "running-userA"}
actual : []string{"running-userA3", "running-userA", "running-userA2"}
Diff:
--- Expected
+++ Actual
@@ -2,4 +2,4 @@
(string) (len=14) "running-userA3",
- (string) (len=14) "running-userA2",
- (string) (len=13) "running-userA"
+ (string) (len=13) "running-userA",
+ (string) (len=14) "running-userA2"
}
Test: TestSortWorkspaces/then_sort_by_last_used_at_(recent_first)
Messages: then sort by last used at (recent first)
changes to the sorting order of the workspace list. The new sorting order is as follows:
That order was suggested in this conversation: #7590 (review).