Skip to content

Conversation

@danielroe
Copy link
Member

@danielroe danielroe commented Feb 9, 2026

wanting to fix some hydration issues and add regression tests to avoid them recurring

@vercel
Copy link

vercel bot commented Feb 9, 2026

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

Project Deployment Actions Updated (UTC)
docs.npmx.dev Error Error Feb 9, 2026 4:58pm
npmx.dev Ready Ready Preview, Comment Feb 9, 2026 4:58pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
npmx-lunaria Ignored Ignored Feb 9, 2026 4:58pm

Request Review

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

This pull request introduces hydration debugging capabilities and comprehensive testing infrastructure. The changes include adding a new $test configuration property to the Nuxt config that enables hydration debugging, creating a new end-to-end test suite that validates hydration behaviour across multiple localStorage configurations, extending the test fixture type to capture hydration error messages from the console, and updating a component reference in the accessibility test skip list from ScrollToTop.vue to ScrollToTop.client.vue.

Possibly related PRs

Suggested labels

front

Suggested reviewers

  • firstangler59
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly indicates the intent to fix hydration issues and add regression tests, which directly aligns with the changeset containing hydration configuration, test utilities, and comprehensive e2e test suite.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/hydration

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
test/e2e/hydration.spec.ts (1)

118-124: Consider exporting injectLocalStorage from test-utils.ts for reuse.

This helper is well-implemented and could benefit other E2E tests that need to seed localStorage before navigation. Using addInitScript is the correct approach as it executes before any page scripts run.

♻️ Suggested refactor to move helper to test-utils

In test/e2e/test-utils.ts:

export async function injectLocalStorage(page: Page, entries: Record<string, string>) {
  await page.addInitScript((e: Record<string, string>) => {
    for (const [key, value] of Object.entries(e)) {
      localStorage.setItem(key, value)
    }
  }, entries)
}

Then import in hydration.spec.ts:

-import type { Page } from '@playwright/test'
-import { expect, test } from './test-utils'
+import { expect, test, injectLocalStorage } from './test-utils'

And remove the local definition.


Comment @coderabbitai help to get the list of available commands and usage tips.

@danielroe danielroe merged commit 9afb54f into main Feb 9, 2026
21 of 33 checks passed
@danielroe danielroe deleted the fix/hydration branch February 9, 2026 20:52
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