Skip to content

Conversation

@rsbh
Copy link
Member

@rsbh rsbh commented Dec 4, 2025

Summary

This PR removes the name field from the project creation form.

Changes

The name will be auto-generated from the title, and a hash from the org ID will be added as a suffix.
Due to this.

  1. Projects with the same title can be created in different organizations.
  2. Projects with the same title can't be created in the same organization.

Technical Details

We are using the djb2 hashing algorithm to generate a hash from the string.
The error capture has been moved from onError to catch block TanStack/query#1784

Test Plan

  • Manual testing completed
  • Build and type checking passes

@vercel
Copy link

vercel bot commented Dec 4, 2025

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

Project Deployment Preview Comments Updated (UTC)
frontier Ready Ready Preview Comment Dec 4, 2025 10:22am

@rsbh rsbh changed the title Feat sdk remove project name feat(sdk): remove name from project create Dec 4, 2025
);
const slug = slugify(data.title, { lower: true, strict: true });
const suffix = generateHashFromString(organization.id);
const name = `${slug}-${suffix}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should name the var slug instead of name.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 19925604353

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.644%

Totals Coverage Status
Change from base Build 19923395450: 0.0%
Covered Lines: 15691
Relevant Lines: 41683

💛 - Coveralls

if (error instanceof ConnectError && error.code === Code.AlreadyExists) {
setError('title', {
message:
'A project with a similar title already exist. Please tweak the title and try again.'
Copy link
Contributor

@paanSinghCoder paanSinghCoder Dec 4, 2025

Choose a reason for hiding this comment

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

similar vs same?

I think same should be the copy. A Project with the same title already exists. or A Project with the title already exists. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

The slug is in lower case.
So Title and title will create same slug

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.

4 participants