Skip to content

[Bug] Project edit dialog does not persist name or icon changes (Windows Desktop v1.17.4) #32164

Description

@aska486

[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

  1. Open OpenCode Desktop on Windows
  2. Right-click any project in the left sidebar
  3. Select "Edit"
  4. Change the project name
  5. Optionally upload a new icon image
  6. Click "Save"
  7. The name appears to update temporarily in the sidebar
  8. Restart the desktop app
  9. 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.dbproject 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions