Each project is now a single sidebar row with its own icon and color that opens the project's coordinator conversation. The whole row drags to reorder. The row menu gains Customize for name, icon and color. Inside the coordinator conversation, an overview lists the project's agent threads that need the user, are running, or recently finished. Claude-Session: https://claude.ai/code/session_01Tgvrj34NMnaqvtgvruYQZZ Co-authored-by: Claude <noreply@anthropic.com>
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { isProjectColor, isProjectIcon, PROJECT_ICONS, projectLook } from "./project-look.js";
|
|
|
|
describe("project look", () => {
|
|
it("falls back to the default icon and color", () => {
|
|
const look = projectLook({ icon: null, color: "not-a-color" });
|
|
expect(look.icon.id).toBe("folder");
|
|
expect(look.color.id).toBe("violet");
|
|
});
|
|
|
|
it("keeps a chosen icon and color", () => {
|
|
const look = projectLook({ icon: "rocket-not-listed", color: "green" });
|
|
expect(look.icon.id).toBe("folder");
|
|
expect(look.color.id).toBe("green");
|
|
expect(projectLook({ icon: "music" }).icon.ios).toBe("music.note");
|
|
});
|
|
|
|
it("validates ids and offers a large unique catalog", () => {
|
|
expect(isProjectIcon("leaf")).toBe(true);
|
|
expect(isProjectIcon("Leaf")).toBe(false);
|
|
expect(isProjectColor("orange")).toBe(true);
|
|
expect(isProjectColor("#FF0000")).toBe(false);
|
|
expect(PROJECT_ICONS.length).toBeGreaterThanOrEqual(60);
|
|
expect(new Set(PROJECT_ICONS.map((icon) => icon.id)).size).toBe(PROJECT_ICONS.length);
|
|
});
|
|
});
|