Skip to content

Settings → Team role select shows slug (agency_partner) instead of label (Agency Partner) #145

Closed

Description

@gkhngyk

Problem

In Settings → Team, the role <Select> shows the raw enum value (agency_partner) instead of the human label (Agency Partner) after a selection is made. Happens in two places:

  • Existing-member role-change dropdown next to each row
  • The role dropdown inside the Invite member dialog

Repro:

  1. Open Settings → Team.
  2. Click the role dropdown for any member, pick Agency Partner.
  3. The trigger button collapses to show agency_partner instead of Agency Partner.

Same thing happens in the invite dialog when you pick Agency Partner for the new invite.

Root cause

The project uses Base UI for select primitives (web/src/components/ui/select.tsx). Base UI's Select.Value defaults to rendering the raw selected value string when no children are passed — it does not pull the matched SelectItem's children automatically (unlike Radix).

Both selects in web/src/components/settings/team-section.tsx render <SelectValue /> with no children, so the raw role enum (admin, manager, analyst, agency_partner) leaks into the UI for the only role whose slug differs from its label.

Fix

Use Base UI's render-prop pattern on SelectValue, mapping the selected value to its label via the existing roleLabel helper that already lives in the file:

<SelectValue placeholder="Select role">
  {(value) => (value ? roleLabel(value as TeamRole) : 'Select role')}
</SelectValue>

There's an in-repo reference for the same pattern at web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx:687-693 — copy that shape.

Apply to both <SelectValue /> instances in the file (line ~278 for the row-level role select, line ~507 for the invite dialog).

Acceptance criteria

  • Picking Agency Partner in either select shows Agency Partner in the trigger, not agency_partner
  • Same for any other role (admin / manager / analyst — these already look right because their label equals their slug capitalized, but the fix should cover them uniformly)
  • pnpm tsc --noEmit + yarn lint clean
  • No visual regression on the row-level pending-update spinner — the trigger still swaps in <Loader2> while a role change is in flight

Out of scope

  • Any other slug-vs-label leak elsewhere in the app. If you find one while you're in there, leave a note and we'll open a separate issue.

Activity

  1. added
    bug
    good first issue
    help wanted
    on Jun 2, 2026
  2. adityabhatkar23 commented on Jun 2, 2026

    @adityabhatkar23

    i would like to work on this issue can you assign this to me

  3. gkhngyk commented on Jun 2, 2026

    @gkhngyk
    ContributorAuthor

    Welcome @adityabhatkar23, assigning to you — thanks for picking this up!

    The acceptance criteria in the issue body should get you there, and there's already an in-repo reference for the Base UI render-prop pattern at web/src/app/[locale]/(dashboard)/dashboard/insights/page.tsx:687-693. The roleLabel helper at the top of web/src/components/settings/team-section.tsx maps the slug to its display name and can be reused as-is.

    When you're ready, open a PR against main and tag this issue with Closes #145 in the description. Happy to help if you get stuck — drop a comment here.

  4. gkhngyk commented on Jun 2, 2026

    @gkhngyk
    ContributorAuthor

    Hey @adityabhatkar23 — heads-up that another contributor opened #147 with a working fix before you submitted, so I'm unassigning this one and approving that PR shortly. Apologies for the race; we hadn't put a stronger "claim" mechanic in place yet.

    Two other Good First Issues are still open if you'd like to pick one up:

    Either is yours if you're interested — just comment on the issue and we'll assign you.

  5. added a commit that references this issue on Jun 2, 2026
    dceea75
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions