t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Bug]: Renaming projects removing the grouping part but keeping the repo name does not saves and keeps the original name

Open alanmoyano opened this issue 1 month ago • 14 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/web

Steps to reproduce

  1. Have a project on multiple machines so grouping works
  2. Try to delete the first part of the name, including repo author or groups in gitlab
  3. Leave the repo name as-is

Expected behavior

The project should be able to renamed

Actual behavior

The project does not applies the rename

Impact

Minor bug or occasional failure

Version or commit

0.0.46-nightly.20261003.2610 (8ed276c246b6)

Environment

macOS 27.0.1

Logs or stack traces


Screenshots, recordings, or supporting files

Grabación de pantalla 2026-10-03 a la(s) 02.32.54.mov Grabación de pantalla 2026-10-03 a la(s) 02.31.34.mov

Workaround

No response

alanmoyano avatar Oct 03 '26 05:10 alanmoyano

[!NOTE] Grok responding on behalf of Julius.

Triage

Thanks for the report and the recordings, @alanmoyano.

Confirmed, and still present on main. For grouped projects (ones with more than one checkout), the sidebar and settings don't show the stored title directly. deriveProjectGroupLabel only counts a shared title as custom when it differs from both the repository display path and the repository name. Otherwise it falls back to repositoryIdentity.displayName, the path under the host: pingdotgg/t3code on GitHub, or group/subgroup/repo on GitLab.

The default title is the folder name, which is usually the repository name. So when you delete the owner or group prefix and keep just the repo name, you end up with exactly the value the label logic ignores, and it snaps back to the full path. The settings field remounts from that derived label, so it reverts there too. Any other name, like t3code2, sticks.

A second check affects the same edit. If every member's title already equals the repo name, projectGroupTitleNeedsUpdate skips the write entirely. And if a different name was saved earlier, the write goes through but the label still falls back to the display path.

The fallback exists so that a default folder title doesn't replace owner/repo in the sidebar. The bug is that it also blocks an explicit rename to the plain repository name. Mobile uses the same label helper, so it's affected as well. #7510 and #7831 fixed an earlier version of this, but that fix didn't cover renaming to exactly the repository name.

juliusmarminge avatar Oct 03 '26 05:10 juliusmarminge

Still reproducible on macOS with 0.0.46-nightly.20261013.3066. Renaming a grouped project from owner/repo to repo restores the org prefix. Using Repo instead persists and removes the prefix.

Djis247 avatar Oct 13 '26 22:10 Djis247

I hit this today on the current nightly with a project that has two checkouts, and I've opened a fix in #23074.

Following the triage above, it keeps the default and honors explicit renames. The server now records when a project's title was set by hand. Grouped labels use the shared title whenever someone has renamed it, and groups nobody renamed still show owner/repo. The settings field also saves a rename even when the folder titles already match, which was the second cause noted in the triage.

The PR has before/after screenshots and replaces #15212, which was closed for its model.

mackinleysmith avatar Oct 21 '26 20:10 mackinleysmith

Reproduced on Linux web dev at b5a226e49c, with isolated state and two local checkouts sharing an acme/demo origin. In Settings → Project, changing acme/demo to demo and blurring leaves the group label unchanged; reload restores acme/demo in the field. A different name, demo-custom, does update the group label.

Recording: rename, blur, reload. Cross-machine and native macOS behavior were not checked. Existing contributor fix: #23074.

juliusmarminge avatar Oct 22 '26 01:10 juliusmarminge

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of DominikScholz

This also reproduces across machines, which the repro above didn't cover. One GitHub repository is added as a project on two separate T3 Code environments. Both projects have the stored title repo and the same repository identity, and the grouped row shows owner/repo. Projects that exist on only one environment show their plain title. Same cause as the triage: the stored title equals the repository name, so deriveProjectGroupLabel falls back to the display path.

The current fix is #25244 (takes over #23074). CI is green, Macroscope approved it, and it was verified end to end on 2026-10-28. It is now conflicting with main only because its new migration is numbered 070_ProjectionProjectsCustomTitle, and main already has migrations 070 to 072. The conflicts are in apps/server/src/persistence/Migrations.ts and reconcileV2PreviewMigration.test.ts. Renumbering it to 073 should be all it needs before review.

DominikScholz avatar Oct 28 '26 22:10 DominikScholz

Also hitting this on 0.1.3 (Linux server). My project entity/charliej.com won't rename to charliej.com and keeps reverting to entity/charliej.com. Other names like hi or charliej.co stick fine. Looking forward to #23074 landing.

entity avatar Oct 28 '26 23:10 entity

[!NOTE] Written by Claude Opus 5.5

