Skip to content

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

Merged
serhalp merged 4 commits into
npmx-dev:mainfrom
akadotsh:fix/no-readme-visible-when-readme-is-loading
Apr 17, 2026
Merged

fix: avoid showing "No README is available" during README load#2473
serhalp merged 4 commits into
npmx-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

vercelBot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 14, 2026 6:44pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 14, 2026 6:44pm
npmx-lunariaIgnoredIgnoredApr 14, 2026 6:44pm

Request Review

@coderabbitai

coderabbitaiBot commented Apr 11, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • New Features
    • Enhanced README section with improved loading state indicators and error message display when README details fail to load.

Walkthrough

This PR resolves a UI issue where "No README is available" displays while the README is loading. The fix updates the package page component to distinguish between pending, error, and success states for README fetching, and migrates provenance error handling translations whilst introducing dedicated README error messaging.

Changes

Cohort / File(s)Summary
README Loading State
app/pages/package/[[org]]/[name].vue
Updated lazy fetch to capture readmeStatus alongside readmeData. Modified conditional rendering to show loading indicator when pending, error message when failed, and "no README" only when successful with no content. Changes render logic from single fallback to explicit state-based conditions.
i18n Schema
i18n/schema.json
Added new property readme.error_loading to the i18n schema as a string type, formalising support for the new README error message key.
English Locale
i18n/locales/en.json
Added new translation key package.readme.error_loading with message "Failed to load README details".
Provenance Error Removal (All Locales)
i18n/locales/ar.json, az-AZ.json, bg-BG.json, cs-CZ.json, de.json, es.json, fr-FR.json, hi-IN.json, hu-HU.json, id-ID.json, it-IT.json, ja-JP.json, mr-IN.json, nb-NO.json, pl-PL.json, pt-BR.json, ru-RU.json, sr-Latn-RS.json, ta-IN.json, tr-TR.json, uk-UA.json, vi-VN.json, zh-CN.json, zh-TW.json
Removed the translation key package.provenance_section.error_loading from all non-English locales, consolidating error handling strategy across the application.

Possibly related PRs

Suggested reviewers

  • alexdln
  • danielroe
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Out of Scope Changes check⚠️ WarningThe PR includes out-of-scope translation changes. Whilst the comments indicate the author later reverted non-English translations per reviewer feedback, the current changeset still removes provenance_section.error_loading from 21 locale files and adds readme.error_loading to en.json and schema.json without corresponding implementation in the main component.Verify that translation changes are necessary for the linked issue objective and ensure consistency between translated keys and actual component usage. Remove unnecessary translation removals or clarify their necessity.
✅ Passed checks (3 passed)
Check nameStatusExplanation
Title check✅ PassedThe title accurately describes the main change: updating README rendering logic to avoid showing 'No README available' during the loading state.
Description check✅ PassedThe description is directly related to the changeset, mentioning the core objective of updating README rendering logic to use fetch status.
Linked Issues check✅ PassedThe PR successfully addresses #2467 by updating README component logic to check fetch status ('pending', 'error', 'success') before displaying messages, preventing 'No README available' from appearing during loading.

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

@akadotshakadotsh changed the title Fix: "No README is available" appearing while README is still loadingfix: avoid showing "No README is available" during README loadApr 11, 2026
@codecov

codecovBot commented Apr 11, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing linesPatch %Lines
app/pages/package/[[org]]/[name].vue40.00%2 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Comment threadapp/pages/package/[[org]]/[name].vue
Comment threadapp/pages/package/[[org]]/[name].vue
@serhalp

Copy link
Copy Markdown
Member

🙌🏼 Thank you @akadotsh!

@github-actions

github-actionsBot commented Apr 13, 2026

Copy link
Copy Markdown

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

FileNote
i18n/locales/en.jsonSource changed, localizations will be marked as outdated.
Warnings reference
IconDescription
🔄️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.

@serhalp

Copy link
Copy Markdown
Member

@akadotsh looks great! but please only include translations for languages you are comfortable translating yourself; don't use AI or online translators for others please. You can just leave the other json files unchanged, and other people will translate the new key eventually! 🙏🏼

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
i18n/locales/az-AZ.json (1)

329-338: ⚠️ Potential issue | 🟡 Minor

Restore package.provenance_section.error_loading to prevent a localisation regression.

The provenance error UI still calls package.provenance_section.error_loading, but this key was removed from az-AZ.json in this block. On provenance fetch failures, Azerbaijani users will get a fallback/missing translation instead of the existing localised copy.

Suggested fix
 "transparency_log_entry": "Şəffaflıq jurnalı qeydi",
- "view_more_details": "Daha çox detala bax"+ "view_more_details": "Daha çox detala bax",+ "error_loading": "Mənşə detalları yüklənə bilmədi"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@i18n/locales/az-AZ.json` around lines 329 - 338, Restore the missing
translation key package.provenance_section.error_loading in az-AZ.json under the
provenance_section object: add the error_loading property with the appropriate
Azerbaijani message (matching the original localization used elsewhere) so code
referencing package.provenance_section.error_loading finds a valid string;
update the provenance_section block in az-AZ.json to include "error_loading":
"<localized message>" alongside the existing keys like title,
built_and_signed_on, and view_more_details.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@i18n/locales/az-AZ.json`:
- Around line 329-338: Restore the missing translation key
package.provenance_section.error_loading in az-AZ.json under the
provenance_section object: add the error_loading property with the appropriate
Azerbaijani message (matching the original localization used elsewhere) so code
referencing package.provenance_section.error_loading finds a valid string;
update the provenance_section block in az-AZ.json to include "error_loading":
"<localized message>" alongside the existing keys like title,
built_and_signed_on, and view_more_details.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4c0d795-de21-46ad-a9d8-2a4ffac68214

📥 Commits

Reviewing files that changed from the base of the PR and between 8133aa6 and 1b02d78.

📒 Files selected for processing (24)
  • i18n/locales/ar.json
  • i18n/locales/az-AZ.json
  • i18n/locales/bg-BG.json
  • i18n/locales/cs-CZ.json
  • i18n/locales/de.json
  • i18n/locales/es.json
  • i18n/locales/fr-FR.json
  • i18n/locales/hi-IN.json
  • i18n/locales/hu-HU.json
  • i18n/locales/id-ID.json
  • i18n/locales/it-IT.json
  • i18n/locales/ja-JP.json
  • i18n/locales/mr-IN.json
  • i18n/locales/nb-NO.json
  • i18n/locales/pl-PL.json
  • i18n/locales/pt-BR.json
  • i18n/locales/ru-RU.json
  • i18n/locales/sr-Latn-RS.json
  • i18n/locales/ta-IN.json
  • i18n/locales/tr-TR.json
  • i18n/locales/uk-UA.json
  • i18n/locales/vi-VN.json
  • i18n/locales/zh-CN.json
  • i18n/locales/zh-TW.json
✅ Files skipped from review due to trivial changes (3)
  • i18n/locales/it-IT.json
  • i18n/locales/uk-UA.json
  • i18n/locales/de.json
🚧 Files skipped from review as they are similar to previous changes (12)
  • i18n/locales/ar.json
  • i18n/locales/ja-JP.json
  • i18n/locales/pt-BR.json
  • i18n/locales/id-ID.json
  • i18n/locales/ta-IN.json
  • i18n/locales/tr-TR.json
  • i18n/locales/zh-CN.json
  • i18n/locales/bg-BG.json
  • i18n/locales/ru-RU.json
  • i18n/locales/hu-HU.json
  • i18n/locales/fr-FR.json
  • i18n/locales/vi-VN.json

@akadotsh

Copy link
Copy Markdown
ContributorAuthor

Got it, kept the new key only in en.json and reverted other locales 👍

@serhalpserhalp left a comment

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.

thank you!

@serhalp
serhalp added this pull request to the merge queueApr 17, 2026
Merged via the queue into npmx-dev:main with commit cbcdc54Apr 17, 2026
21 checks passed
@github-actionsgithub-actionsBot mentioned this pull request Apr 17, 2026
ayo-run pushed a commit to ayo-run/npmx.dev that referenced this pull request Aug 5, 2026
Sign up for freeto 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

@akadotsh@serhalp