Skip to content

refactor(settings): fold verified domains into SSO, move group-detail state to nuqs, design-system cleanup#5950

Merged
waleedlatif1 merged 5 commits into
stagingfrom
feat/sso-domains-into-sso-tab
Jul 25, 2026
Merged

refactor(settings): fold verified domains into SSO, move group-detail state to nuqs, design-system cleanup#5950
waleedlatif1 merged 5 commits into
stagingfrom
feat/sso-domains-into-sso-tab

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Verified domains now lives inside the SSO page instead of its own tab. It only ever gated SSO, so a separate page meant discovering the requirement after filling out the entire IdP form, then navigating away mid-setup. The standalone page, its nav entry, and both route branches are gone — one page to maintain.
  • Access-control group detail moved to nuqs. Its tab, three search boxes, and three status filters were in useState, so a ?group-id= link always landed on General and filters were lost on reload — even though the parent already puts the group id in the URL. Because the tabs never render together, search and status share one param each (group-search, group-status) rather than three mutually-exclusive keys; switching tabs resets both, and closing the detail clears all three alongside group-id in one batched write.
  • Whitelabeling logo/wordmark upload simplified — the thumbnail was already the click target, so the separate Upload/Change button was a second control for the same action.

Design-system cleanup

A pass over the touched surfaces (url-state, React hygiene, emcn/settings conventions) surfaced these:

  • a11y regression fixed. Removing the Upload button left the thumbnail — which contains only an icon — as the sole click target, so it announced as an unlabeled button. The icon-only Remove had the same issue. Both now carry state-reflecting aria-labels.
  • Chip over legacy Button for the domain actions: Button is ~26px against the 30px ChipInput beside it, so "Add domain" sat visibly short in the same row.
  • SettingRow uses the emcn Info component — a bare <svg> as Tooltip.Trigger was neither focusable nor nameable — and stops re-specifying Label's own default styling.
  • SSO's local FormField replaced by the shared SettingRow (19 call sites), which is why its labels now match whitelabeling/custom-blocks/access-control. SettingRow gained optional optional/error props to absorb what FormField did — additive, existing consumers untouched — and group-detail now uses error instead of a hand-rolled error paragraph.
  • Hoisted a lookup object out of a sort comparator, size-* over h-N w-N, named staleTime constants per the rules, barrel import for RowActionsMenu.

Deliberately not included

  • The whitelabeling 22-useState + syncing-effect refactor. It's a genuine finding (including a ref read during render), but it's pre-existing, changes render timing, and the audit itself says to verify it against the running UI — which doesn't belong in a PR about something else. Worth its own change.
  • SSO's errors-as-derived-state and the Title Case → sentence case label sweep: same reasoning, tracked separately.

Type of Change

  • Refactor

Testing

162 tests across SSO / whitelabeling / access-control / settings. tsc 0, full-repo lint:check clean, check:api-validation and check:utils pass. Not visually verified in a running app.

Checklist

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

…mitives

Verified domains only gates SSO, so managing it on a separate page meant
discovering the requirement after filling out the whole IdP form and then
navigating away mid-setup. Move it into the SSO page as a section above the
provider config and drop the standalone page, its nav entry, and both route
branches.

Align the surfaces with the shared settings primitives rather than bespoke
chrome, matching whitelabeling/custom-blocks/access-control:
- SSO's local FormField (muted labels) is replaced by the shared SettingRow, so
  its fields read like every other settings page. SettingRow gains optional
  `optional` and `error` props to absorb what FormField did — additive, so
  existing consumers are untouched.
- The domains section is built from SettingsSection, SettingRow,
  SettingsResourceRow, and SettingsEmptyState instead of hand-rolled cards.

Also drop the redundant Upload/Change buttons in whitelabeling: the logo and
wordmark thumbnails were already clickable, so the button was a second control
for the same action. Remove still appears once an image is set.
…gn-system drift