Still reproduces on v0.1.6 (desktop, Windows 11), across machines. One GitHub repo is a project on this machine and on a linked Linux environment. Both projects have the stored title Repo, which is the repository name, and the combined sidebar row shows Org/Repo. The rename from settings does save on both machines (both projects' updatedAt changes), but the sidebar label still shows the owner. Same cause as the triage above. Waiting on #25244.

quentinleon avatar Nov 02 '26 09:11 quentinleon

Seems https://github.com/pingdotgg/t3code/pull/25244 is the fix for this, should probably be linked to auto close on merge? @juliusmarminge

entity avatar Nov 02 '26 17:11 entity

Additional report from a Linux x64 environment running server 0.1.3-nightly.20261023.3592: removing the GitHub owner from the grouped project name causes it to return in both the sidebar and Project settings. Reading the project through T3's project service confirms the stored title is already t3-obsidian.

I checked deriveProjectGroupLabel at upstream commit a03648901640. Direct execution of that source function with two members sharing the same repository identity gives:

Repository display name: owner/t3-obsidian
Repository name:         t3-obsidian

Both stored titles = t3-obsidian  -> group label = owner/t3-obsidian
Both stored titles = T3 Obsidian  -> group label = T3 Obsidian

The shared-title check explicitly excludes titles equal to repositoryIdentity.name, then falls back to the qualified repository display name. This means an explicit rename to exactly the repository name cannot produce the requested label, even when every stored title agrees.

Workaround: set the same custom name on every member of the group, such as T3 Obsidian. We applied that through T3's project service and verified the saved titles and resulting label calculation.

Expected behavior: an explicit rename to the plain repository name should remain visible in both the sidebar and Project settings.

The UI symptom is user-reported; the additional checks here verify persisted project settings and the upstream label function, not a fresh end-to-end run of the latest client.

kiriwtf avatar Nov 02 '26 23:11 kiriwtf

Still reproducible in T3 Code (Beta) 0.1.6 on macOS, with the same repository registered in two environments.

AndreaBarghigiani avatar Nov 03 '26 05:11 AndreaBarghigiani

Still present on 0.1.7. A project grouped from two checkouts of the same GitHub repo shows owner/repo in the sidebar. Renaming it to the repo name saves the title on every member, but the label does not change, because Xt / deriveProjectGroupLabel in projectGrouping treats a shared title equal to the repo name as not custom. A name different from the repo name (for example a different letter case) is shown.

doasfrancisco avatar Nov 05 '26 09:11 doasfrancisco

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of CubityFirst

Still present on 0.1.8-nightly.20261105.4234 (commit 8b570d2), Windows 11 desktop app. The fix PR #23074 was closed without merging, so nothing currently tracks a fix.

  • Grouped project (sidebar grouping mode repository), one checkout on this machine and the other presumably on a linked remote machine. The stored title already equals the repository name. The sidebar and settings show owner/repo, and renaming to repo doesn't stick.
  • At 8b570d2, and unchanged on main, deriveProjectGroupLabel (packages/client-runtime/src/state/projectGrouping.ts:201) skips a shared title equal to the repository name. projectGroupTitleNeedsUpdate (apps/web/src/components/settings/ProjectSettingsPanel.logic.ts:12) then skips the write because every member title already equals the repository name. Both causes from the triage above apply.
  • Workaround: any other name, such as Repo (different capitalisation), sticks.

Found with the in-app triage flow.

CubityFirst avatar Nov 05 '26 21:11 CubityFirst

Also hitting this on 0.1.7 (macOS desktop) with an Azure DevOps repo, where the fallback is worse than owner/repo. The project exists in two environments, both titled with the repository name <repo>. The grouped label in the sidebar and in Settings → Project is <org>/<project>/_git/<repo>, because the Azure DevOps path includes the project and _git segments. Renaming to <repo> doesn't stick. A name that differs from the repo name, even just in letter case, does.

Drafted with Claude Opus 5.5 (Claude Code) on behalf of @lingolooper-simon.

lingolooper-simon avatar Nov 07 '26 20:11 lingolooper-simon

Additional report of a similar rename problem, involving a full filesystem path rather than a repository owner/group prefix:

  1. Have an existing project whose label in the UI shows its full folder path, for example /path/to/my-project (illustrative path).
  2. Rename the project to just the folder name, my-project.
  3. The UI still shows the full path instead of the requested name.
  4. Rename it to a different custom name. This works and the UI displays that custom name.
  5. Rename it back to the folder name, my-project. The UI displays the full path again.

Expected: Renaming a project to its folder name should display that exact name, just as renaming it to any other custom name does.

Actual: The folder name specifically causes the label to fall back to the full path. Other custom names work.

There are no other projects with the same folder name in this case. The behavior feels like unnecessary duplicate-name disambiguation, but that is only a suspicion, not a confirmed cause. Unlike the original report, this report does not establish a multiple-machine setup as a prerequisite.

xixixao avatar Nov 10 '26 15:11 xixixao