Skip to content

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

Open
akadotsh wants to merge 3 commits 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 3 commits 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 13, 2026 6:01pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 13, 2026 6:01pm
npmx-lunaria Ignored Ignored Apr 13, 2026 6:01pm

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 010daa38-8e82-4219-9147-6bfa8b424d56

📥 Commits

Reviewing files that changed from the base of the PR and between 8bca677 and 8133aa6.

📒 Files selected for processing (1)
  • i18n/schema.json

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • README section now shows a loading indicator, explicit error message, and a clear "no README" state when appropriate.
  • Localisation

    • Added "failed to load README" translations for 29 languages.
  • Chores

    • Updated localisation schema to include the new README error message key.

Walkthrough

Lazy README fetch now returns both data and status; the package page template uses status-aware conditionals to show loading, error, or empty README states only when the fetch result is known.

Changes

Cohort / File(s) Summary
Package page
app/pages/package/[[org]]/[name].vue
Destructure useLazyFetch<ReadmeResponse> to also expose readmeStatus; replace single v-else fallback with explicit branches for pending, error, and success (show "no_readme" only when status is success and no HTML).
i18n locale additions
i18n/locales/*.json
(i18n/locales/en.json, i18n/locales/de.json, i18n/locales/zh-CN.json, i18n/locales/...)
Add package.readme.error_loading translation across many locale files; adjust nearby punctuation/serialization to accommodate the new key.
i18n schema
i18n/schema.json
Add readme.error_loading property (type: string) to the i18n schema to validate the new translation key.

Possibly related PRs

Suggested reviewers

  • alexdln
  • graphieros
  • danielroe
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: preventing the "No README available" message from appearing during the loading state of README content.
Description check ✅ Passed The description is directly related to the changeset, explaining the update to README rendering logic to use fetch status and show the no-README message only after a successful fetch.
Linked Issues check ✅ Passed The PR implements the objective from issue #2467: preventing the "No README available" message from showing during the loading state by updating the rendering logic to check fetch status before displaying messages.
Out of Scope Changes check ✅ Passed All changes are in scope: Vue component update for conditional rendering based on fetch status, addition of error_loading i18n keys across all locale files, and schema update to include the new i18n property.

✏️ 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

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[[org]]/[name].vue 50.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@serhalp
Copy link
Copy Markdown
Member

serhalp commented Apr 11, 2026

🙌🏼 Thank you @akadotsh!

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 13, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/ar.json Localization changed, will be marked as complete. 🔄️
i18n/locales/az-AZ.json Localization changed, will be marked as complete. 🔄️
i18n/locales/bg-BG.json Localization changed, will be marked as complete. 🔄️
i18n/locales/bn-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/cs-CZ.json Localization changed, will be marked as complete. 🔄️
i18n/locales/de.json Localization changed, will be marked as complete. 🔄️
i18n/locales/en.json Source changed, localizations will be marked as outdated.
i18n/locales/es-419.json Localization changed, will be marked as complete. 🔄️
i18n/locales/es.json Localization changed, will be marked as complete. 🔄️
i18n/locales/fr-FR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/hi-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/hu-HU.json Localization changed, will be marked as complete. 🔄️
i18n/locales/id-ID.json Localization changed, will be marked as complete. 🔄️
i18n/locales/it-IT.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ja-JP.json Localization changed, will be marked as complete. 🔄️
i18n/locales/kn-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/mr-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/nb-NO.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ne-NP.json Localization changed, will be marked as complete. 🔄️
i18n/locales/pl-PL.json Localization changed, will be marked as complete. 🔄️
i18n/locales/pt-BR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ru-RU.json Localization changed, will be marked as complete. 🔄️
i18n/locales/sr-Latn-RS.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ta-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/te-IN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/tr-TR.json Localization changed, will be marked as complete. 🔄️
i18n/locales/uk-UA.json Localization changed, will be marked as complete. 🔄️
i18n/locales/vi-VN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/zh-CN.json Localization changed, will be marked as complete. 🔄️
i18n/locales/zh-TW.json Localization changed, will be marked as complete. 🔄️
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

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