fix (core): Multiple clones of same repo are different projects - #35311
fix (core): Multiple clones of same repo are different projects#35311belisoful wants to merge 27 commits into
Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found a related PR: Potential Related PR:
Note: PR #29977 ( The current PR (#35311) appears to be focused specifically on changing |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
…n a project unique keying from the repo.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
I did a GUI test to check that different clones of the same repo are separate "projects". I wanted to actually do a real test myself before submitting this PR. (Ed: Done; checked and confirmed working) We are seeing this issue re-listed over and over. |
|
The GUI side is now updated because it was keying from the repo-clone path. |
|
这个一个严重的BUG,为什么一个多月没有修复合并,你们脑子瓦特了吗? |
|
@lovesdo79 我完全同意! English: I couldn't agree more! |
|
到底什么时候能够修复这个大bug啊!!! |
|
i basically stopped using opencode desktop app because of this, would really love to go back if you guys is going to fix this bug |
|
@rifqi2320 Yesterday, when you posted, I had also just cancelled my $10/mo subscription to "OpenCode.ai Go" because of this bug! Synchronicity is awesome. Just wanted to add this... they are losing real money over this bug. The outrageous thing is that the Devs can click "merge" on this PR and the bug goes away... people start using OpenCode again. Let me "Update Branch" yet again. @lidaqi001 如果 OpenCode 不合并修复关键错误的重大 PR,它还能算得上是真正“开放”的吗?这个漏洞让他们蒙受了切实的经济损失。(如果翻译得很糟糕,还请见谅)
|
我完全同意你的说法, 并且感谢你的pr |
Add repoHash to the .git/opencode identity file, project table, and Project.Info: the legacy identity derivation (normalized remote hash, falling back to root commit), byte-identical to pre-UUID project ids. Migrated files reuse their existing legacy hash. Informational only — never used as identity — so UIs can group distinct clones of the same repository. No UI changes; the field reaches clients via the regenerated SDK types.
|
The repo hash is now included in the project json so the UI can sort and filter by repo, with projects for the repo (in different folders) listed separately. The DB is updated, and property linked into the UI. NO USER INTERFACE WORK. This PR is only the back end. |
Issue for this PR
Closes #17940 #19348 #29869 #29871 #29962 #29936 #29977 #30302 #31593 #31686 #31890 #32785 #32801 #33313 #33615 #42040
Type of change
What does this PR do?
This PR changes
.git/opencodefrom the hash of the repo name to json; with a version and UUID. This UUID per repo-clone (locally) satisfies work trees being keyed to their respective repo-clones and separating repo-clones from each other (locally).The file is automatically upgraded if the file is not json/UUID format. The upgrade path is automatic.
The GUI touches the project on open to ensure consistency.
Changing the path (or folder name) of a repo-clone keeps the same UUID. The project stops working in the GUI... when the new moved project is opened then the session and work trees are updated. The old project (and session data) is updated to the new path; with the old project sessions updated to the new project path-location.
How did you verify your code works?
Screenshots / recordings
N/A
Checklist