refactor(sidebar): use status dot overlay on icons instead of replacing them

Sidebar workspace and project rows now keep their icon (Monitor/FolderGit2
for workspaces, project icon/initial for projects) and overlay a small
colored status dot on the bottom-right, matching the tab icon pattern.
Loading and syncing states still replace the icon entirely.
This commit is contained in:
Mohamed Boudra
2026-03-22 19:45:26 +07:00
parent d79ea8b15c
commit 1e5b809b70
2 changed files with 104 additions and 61 deletions
@@ -13,7 +13,7 @@ export interface SidebarProjectWorkspaceLinkRowModel {
export interface SidebarProjectSectionRowModel {
kind: "project_section";
chevron: "expand" | "collapse";
chevron: "expand" | "collapse" | null;
trailingAction: "new_worktree" | "none";
}
@@ -22,7 +22,7 @@ export type SidebarProjectRowModel =
| SidebarProjectSectionRowModel;
export function isSidebarProjectFlattened(project: SidebarProjectEntry): boolean {
return project.workspaces.length === 1;
return project.workspaces.length === 1 && project.projectKind !== "git";
}
export function buildSidebarProjectRowModel(input: {
@@ -50,9 +50,11 @@ export function buildSidebarProjectRowModel(input: {
};
}
const collapsible = input.project.workspaces.length > 1;
return {
kind: "project_section",
chevron: input.collapsed ? "expand" : "collapse",
chevron: collapsible ? (input.collapsed ? "expand" : "collapse") : null,
trailingAction: input.project.projectKind === "git" ? "new_worktree" : "none",
};
}