Skip to content

fix(ui): render organization profile modal close button inside the SSO wizard header#9089

Open
iagodahlem wants to merge 3 commits into
mainfrom
iago/orgs-1709-modal-close-button
Open

fix(ui): render organization profile modal close button inside the SSO wizard header#9089
iagodahlem wants to merge 3 commits into
mainfrom
iago/orgs-1709-modal-close-button

Conversation

@iagodahlem

@iagodahlem iagodahlem commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

When OrganizationProfile renders as a modal, the close (X) button was an absolute overlay pinned to the card's top-right corner. In the Configure SSO wizard (Security tab), the step header reaches that same corner, so the X overlapped the final "Activate" step.

This moves the close button into the wizard header as a real flex item aligned with the stepper on desktop, and hides the shared absolute overlay there via an additive opt-out (default off — every other profile page/component is unchanged). Mobile keeps the existing absolute close button via a breakpoint split, so there is exactly one close button at any width. The in-header button's block padding is zeroed so it does not make the header taller than the back button and stepper.

Closes ORGS-1709.

Testing

  • Unit tests: modal wizard renders the header close button (wired to close); the non-modal path renders none.
  • Manually verified in the sandbox — Org Switcher -> Manage Organization -> Security -> Continue configuration: close button sits in the header aligned with the stepper, no overlap, header height unchanged. type-check + prettier pass.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed the organization profile SSO setup wizard so the close button no longer stretches the modal header.
    • Improved profile card close-button behavior so the correct control appears in modal vs desktop/mobile layouts.
    • Centered header controls (back button, stepper, and modal close) for a more consistent layout.
  • Tests
    • Added modal-specific wizard tests to verify “Close modal” visibility and toggle behavior, plus absence outside modals.

…O wizard header

When OrganizationProfile is shown as a modal, the configure SSO wizard header now
renders the close button as a flex item next to the step indicator instead of as an
absolute overlay, so it no longer overlaps the "Activate" step label. The mobile
top-right close button is unchanged.
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: afc8ac7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/ui Patch
@clerk/chrome-extension Patch
@clerk/swingset Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Jul 6, 2026 2:24pm
swingset Ready Ready Preview, Comment Jul 6, 2026 2:24pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 6, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@9089

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@9089

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@9089

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@9089

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9089

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9089

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9089

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@9089

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@9089

@clerk/express

npm i https://pkg.pr.new/@clerk/express@9089

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@9089

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9089

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@9089

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@9089

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@9089

@clerk/react

npm i https://pkg.pr.new/@clerk/react@9089

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@9089

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@9089

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@9089

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@9089

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@9089

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@9089

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@9089

commit: afc8ac7

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-07-06T14:26:48.756Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 2
🔴 Breaking changes 15
🟡 Non-breaking changes 2
🟢 Additions 0

Warning
15 breaking change(s) detected - Major version bump required

🤖 This report was reviewed by claude-sonnet-4-6.

🔴 Breaking changes index (15)

Every breaking change, up front. Full diffs are in the package sections below.

Package Subpath Change
@clerk/backend . EnterpriseConnectionSamlConnection.undefined
@clerk/backend . EnterpriseConnectionSamlConnection.idpCertificateExpiresAt
@clerk/backend . EnterpriseConnectionSamlConnection.idpCertificateIssuedAt
@clerk/backend . EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at
@clerk/backend . EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at
@clerk/backend . SamlConnection.undefined
@clerk/backend . SamlConnection.idpCertificateExpiresAt
@clerk/backend . SamlConnection.idpCertificateIssuedAt
@clerk/shared ./pathMatcher WithPathSegmentWildcard
@clerk/shared ./react UseOrganizationEnterpriseConnectionTestRunsReturn
@clerk/shared ./react UseOrganizationEnterpriseConnectionTestRunsRevalidateResult
@clerk/shared ./types EnterpriseSamlConnectionNestedJSON.idp_certificate_expires_at
@clerk/shared ./types EnterpriseSamlConnectionNestedJSON.idp_certificate_issued_at
@clerk/shared ./types EnterpriseSamlConnectionNestedResource.idpCertificateExpiresAt
@clerk/shared ./types EnterpriseSamlConnectionNestedResource.idpCertificateIssuedAt

@clerk/backend

Version: 3.11.0 → 3.9.0
Recommended bump: MAJOR

🔴 Breaking Changes (8)

Changed: EnterpriseConnectionSamlConnection.undefined

// ... 3 unchanged lines elided ...
      idpEntityId: string, 
      idpSsoUrl: string, 
      idpCertificate: string, 
