Title: refactor(core): show bounded paths in hydration errors by splincode · Pull Request #70249 · angular/angular · GitHub
Open Graph Title: refactor(core): show bounded paths in hydration errors by splincode · Pull Request #70249 · angular/angular
X Title: refactor(core): show bounded paths in hydration errors by splincode · Pull Request #70249 · angular/angular
Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug fixes / features) Docs have been added / updated (for bug fixes / features) PR Type Bugfix Feature Code style update (formatting, local variables) Refactoring (no functional changes, no api changes) Build related changes CI related changes Documentation content changes angular.dev application / infrastructure changes Other... Please describe: What is the current behavior? Hydration mismatch errors describe the mismatched node and its immediate parent. When multiple branches have the same local structure, that snippet does not identify which branch in the component template contains the mismatch. Issue Number: #56392 What is the new behavior? Hydration mismatch errors retain the compact local expected and actual DOM snippets and add a bounded DOM path: at most four real nodes are shown: the component host and the three nodes closest to the mismatch; omitted middle ancestors are represented by ...; the expected path follows template declaration ancestry, while the actual path follows the physical DOM to the nearest component host; element, text, and comment mismatch locations are represented in the path. The integration test uses two otherwise-identical nested branches, Account and Billing. The local snippets are the same, while the bounded path identifies the Billing branch without rendering the full ancestry tree. The change only improves development-mode diagnostics. It does not add DOM validation, recognize specific mismatch patterns, or change when hydration reports a mismatch. Does this PR introduce a breaking change? Yes No Other information No documentation update is needed because this change does not introduce or modify a public API. Tested with: pnpm bazel test //packages/platform-server/test:test
Open Graph Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug...
X Description: PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug...
Opengraph URL: https://github.com/angular/angular/pull/70249
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0b4ba0df-cf93-2f15-17d9-bec3adecd62b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C70C:804E:4EEE49:66BAF5:6B061E71 |
| html-safe-nonce | 39de9c4ce9aed9f16dd4c3e909819a8d0777faa7fcf18fb0762017a844cfba07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzBDOjgwNEU6NEVFRTQ5OjY2QkFGNTo2QjA2MUU3MSIsInZpc2l0b3JfaWQiOiI0MTQ4Mzg3MTMzNDk5MjUyMzM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 64165b8203a2ee6e2950bdcdcecf8954ac1e78450085f89c55583c5b16dc541f |
| hovercard-subject-tag | pull_request:4302160230 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/angular/angular/pull/70249/files |
| twitter:image | https://avatars.githubusercontent.com/u/12021443?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/12021443?s=400&v=4 |
| og:image:alt | PR Checklist The commit message follows our guidelines: https://github.com/angular/angular/blob/main/contributing-docs/commit-message-guidelines.md Tests for the changes have been added (for bug... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9a7c5824b75ea2ec5e3de73a483229c7bb9f32a774ffd401f010dd9bacf1483d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b25c3080e84402f75431d8dc7a96b2635219cec7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width