Skip to content

feat: add package access/collaborators page#2307

Open
thealxlabs wants to merge 1 commit intonpmx-dev:mainfrom
thealxlabs:feat/package-access-page
Open

feat: add package access/collaborators page#2307
thealxlabs wants to merge 1 commit intonpmx-dev:mainfrom
thealxlabs:feat/package-access-page

Conversation

@thealxlabs
Copy link
Copy Markdown

Adds a dedicated /package/<name>/access page for managing team and collaborator access.

Previously the AccessControls component was only reachable via the sidebar on the main package page. This gives it a proper URL, tab in the nav, and a connect prompt for users who haven't set up the local connector yet.

What changed

  • Pageapp/pages/package/[[org]]/[name]/access.vue wrapping the existing PackageAccessControls component
  • Header tab — "access" tab added to the package navigation bar
  • Connect prompt — shown when the npm connector isn't running, with a button to open the connector modal
  • i18n — page title, subtitle, and connect prompt strings
  • README — package admin marked as implemented, removed from "Not yet supported" URL list

Test

Visit /package/@nuxt/kit/access with the local connector running — should show current collaborators and team access. Without the connector, shows a prompt to connect.

Gives /package/<name>/access its own dedicated page instead of just
being buried in the sidebar. Shows the existing AccessControls component
when the npm connector is running, or a connect prompt otherwise.

- New page at /package/[[org]]/[name]/access.vue
- Access tab added to the package navigation header
- i18n keys for the page title, subtitle, and connect prompt
- README updated, removed /access from "Not yet supported" URL list
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 28, 2026

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

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Mar 28, 2026 1:49pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Mar 28, 2026 1:49pm
npmx-lunaria Ignored Ignored Mar 28, 2026 1:49pm

Request Review

@github-actions
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/en.json Source changed, localizations will be marked as outdated.
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.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 28, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/components/Package/Header.vue 87.50% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

📝 Walkthrough

Walkthrough

This PR introduces a new package access management feature to the npmx.dev platform. The README is updated to document this capability in the Features list and shift the "Package admin (access/owners)" status from unsupported to fully supported. The Package Header component is extended with a new 'access' page type and an accessLink computed property to route to the package access page. A new page component is created that fetches package metadata, displays access controls when a connector is connected, and shows a locked state otherwise. Supporting translation keys and schema definitions are added to the i18n configuration for English localisation.

Possibly related PRs

Suggested reviewers

  • alexdln
  • danielroe
  • ghostdevv
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly explains the addition of a dedicated /package//access page for managing team and collaborator access, detailing all changes including new page component, header tab, connect prompt, i18n updates, and README modifications.

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 491dabab-dfd1-4b6e-abb7-3bf0781176a1

📥 Commits

Reviewing files that changed from the base of the PR and between e62baf4 and 8557c7c.

📒 Files selected for processing (5)
  • README.md
  • app/components/Package/Header.vue
  • app/pages/package/[[org]]/[name]/access.vue
  • i18n/locales/en.json
  • i18n/schema.json

Comment on lines +42 to +45
useSeoMeta({
title: () => `Access - ${packageName.value} - npmx`,
description: () => `Manage access and collaborators for ${packageName.value}`,
})
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and inspect lines 42-45
if [ -f "app/pages/package/[[org]]/[name]/access.vue" ]; then
  echo "=== File exists ==="
  wc -l "app/pages/package/[[org]]/[name]/access.vue"
  echo "=== Lines 40-50 ==="
  sed -n '40,50p' "app/pages/package/[[org]]/[name]/access.vue"
else
  echo "File not found at literal path, searching for access.vue in package pages..."
  find app/pages -name "access.vue" -type f
fi

Repository: npmx-dev/npmx.dev

Length of output: 449


🏁 Script executed:

# Search for the translation keys in the locale files
echo "=== Searching for package.access.page_title ==="
rg "package\.access\.page_title" i18n/locales/

echo "=== Searching for package.access.page_subtitle ==="
rg "package\.access\.page_subtitle" i18n/locales/

echo "=== Checking what access-related keys exist ==="
rg "package\.access" i18n/locales/ -A 1

Repository: npmx-dev/npmx.dev

Length of output: 207


🏁 Script executed:

# Check what page_title and page_subtitle keys exist
echo "=== Existing page_title keys ==="
rg '"[^"]*page_title' i18n/locales/en-US.json | head -20

echo "=== Existing page_subtitle keys ==="
rg '"[^"]*page_subtitle' i18n/locales/en-US.json | head -20

echo "=== Check if en-US.json exists ==="
ls -la i18n/locales/ | head -10

Repository: npmx-dev/npmx.dev

Length of output: 704


🏁 Script executed:

# Search for "Access" in the locale files to see if there are any access-related translations
echo "=== Searching for 'Access' in locale files ==="
rg -i '"Access' i18n/locales/en-US.json

