t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: the name of forks are the same title as the upstream repo

Open Project516 opened this issue 4 months ago • 8 comments

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/desktop

Steps to reproduce

  1. fork a repo and rename it something
  2. try to open both repos and the fork in t3code

Expected behavior

t3code will show the fork name different from the upstream repo

Actual behavior

t3code will call both the repo and its fork by the same name, making it hard to see if you are working on a fork or the actual repo

Impact

Blocks work completely

Version or commit

latest nightly ( T3 Code Nightly 0.0.32-nightly.20260729.951 (a8e05cbb9263) T3 Code Nightly 0.0.32-nightly.20260729.951 (a8e05cbb9263) Pre-release)

Environment

Fedora 44

Logs or stack traces


Screenshots, recordings, or supporting files

No response

Workaround

settings -> project grouping turn that off (thanks @Baker)

Project516 avatar Jul 29 '26 22:07 Project516

This is happening for me as well, and I won't lie has caused T3 Code to be unusable.

Examples:

Image Image

Baker avatar Aug 18 '26 00:08 Baker

@Project516 I found a workaround at least for my project, settings -> project grouping turn that off.

Baker avatar Aug 18 '26 00:08 Baker

@Project516 I found a workaround at least for my project, settings -> project grouping turn that off.

Works for me! Thanks!

Project516 avatar Aug 20 '26 00:08 Project516

I am still seeing confusing behavior on v0.0.37-nightly.20260829.1219.

Renaming the project to fleet saves correctly. The new name appears in Project settings and in the thread header. However, the project picker continues to show the repository-derived name, maximilianmauroner/....

Project settings describes this value as “The shared name for this project group in the sidebar and thread lists,” so I expected the project picker to use fleet as well. Showing two names for the same project makes it seem as if the rename only worked in some places, and it makes the project harder to find.

The project picker still shows the repository-derived name:

Project picker showing the repository-derived name

Project settings shows the saved name fleet:

Project settings showing the saved project name

The thread header correctly shows fleet:

Thread header showing fleet

MaximilianMauroner avatar Aug 29 '26 19:08 MaximilianMauroner

Checked current main bc8584bf on September 5, 2026 UTC, using the Linux web client and two disposable Git repositories.

The original same-label behavior still reproduces. With repository grouping enabled, an original checkout and a renamed fork with that repository as upstream form one group named upstream-owner/original. The draft header identifies the fork, but the draft selector uses the shared group name. Keeping this issue open. A display fix must preserve repository identity; the earlier review of #7686 explains why changing canonical identity is not a cosmetic fix.

The August 29 saved-rename variant did not reproduce in this check. I renamed the group to fleet through Project settings. Both checkouts received their normal metadata-update events and both stored titles became fleet. Without reloading, Settings, the draft selector, and the new-thread command palette all displayed fleet. The palette still targeted the renamed fork's path. No provider turn or manual database update was involved.

If the saved name still fails to reach a picker on a current build, please include the version/client, grouping mode, how many checkouts belong to the group, which picker is stale, and any save error. Mixed saved titles currently fall back to the repository label, so confirming every member's update matters.

This checks the shared Linux web/Git path, not the original Fedora 44 packaged Electron build or mobile.

Inspected screenshots from the disposable fixture

Before renaming, the fork header and shared group label differ:

Original fork-group label behavior

After the normal group rename, Settings:

Settings shows the saved group name fleet

Draft selector, without a reload:

Draft selector shows fleet after the group rename

New-thread command palette:

New-thread palette shows fleet

GPT 6 Astra via Codex in T3 Code.

juliusmarminge avatar Sep 05 '26 07:09 juliusmarminge

A narrower saved-name failure still reproduces when the requested project title equals the repository's short name. The September 5 check using fleet does not exercise this case.

Observed on macOS arm64, T3 Code Nightly 0.0.41-nightly.20260909.1439, with two checkouts of the same repository on local and remote environments and repository grouping enabled. Both stored project titles already contain the desired short name, but the project picker shows owner/name. Entering the short name in Settings > Projects > Name accepts the edit, then navigating away and back restores owner/name. No checkout removal is needed to reproduce.

A sanitized reproduction is:

  1. Register the same example/widget repository in two environments.
  2. Give both projects the title widget, with repository identity name: "widget" and displayName: "example/widget".
  3. Keep repository grouping enabled and open the project picker.
  4. In project settings, enter widget as the name and blur the input.

Expected: Settings, the picker, and thread groups use widget, with both checkouts still in the same group. Actual: the derived group label is example/widget even though both saved titles are widget.

I reproduced this in the shared grouping code on upstream main at d29c56a5. deriveProjectGroupLabel explicitly rejects a unanimous title when it matches a repository name or display name. Rewriting identical stored titles cannot repair that derivation. This remains distinct from the edit-tracking fix associated with #7510.

A minimal local fix makes a unanimous nonempty project title take precedence:

if (sharedTitles.length === 1 && sharedTitle !== undefined) {
  return sharedTitle;
}

This preserves repository identity and grouping keys. When stored titles disagree, the existing repository-label fallback remains. The visible tradeoff is that groups with unanimous default short titles now display those titles as single-checkout projects already do. No canonical-identity, remote URL, persistence-schema, or grouping-mode change is involved.

Verification: four regression cases failed before the fix. After the fix, 38 focused tests passed across shared grouping, the mobile home-thread list, and the web rename helper; scoped client-runtime typecheck, lint, and formatting passed. Tests cover both repository grouping modes, local/remote membership, rename round trips, differing titles, and separate repositories sharing the same short name.

The corrected logic is tested in an isolated source checkout; it has not been installed into the packaged desktop app or verified in a rebuilt native UI. The installed-app reproduction and source-test results are separate observations.

Analysis and verification: GPT-6 Astra through Codex, with two independent Cursor Auto read-only reviews. Cursor reported successful Auto requests without disclosing its underlying selected model.

andrewfree avatar Sep 10 '26 10:09 andrewfree

Retested this in T3 Code Nightly 0.0.41-nightly.20260911.1533 on macOS with Project grouping enabled.

After saving the project name as fleet, the new-thread header shows fleet, but the project picker still shows maximilianmauroner/fleet for the same project.

T3 Code showing the saved project name in the thread header and the repository-derived name in the project picker

Image Image

And it seems it does not get saved

This confirms that the saved-name mismatch is still reproducible on the current nightly.

MaximilianMauroner avatar Sep 11 '26 08:09 MaximilianMauroner

Same collision here, and it isn't fork-specific. It fires whenever the saved project name equals the repository short name.

Repro on 0.0.43-nightly.20260920.2031 (Linux):

  1. Add a project whose git remote is owner/owner, so the repository short name is owner
  2. Give that repo two checkouts (a normal clone plus a worktree is enough) so the entries group
  3. Set Settings -> Projects -> Name to owner
  4. Open the sidebar

Expected: the group reads owner. Actual: it reads owner/owner.

The derived label drops the shared title when it matches either the repository displayName (owner/repo) or name (repo short name), so it falls through to the owner/repo label. Renaming to anything that isn't the repo short name sticks, which is why fleet worked in the earlier check.

Workaround is the same project grouping toggle. No fork involved.

shunkakinoki avatar Sep 22 '26 04:09 shunkakinoki