Skip to content

feat(site): add Default Roles section to organization settings#26028

Open
Emyrk wants to merge 1 commit into
gateway-accounts/floor-shrink-org-memberfrom
gateway-accounts/default-roles-ui
Open

feat(site): add Default Roles section to organization settings#26028
Emyrk wants to merge 1 commit into
gateway-accounts/floor-shrink-org-memberfrom
gateway-accounts/default-roles-ui

Conversation

@Emyrk
Copy link
Copy Markdown
Member

@Emyrk Emyrk commented Jun 3, 2026

Refs #25936. Stacks on #26027.

Adds a Default Roles section to the org settings page that edits an org's default_org_member_roles via the existing PATCH endpoint.

  • Gated on the minimum-implicit-member experiment via useDashboard().experiments.
  • Uses the existing RoleSelector primitive inside a new DefaultRolesDialog.
  • Empty selection is supported and explicitly called out in the dialog copy.
  • Toasts on success, surfaces getErrorDetail on failure.
  • Storybook coverage for hidden, enabled, empty, and dialog-open states.
Screencast.From.2026-06-03.18-02-06.webm
Implementation notes
  • RoleSelectorDialog is the existing per-user role editor; it's user-centric (avatar header, username/email props). Wrapping it for the org-default case would have meant feeding it a synthetic "user", so this PR adds a small sibling DefaultRolesDialog and reuses the inner RoleSelector primitive directly. Same look, same behavior in the picker.
  • The PATCH already exists from feat: configurable default org member roles #25994 (updateOrganizationdefault_org_member_roles). The page reuses the existing updateOrganization mutation.
  • organizationRoles(orgName) is fetched only when the experiment is enabled (useQuery({ enabled })).
  • DefaultRolesSummary resolves role names to display names via the fetched AssignableRoles[], falling back to the raw name when the role is not in the list.

Coder Agents on behalf of @Emyrk.

Copy link
Copy Markdown
Member Author

Emyrk commented Jun 3, 2026

@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch 2 times, most recently from c4a5fcc to 976957f Compare June 3, 2026 19:17
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch from c91e381 to d1ee7c9 Compare June 3, 2026 20:48
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 976957f to 8ea2020 Compare June 3, 2026 20:48
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch from d1ee7c9 to 7813b1a Compare June 3, 2026 21:09
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch 2 times, most recently from 5c9c069 to 620c357 Compare June 3, 2026 21:23
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch 2 times, most recently from 210be86 to 34ec9ef Compare June 3, 2026 21:43
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch 2 times, most recently from eb10210 to 538597d Compare June 3, 2026 21:56
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch 2 times, most recently from 8e1cf4c to d46be0c Compare June 3, 2026 22:14
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 538597d to 986699a Compare June 3, 2026 22:14
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch from d46be0c to 0e1c45b Compare June 3, 2026 22:20
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 986699a to 8a07ffd Compare June 3, 2026 22:20
Adds a new Default Roles section to the org settings page (gated on
the minimum-implicit-member experiment) that edits an org's
default_org_member_roles via the existing PATCH endpoint.

Uses the existing RoleSelector primitive via a new
DefaultRolesDialog sibling. RoleSelectorDialog itself is too
user-centric (avatar header, username/email props) to reuse here.

Refs #25936.
@Emyrk Emyrk force-pushed the gateway-accounts/floor-shrink-org-member branch from 0e1c45b to b78d140 Compare June 3, 2026 22:29
@Emyrk Emyrk force-pushed the gateway-accounts/default-roles-ui branch from 8a07ffd to 9884564 Compare June 3, 2026 22:29
@Emyrk Emyrk marked this pull request as ready for review June 3, 2026 23:03
@Emyrk Emyrk requested a review from geokat June 4, 2026 17:14
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