echo "=== Searching for collaborators translations ==="
rg -i 'collaborator' i18n/locales/en-US.json

Repository: npmx-dev/npmx.dev

Length of output: 156


🏁 Script executed:

# Check how other package pages (like /details or /settings) handle useSeoMeta
echo "=== Checking details.vue for SEO metadata pattern ==="
find app/pages/package -name "*.vue" -type f | head -10

echo "=== Looking for useSeoMeta usage in package pages ==="
rg -l "useSeoMeta" app/pages/package/ -t vue

Repository: npmx-dev/npmx.dev

Length of output: 432


🏁 Script executed:

# Find the correct English locale file
echo "=== List all locale files ==="
ls i18n/locales/ | grep -E "^en"

echo "=== Check size of en.json if it exists ==="
if [ -f "i18n/locales/en.json" ]; then
  wc -l i18n/locales/en.json
fi

Repository: npmx-dev/npmx.dev

Length of output: 189


🏁 Script executed:

# Search for useSeoMeta in all vue files in package pages
echo "=== Finding useSeoMeta usage in package pages ==="
grep -r "useSeoMeta" app/pages/package/ --include="*.vue"

Repository: npmx-dev/npmx.dev

Length of output: 217


🏁 Script executed:

# Check the main package page to see SEO metadata pattern
echo "=== Check [name].vue for useSeoMeta pattern ==="
grep -A 3 "useSeoMeta" "app/pages/package/[[org]]/[name].vue"

echo "=== Check index.vue for useSeoMeta pattern ==="
grep -A 3 "useSeoMeta" "app/pages/package/[[org]]/[name]/index.vue"

echo "=== Check versions.vue for useSeoMeta pattern ==="
grep -A 3 "useSeoMeta" "app/pages/package/[[org]]/[name]/versions.vue"

Repository: npmx-dev/npmx.dev

Length of output: 473


🏁 Script executed:

# Check what's in en.json - look for page-related keys
echo "=== en.json structure ==="
head -100 i18n/locales/en.json | cat -n

echo "=== Search for 'page' keys in en.json ==="
rg '"[^"]*page' i18n/locales/en.json | head -30

Repository: npmx-dev/npmx.dev

Length of output: 6258


🏁 Script executed:

# Search for any use of $t() in useSeoMeta across the entire codebase
echo "=== Looking for $t() usage in useSeoMeta ==="
grep -r "useSeoMeta" app/ --include="*.vue" -A 10 | grep -E "(useSeoMeta|t\()" | head -20

# Also check if useSeoMeta is used with $t() anywhere
grep -r "\$t(" app/pages/ --include="*.vue" | head -10

Repository: npmx-dev/npmx.dev

Length of output: 2094


🏁 Script executed:

# Check the en.json file to understand the structure and naming conventions
echo "=== Looking at en.json full content ==="
cat i18n/locales/en.json

Repository: npmx-dev/npmx.dev

Length of output: 50373


Localise SEO metadata instead of hard-coding English copy.

useSeoMeta currently bypasses translations, so metadata stays English in non-English locales. Other pages like about.vue and accessibility.vue already follow this localisation pattern.

🌍 Suggested fix
 useSeoMeta({
-  title: () => `Access - ${packageName.value} - npmx`,
-  description: () => `Manage access and collaborators for ${packageName.value}`,
+  title: () => `${$t('package.access.page_title')} - ${packageName.value} - npmx`,
+  description: () => $t('package.access.page_subtitle', { name: packageName.value }),
 })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
useSeoMeta({
title: () => `Access - ${packageName.value} - npmx`,
description: () => `Manage access and collaborators for ${packageName.value}`,
})
useSeoMeta({
title: () => `${$t('package.access.page_title')} - ${packageName.value} - npmx`,
description: () => $t('package.access.page_subtitle', { name: packageName.value }),
})

@graphieros graphieros added the automation This PR might have been created by an AI, which goes against our code of conduct. label Mar 29, 2026
Copy link
Copy Markdown
Contributor

@graphieros graphieros left a comment

Choose a reason for hiding this comment

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

While AI tools can be helpful for coding assistance, our project requires genuine human involvement. We've outlined this clearly in our contribution guidelines.

If you're genuinely interested in contributing to npmx.dev:

Engage with the community first (issues, discussions). A PR should be linked to an existing issue.
Understand the codebase and what we actually need
Submit thoughtful, individual PRs with your own descriptions
Follow up on feedback and participate in reviews
Use AI as a tool to assist you, not replace you
Mass-generated PRs like these won't be accepted. We welcome real contributions from developers who want to be part of our community.

Please acknowledge by answering this comment, in your own words.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation This PR might have been created by an AI, which goes against our code of conduct.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants