anomalyco / anomalyco/opencode

Project display name changes ignored in NewLayout (v1.18.x)

Open
#38,478 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Jul 23, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Open a local project (e.g. /path/project)
Click project name → Edit → change name → Save
Restart app → name still shows folder name
Root cause analysis: There are two separate name-storage mechanisms that are out of sync:

A. layout.page.workspaceName in opencode.global.dat — used by LegacyLayout's workspaceName() function. Works correctly.
B. project.name in opencode.db SQLite project table — used by NewLayout's Home screen project list via loadProjectsQuery → sdk.project.list() → enrich().
In NewLayout, the ProjectIcon component renders names as:

const name = createMemo(() => props.project.name || getFilename(props.project.worktree));
The project.name comes from the server-side project SQLite table. Projects opened from local directories are added to the layout store with only {worktree, expanded}, without a corresponding project DB record. The enrich() function (createServerCtx) tries to find metadata by project ID or worktree, but when no DB record exists, name is undefined and falls through to getFilename().

The renameProject function for local/global projects calls serverSync().project.meta(worktree, {name}), which stores the name in workspace metadata (mechanism A), but NewLayout's Home screen reads from mechanism B only.

Suggested fix: Either:

Make NewLayout Home screen read workspaceName from layout.page (like LegacyLayout does), or
When renameProject saves via sync.project.meta(), also create/update the corresponding record in the project SQLite table.

Plugins

No response

OpenCode version

OpenCode Desktop v1.18.4, macOS

Steps to reproduce

Open a local project (e.g. /path/project)
Click project name → Edit → change name → Save
Restart app → name still shows folder name
Root cause analysis: There are two separate name-storage mechanisms that are out of sync:

A. layout.page.workspaceName in opencode.global.dat — used by LegacyLayout's workspaceName() function. Works correctly.
B. project.name in opencode.db SQLite project table — used by NewLayout's Home screen project list via loadProjectsQuery → sdk.project.list() → enrich().
In NewLayout, the ProjectIcon component renders names as:

const name = createMemo(() => props.project.name || getFilename(props.project.worktree));
The project.name comes from the server-side project SQLite table. Projects opened from local directories are added to the layout store with only {worktree, expanded}, without a corresponding project DB record. The enrich() function (createServerCtx) tries to find metadata by project ID or worktree, but when no DB record exists, name is undefined and falls through to getFilename().

The renameProject function for local/global projects calls serverSync().project.meta(worktree, {name}), which stores the name in workspace metadata (mechanism A), but NewLayout's Home screen reads from mechanism B only.

Suggested fix: Either:

Make NewLayout Home screen read workspaceName from layout.page (like LegacyLayout does), or
When renameProject saves via sync.project.meta(), also create/update the corresponding record in the project SQLite table.

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.