Title: [Feature]: Guaranteed hydration correctness — graduate mismatch handling past dev-only warnings · Issue #130 · bQuery/bQuery · GitHub
Open Graph Title: [Feature]: Guaranteed hydration correctness — graduate mismatch handling past dev-only warnings · Issue #130 · bQuery/bQuery
X Title: [Feature]: Guaranteed hydration correctness — graduate mismatch handling past dev-only warnings · Issue #130 · bQuery/bQuery
Description: Pre-flight checklist I searched existing issues and did not find a duplicate request. I explained the problem or use case, not just the desired API. Problem or use case Hydration-mismatch detection currently lives in verifyHydration as d...
Open Graph Description: Pre-flight checklist I searched existing issues and did not find a duplicate request. I explained the problem or use case, not just the desired API. Problem or use case Hydration-mismatch detection...
X Description: Pre-flight checklist I searched existing issues and did not find a duplicate request. I explained the problem or use case, not just the desired API. Problem or use case Hydration-mismatch detection...
Opengraph URL: https://github.com/bQuery/bQuery/issues/130
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Feature]: Guaranteed hydration correctness — graduate mismatch handling past dev-only warnings","articleBody":"**Pre-flight checklist**\n- [x] I searched existing issues and did not find a duplicate request.\n- [x] I explained the problem or use case, not just the desired API.\n\n**Problem or use case**\nHydration-mismatch detection currently lives in `verifyHydration` as **dev-only warnings**. In production a mismatch silently yields a wrong or broken UI with no recovery path, which is exactly the failure mode teams need guarantees against before trusting SSR. \"Dev-only warnings\" is not a stability contract, so this blocks `ssr` Stable (#127).\n\n**Proposed solution**\nAdd a production hydration-mismatch strategy: detect mismatches at hydrate time and offer configurable recovery — `warn` (dev default), `repair` (re-render the affected boundary from client state), or `error` (surface to an error boundary). Provide a stable, documented definition of what constitutes a mismatch and ensure detection covers the directives made SSR-capable in #128. Keep the production path lightweight (boundary-scoped, not whole-document).\n\n**Possible API or UX shape**\n```ts\nimport { hydrate } from \"@bquery/bquery/ssr\";\n\nhydrate(root, {\n onMismatch: \"repair\", // \"warn\" | \"repair\" | \"error\"\n onError: (err, boundary) =\u003e reportToDevtools(err, boundary)\n});\n```\n\n**Alternatives considered**\nRelying on authors to keep server and client output identical by discipline — fragile, and undermined today by the directive subset in #128. Whole-document re-render on any mismatch — rejected as a performance cliff; boundary-scoped repair is the React/Svelte-aligned approach.\n\n**Relevant area**\n`ssr`\n\n**Additional context**\nReact 19 and Svelte both treat hydration mismatches as first-class with defined recovery; matching that is table stakes for production SSR. Wire the `onError` hook into the devtools bridge (#146) so mismatches are inspectable.\n","author":{"url":"https://github.com/JosunLP","@type":"Person","name":"JosunLP"},"datePublished":"2026-06-26T21:25:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/130/bQuery/issues/130"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:323823f2-01b0-ecbc-da15-cfb249b01de2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8C52:2E1306:FF02F3:16ECE2C:6A4E53A2 |
| html-safe-nonce | 525a5383ef01c045fd1be98e4a90dc705cb148316e49cab8232c69dc000c1853 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzUyOjJFMTMwNjpGRjAyRjM6MTZFQ0UyQzo2QTRFNTNBMiIsInZpc2l0b3JfaWQiOiI0MTI0MDU5ODUwMzEyMTQzNzc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 64ac39b3eb14c3fbb26e270221a4d9bf0757392bf28f3c8c16c96e65946b08ff |
| hovercard-subject-tag | issue:4755236229 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bQuery/bQuery/130/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b9e60882456d9e5d9f93a70eb141c27243833590c67416a0dfa5016415bb115/bQuery/bQuery/issues/130 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b9e60882456d9e5d9f93a70eb141c27243833590c67416a0dfa5016415bb115/bQuery/bQuery/issues/130 |
| og:image:alt | Pre-flight checklist I searched existing issues and did not find a duplicate request. I explained the problem or use case, not just the desired API. Problem or use case Hydration-mismatch detection... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JosunLP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f344f1eab54fc7dfc02d0d018cda7e158c3db65c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width