Skip to content

fix(ui): stop mid-flow test-run refetches from gating the security page loading#9049

Draft
iagodahlem wants to merge 2 commits into
mainfrom
iago/sso-security-page-loading-latch
Draft

fix(ui): stop mid-flow test-run refetches from gating the security page loading#9049
iagodahlem wants to merge 2 commits into
mainfrom
iago/sso-security-page-loading-latch

Conversation

@iagodahlem

Copy link
Copy Markdown
Member

What

Decouple test-run loading from the page-level loading state on the <OrganizationProfile /> Security page.

useOrganizationEnterpriseConnection's isLoading folded in test-run loading via a session-long hadInitialConnection latch, so a test-run cold-load after the initial page load (e.g. configuring a connection mid-flow) could re-raise the page-level loading state. This adds an initial-settle latch (hasSettledRef) so test-run loading only gates the first page load; afterward it stays strictly table-level (the Test step's own loading), never the page skeleton.

Follow-up to #9046 (the related ORGS-1701 Continue behavior). The user-facing wizard-unmount impact of this loading coupling was already fixed in #8999; this is the architectural cleanup of the isLoading derivation itself.

Tests

Initial load with a connection still gates isLoading on the test-run probe; a later test-run cold-load no longer raises page-level isLoading (stays table-level).

…ge loading

The enterprise-connection hook folded test-runs loading into the page-level
loading flag whenever a connection existed at first load. That latch never
expired, so re-fetching test runs mid-session (e.g. after a reconfigure)
re-raised the whole page skeleton instead of staying a table-level load.

Gate the test-runs term on a "first settle" latch so it only contributes
during the genuine initial page load. The status badge is still correct on
first paint — an existing connection still gates the initial skeleton on its
test-runs probe — but later test-run loads no longer flip the page-level flag.
@vercel

vercel Bot commented Jun 30, 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 Jun 30, 2026 6:18pm
swingset Ready Ready Preview, Comment Jun 30, 2026 6:18pm

Request Review

@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01428ab

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

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 68f81691-b97d-4107-8165-1d8de4214ba4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 01428ab

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