-     idpCertificateIssuedAt: number, 
-     idpCertificateExpiresAt: number, 
      idpMetadataUrl: string, 
      idpMetadata: string, 
      acsUrl: string, 
// ... 5 unchanged lines elided ...

Static analyzer: Breaking change in constructor EnterpriseConnectionSamlConnection.undefined: Parameter idpCertificateIssuedAt type changed: numberstring; Parameter idpCertificateExpiresAt type changed: numberstring; Parameter spEntityId type changed: stringboolean; Parameter spMetadataUrl type changed: stringboolean; Parameter allowSubdomains was removed; Parameter allowIdpInitiated was removed

🤖 AI review (confirmed) (95%): The constructor parameter order and types changed significantly: idpCertificateIssuedAt and idpCertificateExpiresAt were removed from their original positions, shifting all subsequent parameters, which breaks any consumer calling new EnterpriseConnectionSamlConnection(...) with positional arguments.

Migration: Update all call sites constructing EnterpriseConnectionSamlConnection to match the new parameter list, removing idpCertificateIssuedAt and idpCertificateExpiresAt arguments.

Changed: EnterpriseConnectionSamlConnection.idpCertificateExpiresAt

- readonly idpCertificateExpiresAt: number;

Static analyzer: Removed property EnterpriseConnectionSamlConnection.idpCertificateExpiresAt

🤖 AI review (confirmed) (97%): The idpCertificateExpiresAt property was removed from the EnterpriseConnectionSamlConnection interface, breaking consumers that read this property.

Migration: Remove any code that reads idpCertificateExpiresAt from EnterpriseConnectionSamlConnection instances, as the property no longer exists.

Changed: EnterpriseConnectionSamlConnection.idpCertificateIssuedAt

- readonly idpCertificateIssuedAt: number;

Static analyzer: Removed property EnterpriseConnectionSamlConnection.idpCertificateIssuedAt

🤖 AI review (confirmed) (97%): The idpCertificateIssuedAt property was removed from the EnterpriseConnectionSamlConnection interface, breaking consumers that read this property.

Migration: Remove any code that reads idpCertificateIssuedAt from EnterpriseConnectionSamlConnection instances, as the property no longer exists.

Changed: EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at

- idp_certificate_expires_at: number;

Static analyzer: Removed property EnterpriseConnectionSamlConnectionJSON.idp_certificate_expires_at

🤖 AI review (confirmed) (97%): The idp_certificate_expires_at property was removed from the EnterpriseConnectionSamlConnectionJSON interface, breaking consumers that read or assign this property.

Migration: Remove any code that references idp_certificate_expires_at on EnterpriseConnectionSamlConnectionJSON, as the property no longer exists.

Changed: EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at

- idp_certificate_issued_at: number;

Static analyzer: Removed property EnterpriseConnectionSamlConnectionJSON.idp_certificate_issued_at

🤖 AI review (confirmed) (97%): The idp_certificate_issued_at property was removed from the EnterpriseConnectionSamlConnectionJSON interface, breaking consumers that read or assign this property.

Migration: Remove any code that references idp_certificate_issued_at on EnterpriseConnectionSamlConnectionJSON, as the property no longer exists.

Changed: SamlConnection.undefined

// ... 5 unchanged lines elided ...
      idpEntityId: string | null, 
      idpSsoUrl: string | null, 
      idpCertificate: string | null, 
-     idpCertificateIssuedAt: number, 
-     idpCertificateExpiresAt: number, 
      idpMetadataUrl: string | null, 
      idpMetadata: string | null, 
      acsUrl: string, 
// ... 11 unchanged lines elided ...

Static analyzer: Breaking change in constructor SamlConnection.undefined: Parameter idpCertificateIssuedAt type changed: numbernull|string; Parameter idpCertificateExpiresAt type changed: numbernull|string; Parameter idpMetadataUrl type changed: null|stringstring; Parameter idpMetadata type changed: null|stringstring; Parameter spEntityId type changed: stringboolean; Parameter active type changed: booleannumber; Parameter provider type changed: stringboolean; Parameter userCount type changed: numberboolean; Parameter allowSubdomains type changed: booleannumber; Parameter allowIdpInitiated type changed: booleannumber; Parameter createdAt type changed: numberimport("@clerk/backend").~AttributeMapping; Parameter updatedAt was removed; Parameter attributeMapping was removed

🤖 AI review (confirmed) (95%): The SamlConnection constructor had idpCertificateIssuedAt and idpCertificateExpiresAt removed from their original positions, shifting all subsequent positional parameters, breaking any consumer calling new SamlConnection(...) directly.

Migration: Update all call sites constructing SamlConnection to match the new parameter list, removing idpCertificateIssuedAt and idpCertificateExpiresAt arguments.

Changed: SamlConnection.idpCertificateExpiresAt

- readonly idpCertificateExpiresAt: number;

Static analyzer: Removed property SamlConnection.idpCertificateExpiresAt

🤖 AI review (confirmed) (97%): The idpCertificateExpiresAt property was removed from the SamlConnection interface, breaking consumers that read this property.

Migration: Remove any code that reads idpCertificateExpiresAt from SamlConnection instances, as the property no longer exists.

Changed: SamlConnection.idpCertificateIssuedAt

- readonly idpCertificateIssuedAt: number;

Static analyzer: Removed property SamlConnection.idpCertificateIssuedAt

🤖 AI review (confirmed) (97%): The idpCertificateIssuedAt property was removed from the SamlConnection interface, breaking consumers that read this property.

Migration: Remove any code that reads idpCertificateIssuedAt from SamlConnection instances, as the property no longer exists.


@clerk/shared

Version: 4.24.0 → 4.23.0
Recommended bump: MAJOR

Subpath ./pathMatcher

🔴 Breaking Changes (1)

Changed: WithPathSegmentWildcard
- type WithPathSegmentWildcard<T = string> = T extends '/' ? '/:path*' : `${StripTrailingSlash<T & string>}/:path*`;

Static analyzer: Removed type alias WithPathSegmentWildcard

🤖 AI review (confirmed) (85%): WithPathSegmentWildcard was a publicly exported type alias that consumers could reference directly; its removal means any consumer code that imports or uses WithPathSegmentWildcard will fail to compile.

Migration: Replace usages of WithPathSegmentWildcard<T> with the new WithPathPatternWildcard<T> type, noting the different template literal shape ((.*) suffix instead of /:path*).

🟡 Non-breaking Changes (1)

Modified: PathPattern
- type PathPattern = Autocomplete<WithPathSegmentWildcard>;
+ type PathPattern = Autocomplete<WithPathPatternWildcard>;

Static analyzer: Breaking change in type alias PathPattern: Type changed: import("@clerk/shared").~Autocomplete<import("@clerk/shared").WithPathSegmentWildcard>import("@clerk/shared").~Autocomplete<import("@clerk/shared").WithPathPatternWildcard>

🔤 Suggestion-only union change: the union keeps its Record<never,never>&string arm, which absorbs every string; the changed arms (removed: WithPathSegmentWildcard; added: WithPathPatternWildcard) only affect editor autocomplete, so no well-typed consumer is affected. Set downgradeAbsorbingArmUnions: false to keep these breaking.

🤖 AI review (confirmed) (97%): The absorbingArmUnion flag confirms that both WithPathSegmentWildcard and WithPathPatternWildcard are arms of an Autocomplete<…> union that also contains the absorbing string & Record<never,never> arm; per rule 14, swapping the literal/template-literal arm while the absorbing arm remains does not change the assignable set for any consumer.

Subpath ./react

🔴 Breaking Changes (2)

Changed: UseOrganizationEnterpriseConnectionTestRunsReturn
// ... 4 unchanged lines elided ...
    isLoading: boolean;
    isFetching: boolean;
    isPolling: boolean;
-   revalidate: (options?: RevalidateTestRunsOptions) => Promise<UseOrganizationEnterpriseConnectionTestRunsRevalidateResult>;
+   revalidate: (options?: RevalidateTestRunsOptions) => Promise<void>;
  };

Static analyzer: Breaking change in type alias UseOrganizationEnterpriseConnectionTestRunsReturn: Type changed: {data:import("@clerk/shared").~EnterpriseConnectionTestRunResource[]|undefined;totalCount:number|undefined;error:!Error…{data:import("@clerk/shared").~EnterpriseConnectionTestRunResource[]|undefined;totalCount:number|undefined;error:!Error…

🤖 AI review (confirmed) (90%): The revalidate function's return type changed from Promise<UseOrganizationEnterpriseConnectionTestRunsRevalidateResult> (which resolves to {data:...|undefined; totalCount:number|undefined}) to Promise<void>, meaning consumers who previously read the resolved value (e.g. const {data, totalCount} = await revalidate()) will now get undefined instead — a narrowed/changed output type that breaks well-typed callers.

Migration: Remove any code that reads the resolved value of revalidate(); the function now returns Promise<void> so callers must obtain updated data from the hook's data/totalCount fields instead.

Changed: UseOrganizationEnterpriseConnectionTestRunsRevalidateResult
- type UseOrganizationEnterpriseConnectionTestRunsRevalidateResult = {
-   data: EnterpriseConnectionTestRunResource[] | undefined;
-   totalCount: number | undefined;
- };

Static analyzer: Removed type alias UseOrganizationEnterpriseConnectionTestRunsRevalidateResult

🤖 AI review (confirmed) (95%): The exported type alias UseOrganizationEnterpriseConnectionTestRunsRevalidateResult was removed entirely, breaking any consumer code that explicitly references this type (e.g. for typing variables or function signatures).

Migration: Replace references to UseOrganizationEnterpriseConnectionTestRunsRevalidateResult with an inline type { data: EnterpriseConnectionTestRunResource[] | undefined; totalCount: number | undefined } or remove them if the type is no longer needed given that revalidate now returns Promise<void>.

Subpath ./types

🔴 Breaking Changes (4)

Changed: EnterpriseSamlConnectionNestedJSON.idp_certificate_expires_at
- idp_certificate_expires_at: number;

Static analyzer: Removed property EnterpriseSamlConnectionNestedJSON.idp_certificate_expires_at

🤖 AI review (confirmed) (90%): EnterpriseSamlConnectionNestedJSON.idp_certificate_expires_at was a required property and has been removed, so any consumer code that reads or assigns this property will fail to compile.

Migration: Remove all references to idp_certificate_expires_at from code that reads or constructs EnterpriseSamlConnectionNestedJSON objects.

Changed: EnterpriseSamlConnectionNestedJSON.idp_certificate_issued_at
- idp_certificate_issued_at: number;

Static analyzer: Removed property EnterpriseSamlConnectionNestedJSON.idp_certificate_issued_at

🤖 AI review (confirmed) (90%): EnterpriseSamlConnectionNestedJSON.idp_certificate_issued_at was a required property and has been removed, breaking any consumer code that accesses or assigns it.

Migration: Remove all references to idp_certificate_issued_at from code that reads or constructs EnterpriseSamlConnectionNestedJSON objects.

Changed: EnterpriseSamlConnectionNestedResource.idpCertificateExpiresAt
- idpCertificateExpiresAt: number;

Static analyzer: Removed property EnterpriseSamlConnectionNestedResource.idpCertificateExpiresAt

🤖 AI review (confirmed) (90%): EnterpriseSamlConnectionNestedResource.idpCertificateExpiresAt was a required property and has been removed, breaking any consumer code that accesses or assigns it.

Migration: Remove all references to idpCertificateExpiresAt from code that reads or constructs EnterpriseSamlConnectionNestedResource objects.

Changed: EnterpriseSamlConnectionNestedResource.idpCertificateIssuedAt
- idpCertificateIssuedAt: number;

Static analyzer: Removed property EnterpriseSamlConnectionNestedResource.idpCertificateIssuedAt

🤖 AI review (confirmed) (90%): EnterpriseSamlConnectionNestedResource.idpCertificateIssuedAt was a required property and has been removed, breaking any consumer code that accesses or assigns it.

Migration: Remove all references to idpCertificateIssuedAt from code that reads or constructs EnterpriseSamlConnectionNestedResource objects.

🟡 Non-breaking Changes (1)

Modified: ClerkOptions
// ... 15 unchanged lines elided ...
    isSatellite?: boolean | ((url: URL) => boolean);
    satelliteAutoSync?: boolean;
    telemetry?: false | {
-     disabled?: boolean; /** Whether telemetry events are only logged to the console and not sent to Clerk. */
-     debug?: boolean; /** Whether the sampling rates provided per telemetry event will be ignored and all events will be sent. Defaults to `true`. */
+     disabled?: boolean;
+     debug?: boolean;
      perEventSampling?: boolean;
    };
    sdkMetadata?: SDKMetadata;
// ... 13 unchanged lines elided ...

Static analyzer: Breaking change in type alias ClerkOptions: Type changed: import("@clerk/shared").AfterMultiSessionSingleSignOutUrl&import("@clerk/shared").AfterSignOutUrl&import("@clerk/shared…import("@clerk/shared").AfterMultiSessionSingleSignOutUrl&import("@clerk/shared").AfterSignOutUrl&import("@clerk/shared…

🤖 AI review (reclassified as non-breaking) (95%): The only difference between before and after is the removal of JSDoc comments inside the telemetry object (/** Whether telemetry events are only logged... */ and /** Whether the sampling rates... */); the structural shape of ClerkOptions is identical, so no well-typed consumer code is affected.


Report generated by Break Check

Last ran on afc8ac7.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 88076c8d-0184-4af0-9ea4-c816676513c4

📥 Commits

Reviewing files that changed from the base of the PR and between 8e3441c and afc8ac7.

📒 Files selected for processing (2)
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx
  • packages/ui/src/components/ConfigureSSO/elements/ProfileCard.tsx
✅ Files skipped from review due to trivial changes (1)
  • packages/ui/src/components/ConfigureSSO/elements/ProfileCard.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx

📝 Walkthrough

Walkthrough

Adds header-owned close-button state to ProfileCardRoot, uses it in ConfigureSSOHeader to render a modal-only close button, and updates tests and a changeset for the SSO wizard modal behavior.

Changes

Modal Close Button Ownership

Layer / File(s) Summary
ProfileCard close-button ownership
packages/ui/src/elements/ProfileCard/ProfileCardRoot.tsx, packages/ui/src/elements/ProfileCard/index.ts
Adds ProfileCardCloseButtonContext, headerOwnsCloseButton state, conditional overlay display behavior, a provider around children, and a public re-export of useUnsafeProfileCardCloseButton.
ConfigureSSO modal close button
packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx, packages/ui/src/components/ConfigureSSO/elements/ProfileCard.tsx
Detects modal mode from useUnsafeModalContext, sets header ownership with useSafeLayoutEffect, renders a modal-only IconButton, and centers the header controls.
Tests and changeset
packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx, .changeset/configure-sso-modal-close-button-height.md
Adds modal rendering test helpers and wizard close-button assertions, plus a patch changeset for @clerk/ui.

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ProfileCardRoot
  participant ConfigureSSOHeader
  participant ModalContext
  participant User

  ConfigureSSOHeader->>ModalContext: read toggle and modal state
  ConfigureSSOHeader->>ProfileCardRoot: claim header close-button ownership
  ProfileCardRoot-->>ProfileCardRoot: hide overlay close button on desktop
  ConfigureSSOHeader-->>User: render Close modal IconButton
  User->>ConfigureSSOHeader: click close button
  ConfigureSSOHeader->>ModalContext: toggle()
Loading

Suggested reviewers: wobsoriano, maxyinger

Poem

A rabbit hopped into the modal light,
And tucked the close button up just right.
The header stayed neat, the edges aligned,
With a tiny click, the wizard unwound. 🐰

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: moving the organization profile modal close button into the SSO wizard header.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

♻️ Duplicate comments (1)
packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx (1)

345-355: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Assertion may not test what it intends to.

This test asserts there's no 'Close modal' button on the overview screen while inside a modal, but the shared overlay close button in ProfileCardRoot.tsx (rendered whenever toggle is truthy, independent of the wizard) also uses aria-label='Close modal'. If ProfileCardRoot wraps the overview page too when rendered in a modal, this overlay button would already satisfy the query, making the assertion pass/fail for reasons unrelated to the wizard-header button under test. Please confirm this is exercising the intended contract (wizard-header ownership vs. shared overlay), possibly by giving the two buttons distinct accessible names.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx`
around lines 345 - 355, The test in OrganizationSecurityPage.test.tsx may be
matching the shared overlay close control from ProfileCardRoot instead of the
wizard-header button it intends to verify. Update the assertion setup around
renderPageInModal and the “Close modal” query so it targets the correct
contract, likely by making the wizard-header close button in
OrganizationSecurityPage and the shared overlay button in ProfileCardRoot
distinguishable via different accessible names or by querying a more specific
element.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In
`@packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx`:
- Around line 345-355: The test in OrganizationSecurityPage.test.tsx may be
matching the shared overlay close control from ProfileCardRoot instead of the
wizard-header button it intends to verify. Update the assertion setup around
renderPageInModal and the “Close modal” query so it targets the correct
contract, likely by making the wizard-header close button in
OrganizationSecurityPage and the shared overlay button in ProfileCardRoot
distinguishable via different accessible names or by querying a more specific
element.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Repository UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f766f66-26c4-402d-94c3-a6d140e673cb

📥 Commits

Reviewing files that changed from the base of the PR and between 485bca5 and 8e3441c.

📒 Files selected for processing (6)
  • .changeset/configure-sso-modal-close-button-height.md
  • packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx
  • packages/ui/src/components/ConfigureSSO/elements/ProfileCard.tsx
  • packages/ui/src/components/OrganizationProfile/__tests__/OrganizationSecurityPage.test.tsx
  • packages/ui/src/elements/ProfileCard/ProfileCardRoot.tsx
  • packages/ui/src/elements/ProfileCard/index.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant