Skip to content

Conversation

@Flo0806
Copy link
Member

@Flo0806 Flo0806 commented Jan 23, 2026

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Adds health score badges from nuxt.care to installed modules, giving developers quick visibility into module maintenance status.

  • Displays status badge (optimal/stable/degraded/critical) next to module name
  • Links to nuxt.care for detailed module information
  • Loading indicator while fetching scores

Screenshots

image

πŸ’š Built in collaboration with nuxt.care

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

πŸ“ Walkthrough

Walkthrough

Adds Nuxt module health/score integration to the devtools client. Introduces a new composable useModuleScores that fetches and caches module and version scores from an external API with debounce, loading state, and error handling. Adds new components: ModuleScoreBadge, ModuleScoreItem, and ModuleUpgradePopup to display score badges, version-specific health details, and an upgrade recommendation popup. Integrates these UI pieces into existing module item views (ModuleItem.vue, ModuleItemInstall.vue) and wires reactive refs for dropdown state and score propagation.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

πŸš₯ Pre-merge checks | βœ… 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (2 passed)
Check name Status Explanation
Title check βœ… Passed The title 'feat(modules): add nuxt.care health score badges' clearly and specifically describes the main changeβ€”adding health score badges from nuxt.care to modules in the UI.
Description check βœ… Passed The description is directly related to the changeset, explaining the feature of adding nuxt.care health score badges with status display, linking functionality, and loading indicators.

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

✨ Finishing touches
  • πŸ“ Generate docstrings
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

<template>
<ModuleItemBase :mod="mod" :info="staticInfo">
<template #badge>
<ModuleScoreBadge class="ml-1" :npm="data.npm" />
Copy link
Member

Choose a reason for hiding this comment

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

About the UI styling, I wonder if this would be better as an item in the table instead of the badge? As I consider the "score" is only one of the aspects of the modules, and does not always reflects if users needs to do any action on that.

Copy link
Member Author

Choose a reason for hiding this comment

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

A short table item inside the module item? Sure. make sense - I will try something

try {
const params = new URLSearchParams([
['slim', 'true'],
...missing.map(name => ['package', name]),
Copy link
Member

Choose a reason for hiding this comment

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

Might be a bit out-of-scope of the current PR, but I wonder if nuxt.care should also count for module versions? In many cases, the users might have an out-dated, no-longer-maintained version installed, where the "score" should be relatively low and ask users to upgrade.

Copy link
Member Author

@Flo0806 Flo0806 Jan 23, 2026

Choose a reason for hiding this comment

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

That's a nice idea! But this time nuxt care doesn't save a history. So I always see the current state. To say: new version available - yes, but nuxt care will have no different score between different versions with the current state.
Anthony, I love this idea... and now I'm sure I can check older versions! I need some days, but I will implement this great feature!

const installedModules = useInstalledModules()

const npmNames = computed(() =>
installedModules.value
Copy link
Member

Choose a reason for hiding this comment

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

Ohter than the fixed "installedModules", we also reuse the UI for modules to install, I wonder if we also need to show the scores (or actually more interesting/useful?) when users are installing new modules.

Copy link
Member Author

Choose a reason for hiding this comment

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

Totally forgot about that. Yes I will work on it!

@Flo0806
Copy link
Member Author

Flo0806 commented Feb 1, 2026

Hi!
The first thing was I integrated it into the module items list:
image

Hover on Health:
image

If there is a new vesion with a better score you'll see the health icon which shows:
image

Here you can start the regular mocule update process.

Install a new module shows now also some infos:
image

I'm open for feedback!

Maybe I should ping you too @antfu, so you know. πŸ™

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.

2 participants