fix(home): Make product and contributor count fetching logic more robust#1286
fix(home): Make product and contributor count fetching logic more robust#1286
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new utility function Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client / Browser
participant Server as Page.ts Load
participant FetchLib as fetchRequired
participant API as API Server
Client->>Server: Request homepage
Server->>Server: Call load()
Server->>FetchLib: fetchRequired(fetch, productCountURL)
Server->>FetchLib: createProductsApi().getFacet('contributors')
note over Server: Return unresolved promises
Server-->>Client: Page data with promises
par Product Count Fetch
FetchLib->>API: GET productCount.json
API-->>FetchLib: Response + status
FetchLib->>FetchLib: Validate ok + format
FetchLib-->>Client: Resolved count or error
and Contributor Count Fetch
FetchLib->>API: GET contributors facet
API-->>FetchLib: Response + data
FetchLib-->>Client: Resolved count or error
end
Client->>Client: Render await blocks
activate Client
Client->>Client: Show skeleton (pending)
Client->>Client: Show CountUp (resolved)
Client->>Client: Show -- (rejected)
deactivate Client
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Issues attributed to commits in this pull requestThis pull request was merged and Sentry observed the following issues:
|
Summary by CodeRabbit