Skip to content

feat(ui): add "dependencies" tab and integrate Health Insights into Search results - #3214

Open
Mopsgamer wants to merge 52 commits into
npmx-dev:mainfrom
Mopsgamer:feat-deps
Open

feat(ui): add "dependencies" tab and integrate Health Insights into Search results#3214
Mopsgamer wants to merge 52 commits into
npmx-dev:mainfrom
Mopsgamer:feat-deps

Conversation

@Mopsgamer

@Mopsgamer Mopsgamer commented Aug 28, 2026

Copy link
Copy Markdown

🔗 Linked issue

Resolves #29

🧭 Context

The dependencies section in the main tab's right column was too crowded and basic. To better track package health, it needs its own dedicated tab with sorting, filtering, and insights.

📚 Description

This PR introduces a new Dependencies tab y for packages at /package-deps/{{package}}/v/{{version}} (also accessible via /package-deps/{{package}}) and removes the old dependencies section from the main tab's right column.

Dependencies Cards Dependencies Table
Stats
Updated Search Cards Updated Search Table

Dependencies provide Insights section, toolbar and the list of dependencies, similar to Search page Cards/Table.

Insights provide data for direct dependencies on Dependencies and Stats pages. They are also clickable "OR" filters. Every insight has 2 numbers: urgent (prod and bundled dependencies) and other (dev, peer, optional). They show updatable, vulnerable, deprecated and replaceable dependencies. Insights' header element provides this information in the (i) tooltip.

@agentscanapp

agentscanapp Bot commented Aug 28, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! 🎉

We really appreciate you taking the time to contribute, @Mopsgamer.

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description explains what changed and why
  • any related issues are linked
  • existing tests still pass

If anything needs adjusting we'll leave comments here. Thanks again!

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
npmx.dev Ready Ready Preview Sep 2, 2026 2:19pm UTC
2 Skipped Deployments
Project Deployment Actions Updated
docs.npmx.dev Ignored Ignored Preview Sep 2, 2026 2:19pm UTC
npmx-lunaria Ignored Ignored Sep 2, 2026 2:19pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ca832c0d-bbf0-46ab-af82-7b0284c4d59e

📥 Commits

Reviewing files that changed from the base of the PR and between e7157f5 and a7308c3.

📒 Files selected for processing (1)
  • app/components/Dependencies/List.vue
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/components/Dependencies/List.vue

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • New Features
    • Added a dedicated dependencies page with filtering, sorting, section selection, table/card views, and keyboard navigation.
    • Added insights for outdated, vulnerable, deprecated, bundled, optional, and replacement-available packages.
    • Added dependency status indicators, loading states, and metadata across package views.
    • Added Dependencies navigation and command palette access.
  • Accessibility
    • Improved keyboard focus and navigation for dependency lists and horizontally scrollable tables.
  • Bug Fixes
    • Improved dependency metadata loading and request handling.
    • Removed misleading pointer-cursor styling from non-clickable cards.
  • Localisation
    • Added translated labels for dependency insights and status information.

Walkthrough

The PR adds a version-specific package dependencies page. It groups dependencies by type, fetches dependency health data, supports filtering, sorting, keyboard navigation, cards and tables, and adds dependency navigation. It also updates related package views, translations, schemas, and tests.

Changes

Package dependencies feature