Access control's group detail kept its tab, three search boxes, and three status
filters in useState, so a `?group-id=` link always landed on General and a filter
was lost on reload — the parent already puts the group id in the URL. The three
tabs never render together, so search and status share one param each rather than
carrying three mutually-exclusive keys, and switching tabs resets both. Closing
the detail clears all three alongside group-id in one batched write, so nothing
lingers on the list URL.

Design-system fixes from a cleanup pass over the surfaces this branch touched:
- Restore accessible names lost when the whitelabeling Upload buttons were
  removed. The thumbnail is now the only click target, and it contained just an
  icon, so it announced as an unlabeled button; the icon-only Remove had the same
  problem. Both now carry aria-labels reflecting their state.
- Use Chip, not the legacy Button, for the domain actions — Button is ~26px
  against the 30px ChipInput beside it, so "Add domain" sat visibly short.
- SettingRow now uses the emcn Info component; a bare svg as Tooltip.Trigger was
  neither focusable nor nameable. It also stops re-specifying Label's own default
  styling.
- Use the new SettingRow error prop for the group name instead of a hand-rolled
  error paragraph, which is what the prop was added for.
- Hoist the block-category lookup out of a sort comparator, size-* over h/w, name
  the staleTime constants the rules require, and import RowActionsMenu from its
  barrel.
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 25, 2026 2:07am

Request Review

@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Mostly UI routing and URL state with backward-compatible domainssso aliases; SSO domain verification behavior is unchanged aside from error copy.

Overview
Verified domains is no longer a separate settings tab: it renders as a Verified domains section at the top of Single sign-on, with the standalone DomainSettings route and nav entry removed. Old domains URLs redirect to sso; docs and the SSO registration API error text point admins to the in-page section.

Access control group detail moves tab, search, and enabled/disabled filters from local state into URL params (group-tab, group-search, group-status), with shared search/status across provider/blocks/platform tabs and resets when switching tabs or opening/closing a group.

Design-system / UX polish on touched surfaces: SSO drops its local FormField for shared SettingRow and ChipCopyInput; SettingRow gains optional/error/htmlFor and uses emcn Info; verified-domain actions use Chip; whitelabeling upload thumbnails get aria-labels; minor a11y and query staleTime constant extractions.

Reviewed by Cursor Bugbot for commit 4a38eee. Configure here.

Comment thread apps/sim/components/settings/navigation.ts
@greptile-apps

greptile-apps Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This follow-up completes the legacy verified-domain navigation fix while consolidating related settings UI and URL state.

  • Adds aliases that route legacy organization and workspace domains settings links to SSO.
  • Embeds verified-domain management within the SSO page and removes the standalone section.
  • Moves permission-group detail tabs, searches, and status filters into URL-backed state.
  • Applies accessibility, shared-component, styling, and query-constant cleanup across touched settings surfaces.

Confidence Score: 5/5

The PR appears safe to merge, with no blocking failure remaining in the legacy verified-domain link fix.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/settings/[section]/page.tsx Adds the workspace-route alias needed to redirect legacy verified-domain links to SSO.
apps/sim/components/settings/navigation.ts Removes the standalone verified-domains navigation entry and aliases legacy organization links to SSO.
apps/sim/ee/sso/components/sso-settings.tsx Integrates verified-domain management into SSO and adopts shared settings components.
apps/sim/ee/access-control/components/group-detail.tsx Moves permission-group detail view state into constrained URL parameters.
apps/sim/ee/components/setting-row.tsx Extends the shared settings row with optional and validation-error presentation.

Reviews (3): Last reviewed commit: "fix(settings): reset group detail params..." | Re-trigger Greptile

Folding verified domains into the SSO page dropped /settings/domains, so
bookmarks and shared links 404'd instead of landing where domains now live. Both
alias maps already exist for exactly this (organization/'members',
subscription/'billing'); add domains -> sso to each.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/ee/access-control/components/access-control.tsx
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4a38eee. Configure here.

@waleedlatif1
waleedlatif1 merged commit 919a98d into staging Jul 25, 2026
20 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/sso-domains-into-sso-tab branch July 25, 2026 02:11
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