[Bug] Project edit dialog does not persist name or icon changes (Windows Desktop v1.17.4)
Description
When editing a project's name or display image via the Edit dialog (right-click project in sidebar → Edit), clicking Save does not persist the changes. After restarting the desktop app, the project reverts to its original name and icon.
Environment
- OS: Windows 11
- OpenCode Desktop version: 1.17.4
- Database location:
%USERPROFILE%\.local\share\opencode\opencode.db
- App data location:
%APPDATA%\ai.opencode.desktop\
Steps to Reproduce
- Open OpenCode Desktop on Windows
- Right-click any project in the left sidebar
- Select "Edit"
- Change the project name
- Optionally upload a new icon image
- Click "Save"
- The name appears to update temporarily in the sidebar
- Restart the desktop app
- The project name reverts to the directory name; the custom icon is gone
Investigation Findings
Storage analysis
Project/workspace metadata is stored in two separate locations, neither of which is properly written by the Edit dialog's Save handler:
1. SQLite database (%USERPROFILE%\.local\share\opencode\opencode.db → project table)
Fields: id, worktree, name, icon_url_override, icon_color
Only a single entry (id='global', worktree='/') exists by default, with name=NULL. Per-project entries are never created for user workspace directories, even after editing via the UI.
2. Settings file (%APPDATA%\ai.opencode.desktop\opencode.global.dat)
This is a flat JSON key-value store (written via electron-store or similar). The key layout.page.workspaceName is an object mapping workspace directory paths to display names:
"layout.page": "{\"workspaceName\":{}}"
The workspaceName object is always empty {}, confirming the Save button does not write to this key.
Workaround tested
Manually editing the JSON data in global.dat to populate workspaceName does make custom names appear in the sidebar after restarting the app. However:
- The running app overwrites
global.dat during operation (confirmed via file byte comparison), so manual edits are short-lived
- This confirms the app reads from
layout.page.workspaceName for display, but the Edit dialog's save handler fails to write to it
Other findings
- The renderer logs show no errors related to saving project metadata
- The
server key in global.dat tracks workspace list (paths) but does not store names or icon references
- No icon-related storage key was found in
global.dat or the SQLite project table for user workspaces (only the global entry exists)
Expected Behavior
The Edit dialog should persist the project name to layout.page.workspaceName in global.dat (and icon to project.icon_url_override in the SQLite DB, or wherever the app expects it), so changes survive app restarts.
Actual Behavior
The Save button triggers no observable write to any storage location. Changes are silently lost on restart.
Additional Context
Similar issues were previously reported:
These were purportedly fixed by PR #28855 (fix(app): respect custom opencode project icons), but the issue persists in v1.17.4 on Windows.
[Bug] Project edit dialog does not persist name or icon changes (Windows Desktop v1.17.4)
Description
When editing a project's name or display image via the Edit dialog (right-click project in sidebar → Edit), clicking Save does not persist the changes. After restarting the desktop app, the project reverts to its original name and icon.
Environment
%USERPROFILE%\.local\share\opencode\opencode.db%APPDATA%\ai.opencode.desktop\Steps to Reproduce
Investigation Findings
Storage analysis
Project/workspace metadata is stored in two separate locations, neither of which is properly written by the Edit dialog's Save handler:
1. SQLite database (
%USERPROFILE%\.local\share\opencode\opencode.db→projecttable)Fields:
id,worktree,name,icon_url_override,icon_colorOnly a single entry (
id='global',worktree='/') exists by default, withname=NULL. Per-project entries are never created for user workspace directories, even after editing via the UI.2. Settings file (
%APPDATA%\ai.opencode.desktop\opencode.global.dat)This is a flat JSON key-value store (written via electron-store or similar). The key
layout.page.workspaceNameis an object mapping workspace directory paths to display names:The
workspaceNameobject is always empty{}, confirming the Save button does not write to this key.Workaround tested
Manually editing the JSON data in
global.datto populateworkspaceNamedoes make custom names appear in the sidebar after restarting the app. However:global.datduring operation (confirmed via file byte comparison), so manual edits are short-livedlayout.page.workspaceNamefor display, but the Edit dialog's save handler fails to write to itOther findings
serverkey inglobal.dattracks workspace list (paths) but does not store names or icon referencesglobal.dator the SQLiteprojecttable for user workspaces (only theglobalentry exists)Expected Behavior
The Edit dialog should persist the project name to
layout.page.workspaceNameinglobal.dat(and icon toproject.icon_url_overridein the SQLite DB, or wherever the app expects it), so changes survive app restarts.Actual Behavior
The Save button triggers no observable write to any storage location. Changes are silently lost on restart.
Additional Context
Similar issues were previously reported:
icon_url_overrideafter webview refreshThese were purportedly fixed by PR #28855 (
fix(app): respect custom opencode project icons), but the issue persists in v1.17.4 on Windows.