diff options
| author | Brendan Allan <[email protected]> | 2026-04-28 19:37:40 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-04-28 19:37:40 +0800 |
| commit | aa07f38b0708f306a25d55db8d2123498958f578 (patch) | |
| tree | c37e47702e7140d93ea6fe8034760fd6608088ae /packages/app | |
| parent | 9d1f17d83671fe2674ebbe31005e16bfaec12acc (diff) | |
| download | opencode-aa07f38b0708f306a25d55db8d2123498958f578.tar.gz opencode-aa07f38b0708f306a25d55db8d2123498958f578.zip | |
fix(app): preserve per-workspace icon override from localStorage (#24738)
Co-authored-by: Andrew Avsenin <[email protected]>
Diffstat (limited to 'packages/app')
| -rw-r--r-- | packages/app/src/context/layout.tsx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/app/src/context/layout.tsx b/packages/app/src/context/layout.tsx index 97d9cacbb..cacc875c5 100644 --- a/packages/app/src/context/layout.tsx +++ b/packages/app/src/context/layout.tsx @@ -391,7 +391,14 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext( ? globalSync.data.project.find((x) => x.id === projectID) : globalSync.data.project.find((x) => x.worktree === project.worktree) - return { ...metadata, ...project } + // Preserve local icon override from per-workspace localStorage cache (childStore.icon). + // Without this, different subdirectories of the same git repo would share the same + // icon from the database instead of using their individual overrides. + const base = { ...metadata, ...project } + if (childStore.icon) { + return { ...base, icon: { ...base.icon, override: childStore.icon } } + } + return base } const roots = createMemo(() => { |