Layer / File(s) Summary
Dependency contracts and data services
shared/types/package-dependencies.ts, app/utils/npm/*, app/composables/npm/*, app/composables/usePackageDependencyInsights.ts, server/api/replacements/*
Adds dependency models, grouped-section utilities, health insight aggregation, batched replacement lookups, lifecycle states, vulnerability analysis guards, and replacement API support.
Dependencies page and navigation
app/pages/package-deps/..., app/utils/router.ts, app/components/Package/Header.vue, app/composables/useCommandPalettePackageCommands.ts
Adds the dependencies route, version resolution, section query handling, metadata loading, filtering, sorting, SEO data, header navigation, keyboard shortcut, and command-palette entry.
Dependency presentation
app/components/Dependencies/*, app/components/Package/Card.vue, app/components/Package/Table.vue, app/components/Package/TableRow.vue, app/components/Package/List.vue
Adds dependency cards, tables, rows, toolbars, summaries, and status indicators. Package components consume scoped dependency insights and expose status and version slots.
Package-page integration
app/pages/package-stats/..., app/pages/package/..., app/pages/package-code/..., app/components/Package/InstallScripts.vue, app/components/BaseCard.vue
Adds dependency insight summaries and links to the dependencies route, passes requested versions to package loading, updates dependency status handling, and removes the previous inline dependency component.
Translations and validation
i18n/schema.json, i18n/locales/*, test/nuxt/a11y.spec.ts, test/nuxt/utils/package-dependency-sections.spec.ts, test/nuxt/composables/use-replacement-dependencies.spec.ts
Updates translation schemas and locale structures. Adds focused accessibility, dependency-section, and replacement-fetch tests.

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant DependenciesPage
  participant RegistryAPI
  participant InsightComposables
  participant DependencyList
  Browser->>DependenciesPage: Open version-specific dependencies route
  DependenciesPage->>RegistryAPI: Load package and dependency metadata
  DependenciesPage->>InsightComposables: Request outdated, replacement, and vulnerability data
  InsightComposables-->>DependenciesPage: Return dependency insights and statuses
  DependenciesPage->>DependencyList: Pass grouped, filtered, and sorted items
  DependencyList-->>Browser: Render table or card view
Loading

Merge Risk: 🟡 Moderate · up to a7308

The new dependency insights and search integrations can return 500 errors for malformed package paths and may perform repeated health-analysis requests for ordinary package listings, creating avoidable production load; insight labels also remain in English for non-English locales. These issues should be fixed or explicitly accepted before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The core code matches the linked objective, but many locale changes add placeholder translations for unrelated features such as sponsors, noodles, leaderboard, vacations, themes, and changelog updates… Remove unrelated locale changes, or move them to separate pull requests. Keep only translation changes required by the Dependencies tab, dependency Insights, navigation, and search-result integration.
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The implementation satisfies issue #29 by adding a dedicated dependencies page, grouping dependencies by production, development, peer, optional, and bundled sections, and providing clickable package …
Title check ✅ Passed The title clearly summarises the main changes: adding a Dependencies tab and integrating Health Insights into search results.
Description check ✅ Passed The description is directly related to the changeset and explains the new Dependencies tab, navigation, filtering, sorting, Insights, and removal of the previous dependency section.
Full details: Linked Issues check

Explanation

The implementation satisfies issue #29 by adding a dedicated dependencies page, grouping dependencies by production, development, peer, optional, and bundled sections, and providing clickable package links.

Full details: Out of Scope Changes check

Explanation

The core code matches the linked objective, but many locale changes add placeholder translations for unrelated features such as sponsors, noodles, leaderboard, vacations, themes, and changelog updates. These changes are outside the stated dependencies-tab scope.

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

@github-actions

github-actions Bot commented Aug 28, 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

File Note
i18n/locales/ar-EG.json Localization changed, will be marked as complete. 🔄️
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.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/nl.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/pt-PT.json Localization changed, will be marked as complete. 🔄️
i18n/locales/ro-RO.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.

@gameroman

Copy link
Copy Markdown
Member

Instead of a new tab I'd maybe do it the same way the versions page is done?

https://main.npmx.dev/package/nuxt/versions

@Mopsgamer Mopsgamer changed the title feat(ui): Add Dependencies tab and integrate Package/Dependency Insights feat(ui): add "dependencies" tab and integrate Package/Dependency Insights Aug 28, 2026
@Mopsgamer

Copy link
Copy Markdown
Author

Instead of a new tab I'd maybe do it the same way the versions page is done?

https://main.npmx.dev/package/nuxt/versions

We have the "versions" drop-down on every page, but for dependencies we don't have anything. @gameroman

@graphieros graphieros 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.

Looks great!
A horizontal scroll is present on the insights section.
The main table also shows a horizontal scroll, perhaps there is a way for this page to use more of the available horizontal real estate ?

@Mopsgamer

This comment was marked as resolved.

this was the original idea for 'latest' version specifier for dependencies - make it green and say patch is available. except class wasn't here
…, make such elements larger.

also add icons before versions if updates available for cards
rename insights to dependency health

add health checkmark

make 0 non-interactive

replace '0 / 0' with just checkmark and 0
@graphieros
graphieros dismissed their stale review September 2, 2026 17:03

Dismissing the approval for now as the code changed quite lot since then and I'm AFK

@graphieros graphieros 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.

Noticed some inconsistent behavior with the insights (here with Nuxt):

Image
  • Some metrics are clickable but should not (patch behind 0 / 3)
  • Some metrics are invalid (replacements available 1 / 0, should be 1 / 1)

Other remarks:

  • The insights act as additional filters, and only do so on the dependencies page, which is great. I would recommend to add extra information in the i tooltip of the dependency health block when on the dependencies page to indicate that metrics can act as additional filters, otherwise the feature might be too confidential.

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.

add package dependencies tab with grouped view

3 participants