Skip to content

fix(app): persist local project renames in project list - #40390

Open
Chewji9875 wants to merge 3 commits into
anomalyco:devfrom
Chewji9875:fix-local-project-rename
Open

fix(app): persist local project renames in project list#40390
Chewji9875 wants to merge 3 commits into
anomalyco:devfrom
Chewji9875:fix-local-project-rename

Conversation

@Chewji9875

@Chewji9875 Chewji9875 commented Aug 4, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #31739

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

For projects without a server registration (id-less / "global" projects), the edit dialog writes the new name, commands, and icon to the per-workspace projectMeta cache. But enrich() in global.tsx and layout.tsx only merged the legacy childStore.icon override, so the renamed name and startup command were silently ignored in the project list.

This adds a mergeProjectMeta helper and applies it in both enrich() functions before the existing icon override. The enriched list is consumed by the sidebar, session tabs, command palette, and directory picker, so local renames now display everywhere. Server-registered projects keep their server values unless a local override exists.

How did you verify your code works?

  • Added unit tests for mergeProjectMeta: local name applied for id-less projects, server name kept when local has no name, empty name falls back to the folder-derived name, and icon + commands merge.
  • bun test src/context/global-sync/utils.test.ts: 11 pass (6 existing + 5 new), 0 fail.
  • bun typecheck in packages/app: 0 errors.
  • Confirmed a production desktop build (OPENCODE_CHANNEL=prod) renders the fix.

Screenshots / recordings

image

this is a display-logic fix on the enriched project list, not a visual UI change. Prior local renames appear once the app rebuilds with this change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@Chewji9875
Chewji9875 force-pushed the fix-local-project-rename branch from 5d50398 to 764cbd6 Compare August 4, 2026 10:19
@Chewji9875

Copy link
Copy Markdown
Author

Hi @Brendonovich @Hona,

Updating with additional context on related issues resolved by this PR:

This PR addresses and resolves the root causes for several reported issues related to local project renaming, Protocol v2 project metadata persistence, and worktree path resolution:

Whenever you have a moment to review, thank you!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: project edits (name, color, commands) don't persist for global/no-ID projects

1 participant