feat: configurable logical project keying
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
-
Clone the same repo into multiple folders: git clone [email protected]:octocat/Hello-World.git hello-world1 git clone [email protected]:octocat/Hello-World.git hello-world2 git clone [email protected]:octocat/Hello-World.git hello-world3
-
Open T3 Code.
-
Add/open all three folders as projects:
- hello-world1
- hello-world2
- hello-world3
Expected behavior
Three separate project entries appear in the sidebar.
Actual behavior
They collapse into a single project entry.
Impact
Blocks work completely
Comment
The sidebar is using the repo’s git remote to decide whether two projects are the same. As a result, multiple local folders cloned from the same repo can get merged into one sidebar entry even though they are different directories.
Introduced in "Implement server auth bootstrap and pairing flow"(#1768)
Seems to be related to #1902 with the same root cause
Here's my general directory structure. My home itself is a heavily-gitignored repo: /Users/<username>, and I have a number of projects in subdirs that it doesn't track:
~/production/<project_a># git repo~/production/<project_b># git repo~/production/<project_c># git repo
Expected
- able to add
/Users/<username>as a t3code project - able to add subdir project as a t3code project
- individual entries for both
Actual
- some (not all?) of my projects merged into my home project (threads mis-ID'd because of git nesting?)
This seems related, but I'm not sure. It's possible that this behavior existed on v0.0.15, but I'm now on v0.0.17
EDIT
Sorry, this was unrelated. In my case, my projects were merging in t3code simply because I was trying to track:
~/subdir# NOT a git repo ...which was being merged with the higher-level git repo in my home directory.
This was not an issue with version 0.0.15, seems like regression in 0.0.17. Need to stop using T3 Code until this is fixed 😢
hmm this was kinda intentional with the introduction of multi-env. I personally want to have the same repo cloned on multiple machines all reference the same logical project in T3 Code.
I meant to make the logical grouping conditional so you can opt out. Didn't do it for the intitial release, but can work on it this week
Well that multi-env sounds like a useful feature. Though not for me as I only work on one machine.
So opt-out would be nice.
Say folder1 and folder2 have the same remote -
-
Aliasing issue: when I pick
main, it's unclear whichmainand working directory changes will be selected -
Selection issue: it's not possible to select any branches (and working changes) on folder2 anymore when starting a new thread, because it defaults to folder1
edit - maybe the bottom left "Current checkout" can have local folder selection?