Skip to content

fix: avoid showing "No README is available" during README load#2473

Open
akadotsh wants to merge 1 commit intonpmx-dev:mainfrom
akadotsh:fix/no-readme-visible-when-readme-is-loading
Open

fix: avoid showing "No README is available" during README load#2473
akadotsh wants to merge 1 commit intonpmx-dev:mainfrom
akadotsh:fix/no-readme-visible-when-readme-is-loading

Conversation

@akadotsh
Copy link
Copy Markdown
Contributor

🔗 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.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 11, 2026 9:12am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 11, 2026 9:12am
npmx-lunaria Ignored Ignored Apr 11, 2026 9:12am

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cb566424-5407-4054-917f-7d81b118dab9

📥 Commits

Reviewing files that changed from the base of the PR and between 0164064 and 752f8f7.

📒 Files selected for processing (1)
  • app/pages/package/[[org]]/[name].vue

📝 Walkthrough

Walkthrough

This 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

  • PR 1648: Modifies the same package page's readme fetching and template logic, addressing similar conditional rendering behaviour to avoid premature UI flicker during README loading.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly describes the changes made to the README rendering logic and references the linked issue #2467.
Linked Issues check ✅ Passed The code changes directly address issue #2467 by modifying the README rendering logic to check fetch status before displaying the no-README message.
Out of Scope Changes check ✅ Passed All changes are focused on fixing the README loading state issue in the specified Vue component file, with no out-of-scope modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

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

@akadotsh akadotsh changed the title Fix: "No README is available" appearing while README is still loading fix: avoid showing "No README is available" during README load Apr 11, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

class="scroll-mt-20"
>
<div
v-if="provenanceStatus === 'pending'"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add a loading state similar to this one? 🙏🏼

:details="provenanceData"
class="mt-8"
/>
<!-- Error state: provenance exists but details failed to load -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏼 and while we're here, I think we aren't handling readme loading errors, are we? we could do something like this!

@serhalp
Copy link
Copy Markdown
Member

serhalp commented Apr 11, 2026

🙌🏼 Thank you @akadotsh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"No README is available" can show while readme is loading

2 participants