[PR #6757] Desktop: Edit Project Fix #12088

Closed
opened 2026-02-16 18:17:01 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6757

State: closed
Merged: Yes


Root Cause: The enrich function in packages/app/src/context/layout.tsx was matching projects by comparing worktree paths. When a user picks a directory (e.g., /Users/user/project/src), but the server resolves the git root to a different path (e.g., /Users/user/project), the paths don't match. Without a match, the project's id wasn't populated, and the handleSubmit function returned early when !props.project.id.

Fix: Modified the enrich function to first look up the child store for the directory (which contains the server-resolved project ID from project.current()), and use that ID to find the project metadata. Only falls back to worktree matching if the ID isn't available yet.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6757 **State:** closed **Merged:** Yes --- Root Cause: The enrich function in packages/app/src/context/layout.tsx was matching projects by comparing worktree paths. When a user picks a directory (e.g., /Users/user/project/src), but the server resolves the git root to a different path (e.g., /Users/user/project), the paths don't match. Without a match, the project's id wasn't populated, and the handleSubmit function returned early when !props.project.id. Fix: Modified the enrich function to first look up the child store for the directory (which contains the server-resolved project ID from project.current()), and use that ID to find the project metadata. Only falls back to worktree matching if the ID isn't available yet.
yindo added the pull-request label 2026-02-16 18:17:01 -05:00
yindo closed this issue 2026-02-16 18:17:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12088