Repository navigation
Fix the PrettyJSON hydration mismatch; close two stale backlog entries - #283
Merged
Merged
Conversation
Node resolves vue-json-pretty to its UMD build. Left external, the
server's default import was { default: Tree } rather than the
component, so SSR emitted an empty comment and hydration failed on
/kommt-bald and /api/cocktails. build.transpile lets Vite unwrap it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RE7Gq8fzzVAfBahzvcUqTP
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RE7Gq8fzzVAfBahzvcUqTP
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped fix matches the diagnosed import issue, with documented production-build verification and no identified blockers.
No open issues 🎉
What changed in this PR
Fixes PrettyJSON’s production hydration mismatch by bundling vue-json-pretty for server rendering.
Changes:
- Adds
vue-json-prettyto Nuxt’s transpilation configuration. - Documents the fix and closes stale auth-logging and Fathom verification entries.
| File | Description |
|---|---|
nuxt-app/nuxt.config.ts |
Bundles the JSON viewer to correct server-side import handling. |
docs/dependency-upgrade-plan.md |
Records hydration diagnosis, verification, and completed backlog work. |
Review effort: Balanced
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
/kommt-baldand/api/cocktailsloggedHydration completed but contains mismatches.in production builds, identically onmain. The server never rendered the JSON tree.vue-json-prettyhas noexportsmap, so Node resolves it to its UMD build (lib/), and Nitro left it external. In the production server,import VueJsonPretty from 'vue-json-pretty'then resolves to{ default: Tree }: a wrapper with no render function. Vue renders that as an empty comment (<!---->). The client gets the real component from Vite, builds adiv, and hydration fails. A dev build is clean because Vite handles the interop there.How it was found
__VUE_PROD_HYDRATION_MISMATCH_DETAILS__temporarily defined named the node: rendered on server: comment, expected on client: div.vjs-treeat all.vue/server-rendererworked. Importing it from inside.output/servershowed the wrapper.The fix
build.transpile: ['vue-json-pretty']innuxt.config.ts. Vite then bundles the library into the server build and unwraps the default export.Verification
vjs-tree6× on/kommt-bald, 74× on/api/cocktails).prettier:checkclean.lint0 errors, 168 warnings (unchanged since Speaker Portal: Profil-Update bei bestehenden Speaker:innen anfragen #277).test335/335. Ratchet 226.buildexit 0, no new warnings.503/504responses in the server log, unrelated to this change.Plan updates
console.logs: this entry was already fixed in1edd2f2(2026-08-04) and never ticked off. Now ticked off.🤖 Generated with Claude Code
https://claude.ai/code/session_01RE7Gq8fzzVAfBahzvcUqTP