Pull Request Overview
- Opened on October 21, 2026
- Status Merged
- Commit count 2 with first commit October 21, 2026
Total Delta
Open Days
Test Delta
How long has this pull request spent in each phase of its lifecycle?
| Fraction of total time | Business days | Phase |
|---|---|---|
|
|
0.0 days | Authoring 1 commit before pull request opened for review |
|
|
0.0 days | Awaiting first review |
|
|
1.7 days | Revising work with 1 commit in response to 3 reviews that left 15 comments |
|
|
15.9 days | Merge to deploy (still awaiting deployment) |
Total time for pull request
1.7 business days
from first commit authored to merge
Still awaiting deployment
refactor(@angular/ssr): combine redirect URL parameter helpers and use DefaultUrlSerializer
Follow-up to #34321:
- Combines buildPathWithParams and buildQueryWithParams into buildUrlWithParams.
- Reuses DefaultUrlSerializer from @angular/router for query parameter parsing and serialization instead of custom regex/encoding helpers.
- Adds fast-path checks to avoid regex/splitting and URLSearchParams instantiation when redirect targets do not contain placeholders.
- Applies joinUrlParts only to the path portion of redirect targets when prepending baseHref or X-Forwarded-Prefix so trailing slashes in query parameters or fragments are preserved.
Comments Threads Pending Resolution
## Code Review
This pull request refactors URL and query parameter resolution in the Angular SSR package by consolidating `buildPathWithParams` and `buildQueryWithParams` into a single `buildUrlWithParams` function, and merging `replaceRedirectParams` into `resolveRedirectTo`. Feedback on these changes highlights two potential issues: first, appending `url.search` directly with `+` for relative redirects could result in malformed URLs with multiple `?` characters if the target already contains query parameters; second, resolving path placeholders when `fromPath` has fewer segments than expected could pass `undefined` to `joinUrlParts`, leading to a runtime `TypeError`.
## Code Review
This pull request refactors URL parameter resolution in Angular SSR by replacing buildPathWithParams and buildQueryWithParams with a unified buildUrlWithParams function that leverages Angular's DefaultUrlSerializer. It also optimizes route parameter replacement and prefix handling. Feedback on the changes points out a potential runtime TypeError when resolving path placeholders if a wildcard or positional placeholder refers to an out-of-bounds index, and suggests adding a fallback to 'undefined'.
Resolved Comment Threads
|
179
|
|
||
|
181
|
|
||
|
182
|
|
## Code Review
This pull request refactors URL and query parameter resolution in the Angular SSR package by consolidating `buildPathWithParams` and `buildQueryWithParams` into a single `buildUrlWithParams` function, and merging `replaceRedirectParams` into `resolveRedirectTo`. Feedback on these changes highlights two potential issues: first, appending `url.search` directly with `+` for relative redirects could result in malformed URLs with multiple `?` characters if the target already contains query parameters; second, resolving path placeholders when `fromPath` has fewer segments than expected could pass `undefined` to `joinUrlParts`, leading to a runtime `TypeError`.