Skip to content

feat: replace the inert Project settings tab with a working Organization tab #753

Closed

Description

@gkhngyk

Problem / motivation

Settings has a Project tab that does nothing.

web/src/app/[locale]/(dashboard)/dashboard/settings/page.tsx renders two inputs and a Save button under it. The inputs have no value and no onChange, the button has no onClick, and no action is imported for them. Nothing is read, nothing is written — clicking Save silently does nothing, which reads to the user as "saved".

"Project" also isn't a thing in this product. The model is organization → brand; there is no project table. So the tab is both inert and named after a concept that doesn't exist.

Meanwhile the organization's own name has no home in the UI at all. It is written once during onboarding by createOrganization in web/src/lib/actions/organization.ts and after that there is no way to see it or change it. A typo at signup is permanent. The only place organizations.name surfaces is the invitation page ("Join {organizationName}"), so an invitee sees the org name but a member never does.

The same page has a second dead Save button: the Account tab binds displayName to state but never persists it.

Proposed solution

Replace the Project tab with an Organization tab that works.

Show

  • Organization name — editable
  • Slug — read-only (it is referenced elsewhere; renaming it is out of scope here)
  • Plan and member count — read-only, both already available via getTeamInfo in web/src/lib/actions/team.ts

Rename

  • Add an updateOrganizationName server action next to createOrganization.
  • The action must check the caller's role itself and reject anyone who is not admin — do not rely on the database policy alone.
  • Trim the input, reject empty, and cap the length (the column is text; something like 100 chars is plenty).
  • Leave slug untouched — changing it is a separate concern with its own consequences.
  • Non-admins should see the name, not an editable field.

While you're in there

  • Wire the Account tab's Save button to persist full_name to the user's profile, or remove the button. A button that does nothing is worse than no button.

Notes

  • TeamSection in web/src/components/settings/team-section.tsx is the closest existing pattern: load on mount, toast on success and failure, skeleton while loading. Follow it rather than inventing a new shape.
  • The tab id project appears in the Section union and in the nav list; both need renaming. Check for ?tab= deep links before changing the id.
  • Strings live in web/messages/en.json under settings — project and projectName are there and will need replacing.
  • No migration is needed. organizations.name already exists.

Alternatives considered

Delete the tab and do nothing else. That removes the false affordance but leaves the org name unreachable, which is the more useful half of the fix.

Put the rename inside the Team tab. Team is about members and invitations; org identity is a different concern and the sidebar already has room for its own entry.

Make the slug editable too. Tempting, but the slug is used as a stable identifier and changing it needs its own thought about what breaks. Deliberately out of scope.

Activity

  1. added
    enhancement
    good first issue
    help wanted
    on Aug 20, 2026
  2. Maqbool61 commented on Aug 27, 2026

    @Maqbool61
    Contributor

    Cloned the repo and traced the relevant files. Quick findings:

    • ?tab=project has zero deep links anywhere in the codebase — renaming the id is safe
    • organizations.name already exists, RLS already restricts UPDATE to admins, guard_organization_server_columns doesn't block name — no migration needed
    • requireAdmin() in team.ts is the ready-made server-side role check to reuse
    • getTeamInfo() already returns plan + member count — nothing new to fetch
    • Account tab Save has no onClick either — same dead-button problem

    Options

    A — Full spec: new OrganizationSection component + updateOrganizationName action, replace Project tab, wire Account Save. Follows TeamSection/AgentSection patterns exactly.

    B — Minimal: delete the Project tab, fix Account Save, leave org rename for a follow-up.

    C — Read-only: rename tab to "Organization", show name/slug/plan/members read-only, no rename action.


    One thing to decide regardless

    Account tab Save button — wire it (write profiles.full_name + sync auth metadata) or remove it?

    Which direction do you want to go?

  3. gkhngyk commented on Sep 15, 2026

    @gkhngyk
    ContributorAuthor

    Sorry for the slow reply — this analysis deserved better. Assigned to you.

    Direction: Option A, and wire the Account Save (write profiles.full_name + sync auth metadata) — a Save button that silently does nothing is the same bug this issue exists to fix, so let's not leave a second copy of it.

    Two small requirements on the org rename beyond what you listed:

    • updateOrganizationName should do its own role check via requireAdmin() rather than relying on RLS alone — belt and braces, and a clear error for non-admins.
    • Trim, reject empty, cap at ~100 chars; leave slug untouched.

    Everything else as you traced it. Thanks for the groundwork — happy to review.

  4. added a commit that references this issue on Sep 19, 2026
    2cc6db9
  5. added a commit that references this issue on Sep 22, 2026
    5c3c106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementgood first issuehelp wanted

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions