Repository navigation
fix(organizations): let admins rename their organization - #9603
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAdds organization renaming for admins through the organization card.
Reviews (2) · Last reviewed commit: "fix(organizations): keep the rename draf..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
2 issues found across 3 files
Confidence score: 3/5
- In
organization-header.tsx, dismissing the dropdown while renaming can clear the draft before the blur-save runs, losing the new name. Save the draft on dismissal. - In
organization-header.tsx, hovering a menu item can blur the rename input and save before editing is finished. Keep menu-item hover from stealing focus during a rename.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/app/o/[organizationId]/components/organization-sidebar/components/organization-header/organization-header.tsx">
<violation number="1" location="apps/sim/app/o/[organizationId]/components/organization-sidebar/components/organization-header/organization-header.tsx:137">
P2: Closing the dropdown unconditionally clears `draftName` before the input's blur-save path can run during outside dismissal. Clicking away while renaming can therefore discard the new name; save the draft from the close path before clearing edit state, and preserve any mutation error until it is handled.</violation>
<violation number="2" location="apps/sim/app/o/[organizationId]/components/organization-sidebar/components/organization-header/organization-header.tsx:201">
P2: Prevent menu-item pointer hover from stealing focus while a rename is active; otherwise this blur handler saves the draft before the user finishes editing.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Collaborator
Author
Collaborator
Author
|
@cubic-dev-ai review this PR |
Contributor
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PUT /api/organizations/[id](organization.settings.update, admin) supports renaming, but its client hook was removed as dead code and no UI exposed it, so admins couldn't rename an organization after creating itSidebarRenameRowinput; Enter/blur saves, Escape cancels, server errors show inline. Non-admins see the name read-onlyuseRenameOrganizationinvalidates org detail and list keys and refreshes the server-rendered org surface, like logo upload. Same use case Chat'sorganization/generalsettings section already callsType of Change
Testing
bun run lint,check:client-boundary,check:react-query,check:api-validation:strict,check:source-conventions, pre-pushtype-checkChecklist
test-auditauthoring gate)