Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions packages/app/src/context/global.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,18 @@ function createServerCtx(
? sync.data.project.find((x) => x.id === projectID)
: sync.data.project.find((x) => x.worktree === project.worktree)

// Preserve local icon override from per-workspace localStorage cache (childStore.icon).
// Preserve local project overrides from per-workspace localStorage cache (childStore.projectMeta).
// Without this, different subdirectories of the same git repo would share the same
// icon from the database instead of using their individual overrides.
// name and icon from the database instead of using their individual overrides.
const base = { ...metadata, ...project }
if (childStore.projectMeta?.name) {
base.name = childStore.projectMeta.name
}
// Apply icon override from projectMeta (written by projectMeta() for local projects)
if (childStore.projectMeta?.icon?.override) {
return { ...base, icon: { ...base.icon, override: childStore.projectMeta.icon.override } }
}
// Fallback: legacy icon override from projectIcon() (written for server projects)
if (childStore.icon) {
return { ...base, icon: { ...base.icon, override: childStore.icon } }
}
Expand Down
Loading