diff --git a/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx b/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx
index 8995013cb751..5b77fe342a48 100644
--- a/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx
+++ b/apps/desktop/src/app/chat/sidebar/projects/project-menu.tsx
@@ -24,7 +24,7 @@ import {
openProjectRename,
revealPath,
setActiveProject,
- updateProject
+ setProjectAppearance
} from '@/store/projects'
import type { SidebarProjectTree } from './workspace-groups'
@@ -110,6 +110,26 @@ export function ProjectMenu({
}
}
+ // Appearance writes route through the adopt-aware helper: an auto project is
+ // materialized on its first change (its id then changes), so close the picker
+ // when that happens to avoid a second write double-creating from a stale node.
+ const applyAppearance = (patch: { color?: null | string; icon?: null | string }) => {
+ void setProjectAppearance(project, patch).then(adopted => {
+ if (adopted) {
+ setAppearanceOpen(false)
+ }
+ })
+ }
+
+ // Set color / pick an icon — shown for explicit projects and for auto ones
+ // (where selecting adopts the repo as a real project so the look sticks).
+ const appearanceItem = (
+ setAppearanceOpen(true)}>
+
+ {p.menuAppearance}
+
+ )
+
const trigger = (