fix(admin): fix Org Security loading state UI#1738
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughDomainsList now renders loading, error, retry, empty, and populated states. OrganizationSecurity passes query errors and a refetch callback into the component, with new CSS styles for status and empty-state layouts. ChangesDomains list retry UI
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/sdk/admin/views/organizations/details/security/domains-list.tsx (1)
157-165: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winRetry button has no in-flight/disabled state.
Clicking Retry triggers
onRetry()(parent'srefetch()), but there's no indication that a refetch is in progress and nothing prevents multiple rapid clicks from firing duplicate requests while the previous one is still pending.Consider threading an
isFetching/isRetryingflag down to disable the button (and optionally show a loading label) while a refetch is outstanding.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1335a2e4-b2b2-4faf-8b48-5ba5442cb8d4
📒 Files selected for processing (2)
web/sdk/admin/views/organizations/details/security/domains-list.tsxweb/sdk/admin/views/organizations/details/security/index.tsx
Coverage Report for CI Build 29076302264Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.003%) to 44.876%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions219 previously-covered lines in 7 files lost coverage.
Coverage Stats
💛 - Coveralls |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary
The Org → Security page had a buggy loading state — the "Allowed email domains" loader showed up as an unstyled empty box, and the whole section would vanish or behave oddly depending on the data. This PR fixes the loader and makes the loading, empty, and error states consistent and clear.
Changes
react-loading-skeletonto Apsara'sSkeleton(self-styled, no extra CSS needed).Technical Details
react-loading-skeletonSkeletonrelies onreact-loading-skeleton/dist/skeleton.css, which is never imported anywhere inweb/sdk/adminorweb/apps/admin. The app's<SkeletonTheme>only provides color variables, not the base skeleton styles — so the skeleton rendered as an invisible/empty box. Apsara'sSkeletonships its own styles, so it works out of the box (same approach assession-skeleton.tsxandapis/details-dialog.tsx).null). Thenullempty case made the bordered box disappear, causing the "abrupt close" jump. All four states (loading/list/empty/error) now share the same.domains-listcontainer for a stable layout.error+onRetryfrom thelistOrganizationDomainsquery inindex.tsx; Retry calls the query'srefetch(). The existing error toast is kept.Test Plan
ListOrganizationDomainsrequest in DevTools) and confirmed the error state + Retry button appear; Retry re-fetches and recovers.tsc --noEmitclean for the changed files)SQL Safety (if your PR touches
*_repository.goorgoqu.*)N/A