fix(dashboard): domains page never leaves skeleton - #417
Conversation
GET /v1/projects returns ProjectResponse.id, but the domains hook read project_id and never got a project. The list hook then skipped the fetch and never set loading=false, so the page stayed on the skeleton. Use the shared project scope's p.id, clear loading when there is no project, and add Domains to the Settings nav. Fixes #409 Co-Authored-By: Duyet Le <me@duyet.net> Co-Authored-By: duyetbot <bot@duyet.net>
Reviewer's GuideFixes the dashboard Domains page skeleton hang by sourcing the active project ID from the shared project scope, updating the domains list hook to respect scope loading state and handle no-project scenarios, and adding a Domains entry to the Settings navigation. Sequence diagram for dashboard domains loading and skeleton behaviorsequenceDiagram
actor User
participant DomainsPage
participant ProjectScope as useProjectScope
participant DomainsListHook as useDomainsList
participant DomainsService as loadDomains
User->>DomainsPage: open /dashboard/domains/
DomainsPage->>ProjectScope: useProjectScope()
ProjectScope-->>DomainsPage: selectedProject, loadingProjects
DomainsPage->>DomainsListHook: useDomainsList(selectedProject.id)
alt [loadingProjects true]
DomainsListHook-->>DomainsListHook: [wait for project scope]
else [loadingProjects false]
alt [projectId not null]
DomainsListHook->>DomainsService: loadDomains(projectId)
DomainsService-->>DomainsListHook: domains
DomainsListHook-->>DomainsPage: setLoading(false)
else [projectId null]
DomainsListHook-->>DomainsPage: setDomains([])
DomainsListHook-->>DomainsPage: setLoading(false)
end
end
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
Next review available in: 116 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 |
Summary
Dashboard custom domains stayed on the loading skeleton forever.
_use-project-id.tsreadproject_idfromGET /v1/projects, butProjectResponseonly hasid.projectIdstayed null, so the list hook never fetched and never setloading=false.useProjectScope()/selectedProject.idinstead of a second/v1/projectsfetchapp-shell.tsxFixes #409
Test plan
/dashboard/domains/with a signed-in project — page leaves the skeleton and lists domains (or empty state)/dashboard/domains/Summary by Sourcery
Fix the dashboard custom domains page so it correctly loads based on the shared project scope and expose it in the Settings navigation.
Bug Fixes:
Enhancements: