fix: avoid showing "No README is available" during README load#2473
fix: avoid showing "No README is available" during README load#2473akadotsh wants to merge 1 commit intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request modifies the package details page to fix a timing issue with README display. The change updates the lazy fetch for README content to expose both the response data and fetch status. The template logic is then updated to conditionally render the "no readme" fallback message only after the fetch successfully completes with no HTML content, rather than showing the fallback unconditionally. This prevents the message from appearing whilst the README is still being fetched. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
| class="scroll-mt-20" | ||
| > | ||
| <div | ||
| v-if="provenanceStatus === 'pending'" |
There was a problem hiding this comment.
could we add a loading state similar to this one? 🙏🏼
| :details="provenanceData" | ||
| class="mt-8" | ||
| /> | ||
| <!-- Error state: provenance exists but details failed to load --> |
There was a problem hiding this comment.
🙏🏼 and while we're here, I think we aren't handling readme loading errors, are we? we could do something like this!
|
🙌🏼 Thank you @akadotsh! |
🔗 Linked issue
Closes #2467
🧭 Context
📚 Description
Updated README rendering logic to use fetch status and only show the no-README message after a successful fetch with empty content.