Skip to content

Fix project rename to update titles#12461

Open
franknoirot wants to merge 6 commits into
mainfrom
franknoirot/fix-rename-project
Open

Fix project rename to update titles#12461
franknoirot wants to merge 6 commits into
mainfrom
franknoirot/fix-rename-project

Conversation

@franknoirot

@franknoirot franknoirot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

We've gotten bug reports with our new cloud syncing behavior on desktop since #12374, which made a change to what a project's "title" is. Previously the title was just the directory name, but with the introduction of cloud projects which have a UUID as the identifier and the title as a metadata item in project.toml, we have made those notions split. But that work was not completed: the "rename project" command and some syncing logic could show the user a UUID in the command palette, which is the directory name for cloud-synced projects, and apply the rename to their directory name instead of that title metadata.

This PR cleans up those remaining mixed notions by splitting "title" from "directory name" in project commands and Home UI flows. While doing that, it also fixes two adjacent issues that made the split user-visible: create-project now derives a filesystem-safe directory from the requested title while preserving the user-facing title, and project settings writes now preserve top-level project.toml metadata instead of dropping fields like title, default_file, and cloud.

Summary

  • display project titles in command project pickers while submitting stable directory identifiers
  • make project rename update the project title in project.toml instead of renaming the directory
  • default project command options to the currently open project where applicable
  • derive new project directory names from project titles, while preserving title casing when a collision suffix is applied
  • preserve top-level project.toml metadata (title, default_file, cloud) when project settings are rewritten
  • keep duplicate checks, user-facing errors, and affected Playwright helpers aligned around title-vs-directory behavior

Verification

  • npm run test:unit -- src/lib/projectTomlMetadata.test.ts src/lib/desktop.test.ts src/lib/projectName.test.ts
  • npm run test:integration -- src/lib/commandBarConfigs/projectsCommandConfig.spec.ts
  • npm run tsc
  • npm run lint
  • npm run tronb:vite:dev
  • npm run test:e2e:desktop -- --grep="project title case sensitive duplication"

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
modeling-app Ready Ready Preview, Comment Jul 15, 2026 10:10pm

Request Review

@franknoirot franknoirot marked this pull request as ready for review July 15, 2026 19:41
@franknoirot franknoirot requested a review from a team as a code owner July 15, 2026 19:41

@pierremtb pierremtb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good. Testing on Vercel too. Testing on Desktop then will approve

Comment on lines +88 to 91
/** New human-facing project title to write to project.toml. */
requestedProjectName: string
/** Existing local project directory name used as the stable identifier. */
projectName: string

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments are helpful because these props aren't hahaha

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah haha sorry I wanted to limit the blast radius by not changing the property names everywhere, but we must name these better in the next iteration of systemIO.

Comment on lines +608 to +609
oldName: projectDirectoryName,
newName: projectDirectoryName,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sus?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. Those are just the name in the FS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah "name" as a term has to die so at least this says it's the directory name.

Comment on lines +97 to +98
requestedProjectName: 'my-cool-project',
requestedProjectTitle: 'My Cool Project!',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhh yes we unix fam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants