-
Notifications
You must be signed in to change notification settings - Fork 0
Fix React hydration mismatches and add Playwright safeguards #1131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
d1043f0
Fix React hydration mismatches and add Playwright safeguards
BigSimmo a1437b8
Merge branch 'main' into codex/hydration-fixes
BigSimmo d52eb2d
Merge branch 'main' into codex/hydration-fixes
BigSimmo bbd4705
Fix typescript and knip CI failures
BigSimmo 62d9fbc
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent 56a2447
fix: harden hydration guard
cursoragent dc62e9e
fix: format hydration support files
cursoragent 43770fc
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent 58c26ba
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent 979a91b
Merge branch 'main' into codex/hydration-fixes
BigSimmo 177aee8
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent 0ae33c5
fix: harden hydration warning guard
cursoragent 8633723
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent a145041
Merge remote-tracking branch 'origin/main' into HEAD
cursoragent e9d7093
Merge branch 'main' into codex/hydration-fixes
BigSimmo 6c093e9
Merge branch 'main' into codex/hydration-fixes
BigSimmo 43449d7
docs: record Run PR behind-main sweep for #1131
BigSimmo f545110
fix: sync theme cookie with bootstrap and useTheme
BigSimmo b8ebfbd
docs: ledger Run PR babysit for #1131
BigSimmo 9351833
merge: sync origin/main into hydration-fixes
BigSimmo b4b5f21
docs: ledger post-main sync for #1131
BigSimmo af78e22
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
BigSimmo a29b0d7
fix(hydration): drop suppressHydrationWarning from skip link
BigSimmo 5fbda07
docs: ledger re-sync sweep for PR #1131
BigSimmo 8a6a4e1
Merge branch 'main' into codex/hydration-fixes
cursoragent 21bdde7
fix(ledger): remove duplicate PR #1149 row after main merge
cursoragent d6b5d23
Merge remote-tracking branch 'origin/main' into HEAD
BigSimmo 8315b03
fix(ci): remove duplicate hydration ledger row
BigSimmo 9fef7aa
Merge remote-tracking branch 'origin/codex/hydration-fixes' into HEAD
BigSimmo 7d7f751
Merge branch 'main' into codex/hydration-fixes
cursoragent 90da1b8
fix(ui): drop unused LoadingPanel import after lazy-module merge
cursoragent 0e0537b
Merge branch 'main' into codex/hydration-fixes
cursoragent e9e19a0
Merge branch 'main' into codex/hydration-fixes
cursoragent ec281a7
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
cursoragent 555213f
test(ui): cover persisted hydration state
BigSimmo 235bcdf
docs: record PR 1131 hydration coverage
BigSimmo 3aa50e3
Merge branch 'main' into codex/hydration-fixes
BigSimmo 9af5424
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
cursoragent 146e94b
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
cursoragent b403cbf
Merge cursor/pr-queue-hygiene-72ec for postcss audit + PR branch sync
cursoragent b11e4de
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
cursoragent 66289fd
Merge remote-tracking branch 'origin/main' into codex/hydration-fixes
cursoragent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /** | ||
| * @type {import('eslint').Rule.RuleModule} | ||
| */ | ||
| export default { | ||
| meta: { | ||
| type: "problem", | ||
| docs: { | ||
| description: "Restrict suppressHydrationWarning to <html> and <body> tags only", | ||
| category: "Possible Errors", | ||
| recommended: true, | ||
| }, | ||
| schema: [], | ||
| }, | ||
| create(context) { | ||
| return { | ||
| JSXAttribute(node) { | ||
| if (node.name.name === "suppressHydrationWarning") { | ||
| const parentElement = node.parent; // JSXOpeningElement | ||
| if (parentElement && parentElement.name) { | ||
| const tagName = parentElement.name.name; | ||
| // The audit explicitly requested banning it on elements other than html and body. | ||
| // We also allow script since it's required for nonce mismatch bypass in layout.tsx. | ||
| if (tagName !== "html" && tagName !== "body" && tagName !== "script") { | ||
| context.report({ | ||
| node, | ||
| message: | ||
| "suppressHydrationWarning is only allowed on <html>, <body>, and <script> elements. Fix the underlying mismatch instead of hiding it.", | ||
| }); | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| }; | ||
| }, | ||
| }; |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.