Skip to content

wip: root params in route handlers #80684

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

Draft
wants to merge 3 commits into
base: lubieowoce/root-params-types
Choose a base branch
from

Conversation

lubieowoce
Copy link
Member

No description provided.

@ijjk ijjk added created-by: Next.js team PRs by the Next.js team. Rspack Turbopack Related to Turbopack with Next.js. type: next labels Jun 19, 2025
@lubieowoce lubieowoce mentioned this pull request Jun 19, 2025
Copy link
Member Author

lubieowoce commented Jun 19, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lubieowoce lubieowoce changed the base branch from lubieowoce/rootparams-module to graphite-base/80684 June 19, 2025 11:35
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from f70791b to 23b8248 Compare June 19, 2025 11:35
@lubieowoce lubieowoce changed the base branch from graphite-base/80684 to lubieowoce/root-params-types June 19, 2025 11:36
Copy link

codspeed-hq bot commented Jun 19, 2025

CodSpeed Performance Report

Merging #80684 will not alter performance

Comparing lubieowoce/root-params-in-route-handlers (85295bd) with lubieowoce/root-params-types (c220c1f)

Summary

✅ 9 untouched benchmarks

@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 23b8248 to 87f9b63 Compare June 19, 2025 12:08
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 41da255 to 1674139 Compare June 19, 2025 12:08
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 87f9b63 to bf41c6b Compare June 19, 2025 13:12
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 1674139 to b129141 Compare June 19, 2025 13:12
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from bf41c6b to f692cde Compare June 19, 2025 14:16
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch 2 times, most recently from 68666ef to 8a43e92 Compare June 20, 2025 12:03
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from f692cde to bf12851 Compare June 20, 2025 12:03
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 8a43e92 to 34ecb17 Compare June 20, 2025 16:10
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch 2 times, most recently from 7fc10cb to 6248ef5 Compare June 20, 2025 16:17
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 34ecb17 to 7b579f8 Compare June 20, 2025 16:17
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 6248ef5 to 32e74d6 Compare June 23, 2025 09:58
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch 2 times, most recently from 752d7e6 to 6cf65cb Compare June 27, 2025 11:39
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 32e74d6 to 2a607fc Compare June 27, 2025 11:39
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 2a607fc to b4fe9d1 Compare July 9, 2025 19:11
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 6cf65cb to 6b6d73a Compare July 9, 2025 19:11
@ijjk ijjk added the tests label Jul 9, 2025
@@ -274,6 +274,7 @@ export async function adapter(
const requestStore = createRequestStoreForAPI(
request,
request.nextUrl,
{}, // TODO(root-params): compute and pass real rootParams
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: edge

@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 519d35e to 17ac63c Compare July 9, 2025 19:36
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 6b6d73a to 11ede39 Compare July 9, 2025 19:38
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 17ac63c to bfe1fe3 Compare July 9, 2025 19:38
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 11ede39 to 80bdbc2 Compare July 9, 2025 19:59
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from bfe1fe3 to d93fb49 Compare July 9, 2025 19:59
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from 80bdbc2 to 639d677 Compare July 9, 2025 20:13
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch 2 times, most recently from ae507a7 to e9ce96d Compare July 10, 2025 17:07
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch 2 times, most recently from cb48272 to e67bd13 Compare July 11, 2025 13:20
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from e9ce96d to 2caaeca Compare July 11, 2025 13:20
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from e67bd13 to c220c1f Compare July 17, 2025 13:11
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 2caaeca to 540330c Compare July 17, 2025 13:11
lubieowoce and others added 3 commits July 17, 2025 17:32
This PR enables the use of root params in route handlers by:

1. Modifying the app route module to extract root params from
context.params based on rootParamNames
2. Passing these root params to the request store in route handlers
3. Removing the error that previously prevented using root params in
route handlers
4. Simplifying the rootParams handling by directly using string arrays
instead of ParamInfo objects
5. Replacing the custom encodeToBase64 utility with standard
Buffer.from().toString('base64')
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-in-route-handlers branch from 540330c to 85295bd Compare July 17, 2025 15:32
@lubieowoce lubieowoce force-pushed the lubieowoce/root-params-types branch from c220c1f to b0cdc2d Compare July 17, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
created-by: Next.js team PRs by the Next.js team. Rspack tests Turbopack Related to Turbopack with Next.js. type: next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants