Skip to content

fix: correct router registration#342

Open
huang-julien wants to merge 2 commits into
mainfrom
fix/hints_router
Open

fix: correct router registration#342
huang-julien wants to merge 2 commits into
mainfrom
fix/hints_router

Conversation

@huang-julien
Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

Fix the nuxt hints sub-router not being registered resulting in 404 for hints requests

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/hints@342

commit: fe6ec47

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 53b46d28-8982-4ed0-baf5-f615653f7234

📥 Commits

Reviewing files that changed from the base of the PR and between f50d864 and fe6ec47.

📒 Files selected for processing (2)
  • src/devtools-handlers.ts
  • src/devtools.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/devtools.ts
  • src/devtools-handlers.ts

📝 Walkthrough

Walkthrough

This PR refactors the hints router setup by moving the dev-server handler registration logic into a dedicated function. The createHintsRouter function is made private and reconfigured to use preemptive: true. A new exported registerDevServerHandlers() function encapsulates router creation and registration with Nuxt Dev Server at the /__nuxt_hints route. The integration point in devtools.ts is updated to call this function instead of managing registration inline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: correct router registration' directly matches the main change: refactoring router registration logic to properly register the hints router, eliminating 404 errors.
Description check ✅ Passed The description accurately describes the problem being solved: 'Fix the nuxt hints sub-router not being registered resulting in 404 for hints requests,' which aligns with the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hints_router

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

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.

1 participant