[Bug]: Project icon is missing from the thread header when a project has a second checkout#31305
Note
Claude Opus 5.5 commenting on behalf of Pedro.
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Add a project, for example
~/src/myrepo, and give it a custom icon in Project settings (I used a Lucide icon). - Later, add a second checkout of the same repository, for example
~/myrepo. The sidebar groups the two under one entry, which still shows the custom icon. - Start a new thread in that group so the draft lands in the second checkout.
- Look at the chat header breadcrumb.
Expected behavior
The breadcrumb shows the project's custom icon, the same one the sidebar group shows.
Actual behavior
The breadcrumb shows the automatic monogram ("SS" for a project called SlopSubs), because the second checkout has no icon of its own.
The icon was saved only on the checkout that existed at the time. The second checkout was created with projectIcon: null. Later group edits write only the changed field to each member: a rename reached both checkouts, but the icon never did. The two views then read different sources:
- The sidebar group takes its icon from its representative member (
apps/web/src/sidebarProjectGrouping.ts,buildSidebarProjectSnapshots). - The chat header reads the thread's own project (
useProject(activeProjectRef)inChatView.tsx, rendered byProjectFaviconinChatHeader.tsx).
Other views that show a single project's icon, such as sidebar thread rows and command palette subtitles, probably show the same mismatch. I haven't checked them.
Possible fixes: copy the group's icon (and title) to a checkout when it joins an existing group, or have single-project views use the group's identity. The first fixes the data at its source, but projects that are already out of sync stay that way until their icon is saved again.
Impact
Cosmetic issue. Nothing breaks: threads run normally, and only the icon is wrong.
Version or commit
main @ 67eebaca23
Workaround
Open Project settings for the group and save the icon again. The group update writes it to every checkout.