Skip to content

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

Closed as not planned

Description

@paeankaikai

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

Activity

  1. github-actions commented on Jul 23, 2026

    @github-actions
    Contributor

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

    If your issue is specifically about NewLayout vs LegacyLayout behavior introduced in v1.18.x, it may be worth noting that distinction on the most relevant existing issue rather than tracking separately.

  2. github-actions commented on Sep 23, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions