Skip to content

Commit 00cdd6b

Browse files
committed
feat(codecatalyst): sort "Open Dev Environment" by last timestamp
Problem: Dev Environment list places "RUNNING" environments at the bottom of the list. Solution: When sorting the list, only compare "last used".
1 parent 6031055 commit 00cdd6b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "CodeCatalyst: `AWS: Open CodeCatalyst Dev Environment` command now sorts Dev Environments by most recent usage"
4+
}

src/codecatalyst/wizards/selectResource.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ export function createDevEnvPrompter(
153153
placeholder: 'Search for a Dev Environment',
154154
compare: (a, b) => {
155155
if (isData(a.data) && isData(b.data)) {
156-
if (a.data.status === b.data.status) {
157-
return b.data.lastUpdatedTime.getTime() - a.data.lastUpdatedTime.getTime()
158-
}
159-
160-
return a.data.status === 'RUNNING' ? 1 : b.data.status === 'RUNNING' ? -1 : 0
156+
return b.data.lastUpdatedTime.getTime() - a.data.lastUpdatedTime.getTime()
161157
}
162158

163159
return 0

0 commit comments

Comments
 (0)