Skip to content

Commit f3577e4

Browse files
committed
[dashboard] Treat today's workspaces as active
1 parent 7bdf513 commit f3577e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/dashboard/src/workspaces/workspace-model.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,12 @@ export class WorkspaceModel implements Disposable, Partial<GitpodClient> {
145145
}
146146

147147
protected isActive(info: WorkspaceInfo): boolean {
148+
const lastSessionStart = WorkspaceInfo.lastActiveISODate(info);
149+
const twentyfourHoursAgo = new Date(Date.now() - 1000 * 60 * 60 * 24).toISOString();
148150
return (
149-
(info.workspace.pinned || (!!info.latestInstance && info.latestInstance.status?.phase !== "stopped")) &&
151+
(info.workspace.pinned ||
152+
(!!info.latestInstance && info.latestInstance.status?.phase !== "stopped") ||
153+
twentyfourHoursAgo.localeCompare(lastSessionStart) < 0) &&
150154
!info.workspace.softDeleted
151155
);
152156
}

0 commit comments

Comments
 (0)