Skip to content

Custom project icons disappear on page refresh when many projects have icons set #22360

Closed

Description

@JtMotoX

Description

When I have many projects (11 in my case) and set custom icons for 8 of them, only 7 retain their icons after a page refresh. The 8th icon always reverts to the default letter avatar.

If I re-add the icon for the missing project and refresh again, that one persists but a different project's icon disappears instead. It behaves like a game of whack-a-mole -- there seems to be a hard ceiling around 7 custom icons that can survive a refresh.

Likely cause: Custom project icons (the override field set when a user uploads an image) are not persisted to the backend database. The database schema only stores the auto-discovered favicon URL and the avatar color, but the user-uploaded icon image is only kept in the browser's localStorage as a base64-encoded data URL. These data URLs are large (tens to hundreds of KB each), and when enough of them accumulate, localStorage hits its quota limit (~5-10MB). The app's storage layer handles quota errors by evicting the largest existing entries to make room -- which are other project icons. This creates the circular behavior where saving one icon causes another to be silently removed.

The fix would be to persist the user-uploaded icon to the backend database so it doesn't rely on browser storage with quota limits.

Plugins

None

OpenCode version

v1.4.2

Steps to reproduce

  1. Open the web UI with 8+ projects in the sidebar
  2. Edit each project and upload a custom icon image for at least 8 of them
  3. Refresh the page
  4. Observe that one of the icons has reverted to the default letter avatar
  5. Re-add the missing icon and refresh again
  6. A different project's icon has now disappeared

Screenshot and/or share link

N/A

Operating System

Linux

Terminal

N/A (Web UI)

Activity

  1. github-actions commented on Apr 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

    • Desktop: custom project icon lost after restart #17801: Same root cause — custom project icons are not persisted to the backend database and rely on local storage, causing icons to disappear after restart/refresh. That issue is specific to the desktop app, but the underlying cause (missing icon_override persistence) appears identical.
  2. JtMotoX commented on Apr 14, 2026

    @JtMotoX
    Author

    Closing this out -- after resizing my icons down to 128x128 pixels before uploading, the file sizes were small enough that the base64 data URLs no longer overflow localStorage. All 8 icons now persist across refreshes.

    That said, the underlying issue still exists: user-uploaded icons are only stored in localStorage rather than the backend database, so users with larger images or more projects will hit this same ceiling. But the 128px workaround is good enough for my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

webRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions