Skip to content

fix(organizations): let admins rename their organization - #9603

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/organization-rename
Nov 3, 2026
Merged

waleedlatif1 merged 2 commits into
stagingfrom
fix/organization-rename

Conversation

@waleedlatif1

@waleedlatif1 waleedlatif1 commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

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 it
  • Admins can rename from the organization card in the org sidebar (next to the existing logo upload), using the existing SidebarRenameRow input; Enter/blur saves, Escape cancels, server errors show inline. Non-admins see the name read-only
  • New useRenameOrganization invalidates org detail and list keys and refreshes the server-rendered org surface, like logo upload. Same use case Chat's organization/general settings section already calls
  • Name only; the slug isn't shown anywhere in the org UI

Type of Change

  • Bug fix

Testing

  • bun run lint, check:client-boundary, check:react-query, check:api-validation:strict, check:source-conventions, pre-push type-check

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 3, 2026 3:00am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

Adds organization renaming for admins through the organization card.

  • Organization admins can rename their organization from its sidebar card.

Reviews (2) · Last reviewed commit: "fix(organizations): keep the rename draf..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot 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.

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

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit c3501be into staging Nov 3, 2026
78 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/organization-rename branch November 3, 2026 03:43

This branch was previously deployed

1 inactive deployment
Preview — 3eb056cb Deployed Nov 3, 2026 by vercel[bot]
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.

1 participant