Skip to content

fix(sdk): forward existing project name in edit-project update#1607

Open
rohanchkrabrty wants to merge 1 commit into
mainfrom
fix-edit-project-failing
Open

fix(sdk): forward existing project name in edit-project update#1607
rohanchkrabrty wants to merge 1 commit into
mainfrom
fix-edit-project-failing

Conversation

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

Summary

  • Edit-project dialog was sending only title in UpdateProjectRequestBody, but the proto requires name (validated against ^[A-Za-z0-9-_]+$) so the server rejected the update.
  • Threaded the existing project name through ProjectMenuPayload, the details-view actions menu, and EditProjectPayload so it's forwarded unchanged in the update body.
  • name stays non-editable in the UI — matches the convention used by project-general.tsx, rename-project.tsx, and the team-edit dialog.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

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

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment May 13, 2026 0:35am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Refactor
    • Enhanced project data structure to handle project names alongside titles throughout the project management interface, improving metadata consistency in edit dialogs and project menus.

Walkthrough

The PR threads the project name field through the edit project UI flow by updating payload contracts, extracting the name from project data in the details view, including it in menu trigger payloads and edit dialog opens from both views, and submitting it in the project update request.

Changes

Project name editing flow

Layer / File(s) Summary
Payload contracts for name field
web/sdk/react/views-new/projects/components/edit-project-dialog.tsx, web/sdk/react/views-new/projects/components/project-columns.tsx
EditProjectPayload and ProjectMenuPayload interfaces now declare a name: string field to carry project name through UI payloads.
Project details view name extraction and threading
web/sdk/react/views-new/projects/project-details-view.tsx
projectName is extracted from project data alongside projectTitle. ProjectActionsMenuProps and ProjectActionsMenu are updated to accept and destructure projectName. The name is passed to ProjectActionsMenu invocation and included in the edit dialog payload.
Menu payload and projects view edit integration
web/sdk/react/views-new/projects/components/project-columns.tsx, web/sdk/react/views-new/projects/projects-view.tsx
Menu.Trigger payload construction includes name from project.name in project-columns.tsx. When the Edit action opens the dialog in projects-view.tsx, the name from ProjectMenuPayload is passed alongside projectId and title.
Edit dialog submission with name
web/sdk/react/views-new/projects/components/edit-project-dialog.tsx
The update mutation request body now includes name: payload.name to submit the project name alongside the title in project update requests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • raystack/frontier#1566: Both PRs extend project-metadata payloads in the projects UI by threading a project name/value through projects-view.tsx and project-details-view.tsx—main PR for the edit dialog (name) and retrieved PR for the delete dialog (projectName).
  • raystack/frontier#1604: Both PRs modify the project update request payload construction in web/sdk/react/views-new/projects/components/edit-project-dialog.tsx—the main PR adds sending name alongside title, while the retrieved PR removes orgId from the same request body.

Suggested reviewers

  • rsbh
  • rohilsurana
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
web/sdk/react/views-new/projects/components/edit-project-dialog.tsx (1)

102-102: 💤 Low value

Consider including payload.name in the dependency array for consistency.

While the current implementation works correctly (since name doesn't affect the form defaults), including payload.name alongside payload.projectId and payload.title would make the dependency array more complete and easier to understand.

Optional consistency improvement
-  }, [payload.projectId, payload.title, reset]);
+  }, [payload.projectId, payload.name, payload.title, reset]);

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8541b7d0-f202-4c67-ad6b-49608b520b64

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0ca1d and 2e9e146.

📒 Files selected for processing (4)
  • web/sdk/react/views-new/projects/components/edit-project-dialog.tsx
  • web/sdk/react/views-new/projects/components/project-columns.tsx
  • web/sdk/react/views-new/projects/project-details-view.tsx
  • web/sdk/react/views-new/projects/projects-view.tsx

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 25799413938

Coverage remained the same at 42.249%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 37646
Covered Lines: 15905
Line Coverage: 42.25%
Coverage Strength: 11.88 hits per line

💛 - Coveralls

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