feat(core): order projects by recent activity (#50790)

This commit is contained in:
Dax
2026-09-22 21:59:32 -04:00
committed by GitHub
parent bab26d63ea
commit 53179daefa
22 changed files with 180 additions and 40 deletions
@@ -93,7 +93,7 @@ describe("normalizeProviderList", () => {
describe("normalizeProjectInfo", () => {
test("keeps the project VCS backend", () => {
const project = { id: "prj", canonical: "/repo", time: { created: 1, updated: 1 }, sandboxes: [] }
const project = { id: "prj", canonical: "/repo", time: { created: 1, updated: 1, active: 1 }, sandboxes: [] }
expect(normalizeProjectInfo({ ...project, vcs: "git" } as Project).vcs).toBe("git")
expect(normalizeProjectInfo({ ...project, vcs: "hg" } as Project).vcs).toBe("hg")
expect(normalizeProjectInfo(project as Project).vcs).toBeUndefined()
@@ -124,7 +124,7 @@ describe("updateProjectInfo", () => {
canonical: "/repo",
name: "Repo",
icon: { color: "purple" },
time: { created: 1, updated: 2 },
time: { created: 1, updated: 2, active: 2 },
sandboxes: ["/repo-sandbox"],
} satisfies Project
@@ -24,7 +24,7 @@ test("settings project inventory reads metadata without acquiring directory stor
name: `Project ${index}`,
icon: { color: "orange" },
commands: { start: "bun install" },
time: { created: 1, updated: 1 },
time: { created: 1, updated: 1, active: 1 },
sandboxes: [],
worktrees: [],
}))
@@ -107,7 +107,7 @@ describe("withWorktreeInventory", () => {
id: "project",
canonical: "/repo",
name: "Before",
time: { created: 1, updated: 1 },
time: { created: 1, updated: 1, active: 1 },
sandboxes: [],
}