Skip to content

Project icons not persisting after restart (non-git projects) #24774

Closed as not planned

Description

@mHHwwgithub

Description

Environment

  • OpenCode Version: [请填写,如1.3.0]
  • OS: Windows 11 (win32)
  • Project Type: Non-git project (no .git directory)
  • Test Project: I:\porjectCode\LWDZ\wsdlToJava

Bug Description

项目图标在OpenCode Desktop中设置后,没有生效,回退到默认的字母头像。

Steps to Reproduce

  1. 打开OpenCode Desktop
  2. 打开一个非git管理的项目
  3. 右键项目 → Edit → 上传自定义图标 → 保存
  4. 观察图标显示正常
  5. 关闭并重启OpenCode Desktop
  6. 观察图标丢失,回退到字母头像

Expected Behavior

  • 自定义图标应该在重启后保持不变
  • 非git项目应该有独立的icon存储,不与其他项目共享

Actual Behavior

Related Issues

Additional Context

  • 已在项目根目录放置 favicon.png
  • 已设置 OPENCODE_EXPERIMENTAL_ICON_DISCOVERY=true
  • 项目不是git仓库(可能导致identity共享)
  • 已测试多个版本仍存在此问题

Suggested Fix

  1. 确保 project.update() 持久化 icon.override 到数据库(PR fix(opencode): persist project icon override in database #17807)
  2. 为非git项目生成基于路径的稳定ID,避免共享identity(Issue Project icons are incorrectly inherited by new projects #9087)
  3. 确保sidebar能正确读取 icon.url(favicon发现功能)

  1. 提交后,将issue链接回复给我,我可以帮你跟踪进展

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows11

Terminal

No response

Activity

  1. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The OpenCode version field contains unfilled placeholder text ([请填写,如1.3.0]) instead of the actual version number.
    • The Terminal field is left as _No response_ — please specify the terminal being used.
    • The description contains an AI-generated instruction at the end (提交后,将issue链接回复给我,我可以帮你跟踪进展) that appears to be a leftover prompt from an AI tool. Please remove it and ensure the issue content is written by you directly.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Apr 28, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktopwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions