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

This PR introduces a module scoring system to the devtools client. A new useModuleScores composable fetches module scores from an external API and manages them in reactive state with error handling for network and rate-limit issues. A new ModuleScoreBadge component displays the scores with color-coded status indicators and loading states. The badge is integrated into the existing ModuleItem component via a template slot.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

πŸš₯ Pre-merge checks | βœ… 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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' directly and accurately describes the main change: adding health score badges from nuxt.care to modules.
Description check βœ… Passed The description clearly explains the feature being added, including the motivation (quick visibility into module maintenance status) and specific implementation details (status badge types, linking to nuxt.care, 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!

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