Skip to content

feat: preview mode show the pr number#1729

Merged
danielroe merged 6 commits intonpmx-dev:mainfrom
btea:feat/preview-mode-show-the-pr-number
Feb 28, 2026
Merged

feat: preview mode show the pr number#1729
danielroe merged 6 commits intonpmx-dev:mainfrom
btea:feat/preview-mode-show-the-pr-number

Conversation

@btea
Copy link
Contributor

@btea btea commented Feb 28, 2026

🔗 Linked issue

/

🧭 Context

It makes it easier to distinguish between multiple pull requests when previewing them, and also makes it easier to quickly switch back to GitHub after previewing.

📚 Description

npmx

@vercel
Copy link

vercel bot commented Feb 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 Feb 28, 2026 3:24am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 28, 2026 3:24am
npmx-lunaria Ignored Ignored Feb 28, 2026 3:24am

Request Review

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 50.00000% 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/AppHeader.vue 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

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

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe474ab and b2de7a0.

📒 Files selected for processing (2)
  • shared/types/env.ts
  • test/nuxt/components/BuildEnvironment.spec.ts

📝 Walkthrough

Walkthrough

Adds PR-number support end-to-end: reads PR ID from environment (REVIEW_ID or VERCEL_GIT_PULL_REQUEST_ID) in config, exposes it via getEnv, includes it in BuildInfo, updates modules/build-env.ts and shared/types/env.ts to carry prNumber, and conditionally renders a GitHub PR badge/link in the desktop AppHeader when prNumber is present.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description relates to the changeset, explaining the feature to display PR numbers in preview mode with context about the use case.

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

✨ Finishing Touches
🧪 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.

Copy link
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

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 85ac3d7 and 087fc17.

📒 Files selected for processing (2)
  • app/components/AppHeader.vue
  • nuxt.config.ts

Copy link
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

🧹 Nitpick comments (1)
app/components/AppHeader.vue (1)

231-239: Consider opening the PR link in a new tab to preserve preview context.

This makes switching between preview and GitHub smoother, and rel hardens external navigation.

Suggested tweak
         <NuxtLink
           v-if="prId"
           :to="`https://github.com/npmx-dev/npmx.dev/pull/${prId}`"
           :aria-label="`Open GitHub pull request ${prId}`"
+          target="_blank"
+          rel="noopener noreferrer"
         >

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 087fc17 and 0a79d95.

📒 Files selected for processing (1)
  • app/components/AppHeader.vue

Copy link
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

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2df8ab and fe474ab.

📒 Files selected for processing (3)
  • config/env.ts
  • modules/build-env.ts
  • shared/types/env.ts

@danielroe danielroe added this pull request to the merge queue Feb 28, 2026
Merged via the queue into npmx-dev:main with commit 8c757b0 Feb 28, 2026
18 checks passed
@btea btea deleted the feat/preview-mode-show-the-pr-number branch February 28, 2026 07:57
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.

3 participants