Skip to content

fix: correct router registration#342

Open
huang-julien wants to merge 1 commit into
mainfrom
fix/hints_router
Open

fix: correct router registration#342
huang-julien wants to merge 1 commit 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: f50d864

@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: c1318e90-92ab-4320-b4d8-477c294cce87

📥 Commits

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

📒 Files selected for processing (2)
  • src/devtools-handlers.ts
  • src/devtools.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 | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing router registration for the Nuxt hints sub-router, which is the core objective of the changeset.
Description check ✅ Passed The description directly addresses the changeset by explaining that it fixes the Nuxt hints sub-router not being registered, which resulted in 404 errors for hints requests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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