You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Edit Project: icon/color changes not persisted to database for projects without independent records #37345
When editing a project's icon or color through the Edit Project modal in the Desktop app, the changes are not saved to the project table in the SQLite database if the project does not have an independent record (i.e., its id is "global" or empty). The data is written only to the local workspace file (opencode.workspace.*.dat), which the sidebar does not read for display purposes. As a result, the user sees no visual change in the sidebar after saving.
I dug into the app.asar and found this in the save handler:
if (props.project.id && props.project.id !== "global") {
// Has independent DB record → writes to `project` table
await serverCtx().sdk.client.project.update({...});
} else {
// No independent DB record → writes only to workspace file
serverCtx().sync.project.meta(props.project.worktree, {...});
}
Projects that don't yet have an independent record in the project table (those falling back to the global row) always take the else branch. The resulting data is stored in opencode.workspace.*.dat — but the sidebar rendering layer does not read icon/color metadata from workspace files. It reads from the project table. Therefore, any changes are invisible.
Only projects that already have an independent row in the project table (e.g., created in earlier OpenCode versions before this behavior was introduced) will persist icon/color changes correctly.
Steps to Reproduce
Open OpenCode Desktop on a workspace-style project that does not have its own row in the project table (most projects fall into this category).
Click the project name → Edit Project.
Change the project icon and/or accent color → Save.
Observe: the sidebar icon and color do not update.
Expected Behavior Editing a project's icon or color should persist to the database (or the sidebar should be updated to read from workspace files) so that the change is immediately visible in the sidebar.
Workaround Directly manipulate the SQLite database:
Database: opencode.db → project table
UPDATE project SET icon_url = NULL, color = NULL WHERE id = 'global';
After restarting the app, the sidebar will reflect the database values.
The description appears to be AI-generated (highly structured, formal language, reverse-engineered code with precise variable names from bundled output, Option A/B fix framing). Long, AI-generated walls of text are not acceptable per our contributing guidelines. Please rewrite this in your own words describing what you actually observed.
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:
Thank you for updating the issue! The description is now clear and specific, with steps to reproduce and environment info. The needs:compliance label has been removed. We appreciate you taking the time to revise it.
Hi @yiyinideshang, I'm experiencing a very similar "Edit Project save not taking effect" issue, and I'd like to add a reproduction from a different runtime mode and platform that may help isolate the root cause.
Runtime mode: opencode web (web UI, not the Desktop Electron client)
Project type: Local directory project already present in the opencode project list, without an independent project table record (likely falling back to the global row)
Right-click the target project in the project list -> Edit Project.
Change the project name to a new value and click Save.
Re-open the dialog - the name has reverted to the original value.
The icon/color shows the same behavior: selecting a new accent color -> Save -> reopen dialog shows no selection / reverts to default.
Relation to the analysis in this issue
The save-branch logic described here - if (props.project.id && id !== "global") { ...project.update(...) } else { sync.project.meta(worktree, {...}) } - matches my observation closely: my project falls into the "no independent project table record, falls back to global row" category, so it takes the else branch and writes to the workspace .dat file rather than the project table in opencode.db.
I can also confirm the three points raised in #32691:
No error is surfaced in the UI when saving (consistent with a missing onError on the mutation, silently swallowing API errors).
The icon color appears to be submitted as "" rather than an omitted field, resulting in no selected state on the next dialog open.
No immediate UI refresh after save, as if relying on a delayed SSE event.
Independent confirmation on Windows, ruling out a macOS-only trigger.
My configuration has multiple providers and plugins; reproduction under this setup helps rule out "only reproducible with minimal default config".
Debug info I can provide (sanitized before sharing)
Browser DevTools Network/Console capture of the Save request/response (request body fields, HTTP status, response body - can directly determine whether the backend receives the name/color fields).
Sanitized excerpts from opencode.workspace.<hash>.dat and opencode.global.dat.
Minimal screenshots of the reproduction, if needed.
Would it be helpful if I prioritize the Network request logs, to distinguish between "backend received but did not persist" (#37345 direction) versus "request silently failed" (#32691 direction)?
This also relates to #32691 and #38478; happy to move or consolidate if maintainers prefer a single tracker.
Thanks to the maintainers for the ongoing fixes, and thanks @yiyinideshang for the detailed analysis.
OpenCode Desktop v1.18.21 (installed from opencode-desktop-linux-x86_64.rpm)
App data dir: ~/.config/ai.opencode.desktop/
What happens
Changing a project color via "Edit Project" saves without any error, but the project list keeps showing the default gray. All projects look identical.
Evidence (matches this report exactly)
~/.local/share/opencode/opencode.db → table project contains only the global row (worktree="/", empty name, empty icon_color); project_directory is empty. None of my projects have an independent record.
~/.config/ai.opencode.desktop/opencode.workspace.*.dat → the color IS persisted, e.g. "workspace:project":"{\"value\":{\"icon\":{\"color\":\"mint\"},...}}" and another with "green". So the value is written to the workspace file (the else branch), while the sidebar reads from the project table and never shows it.
So the colors are not lost — they are written to the workspace .dat files but never rendered, same root cause described above. Happy to provide logs or the exact .dat/DB contents if useful.
Closing as a duplicate of #32708, which tracks the Edit Project dialog not saving custom icons, colors and names for local projects. Please follow and 👍 there.
Activity
github-actions commentedon Jul 16, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
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.
github-actions commentedon Jul 16, 2026
Thank you for updating the issue! The description is now clear and specific, with steps to reproduce and environment info. The needs:compliance label has been removed. We appreciate you taking the time to revise it.
cgartlab commentedon Aug 12, 2026
Hi @yiyinideshang, I'm experiencing a very similar "Edit Project save not taking effect" issue, and I'd like to add a reproduction from a different runtime mode and platform that may help isolate the root cause.
Environment
opencode-ai@1.18.15)@opencode-ai/plugin@1.16.2opencode web(web UI, not the Desktop Electron client)projecttable record (likely falling back to theglobalrow)oh-my-opencode-slim+ TUI plugin. Storage:~/.local/share/opencode/opencode.db(SQLite, WAL mode).Steps to reproduce
opencode weband open the web UI.The icon/color shows the same behavior: selecting a new accent color -> Save -> reopen dialog shows no selection / reverts to default.
Relation to the analysis in this issue
The save-branch logic described here -
if (props.project.id && id !== "global") { ...project.update(...) } else { sync.project.meta(worktree, {...}) }- matches my observation closely: my project falls into the "no independent project table record, falls back to global row" category, so it takes theelsebranch and writes to the workspace.datfile rather than theprojecttable inopencode.db.I can also confirm the three points raised in #32691:
onErroron the mutation, silently swallowing API errors).""rather than an omitted field, resulting in no selected state on the next dialog open.Why this reproduction is useful
opencode webmode. All existing reports in Edit Project: icon/color changes not persisted to database for projects without independent records #37345, Project display name changes ignored in NewLayout (v1.18.x) #38478, and Edit Project dialog name/color changes fail to save properly #32691 come from the Desktop client. If the web UI reproduces it too (as it does here), the root cause lives in the shared backend persistence layer rather than Desktop-specific rendering/sync paths.Debug info I can provide (sanitized before sharing)
name/colorfields).opencode.workspace.<hash>.datandopencode.global.dat.Would it be helpful if I prioritize the Network request logs, to distinguish between "backend received but did not persist" (#37345 direction) versus "request silently failed" (#32691 direction)?
This also relates to #32691 and #38478; happy to move or consolidate if maintainers prefer a single tracker.
Thanks to the maintainers for the ongoing fixes, and thanks @yiyinideshang for the detailed analysis.
bacca87 commentedon Aug 21, 2026
Same issue here on Linux, confirmed on v1.18.21.
Environment
opencode-desktop-linux-x86_64.rpm)~/.config/ai.opencode.desktop/What happens
Changing a project color via "Edit Project" saves without any error, but the project list keeps showing the default gray. All projects look identical.
Evidence (matches this report exactly)
~/.local/share/opencode/opencode.db→ tableprojectcontains only theglobalrow (worktree="/", emptyname, emptyicon_color);project_directoryis empty. None of my projects have an independent record.~/.config/ai.opencode.desktop/opencode.workspace.*.dat→ the color IS persisted, e.g."workspace:project":"{\"value\":{\"icon\":{\"color\":\"mint\"},...}}"and another with"green". So the value is written to the workspace file (theelsebranch), while the sidebar reads from theprojecttable and never shows it.So the colors are not lost — they are written to the workspace
.datfiles but never rendered, same root cause described above. Happy to provide logs or the exact.dat/DB contents if useful.neriousy commentedon Oct 1, 2026
Closing as a duplicate of #32708, which tracks the Edit Project dialog not saving custom icons, colors and names for local projects. Please follow and 👍 there.