fix(react): replace dynamic reminder edit route with query param page - #359
Merged
Conversation
The /reminder/[id] segment exported dynamicParams=false with a single placeholder static param (required by the Pages static export), so every real reminder id returned 404 in the server build, on client navigation and on the deployed Pages site. Segment config must be a literal, so it cannot be switched per build. The edit page is now the static route /reminder/edit?id=<id>: it works identically in the server build and the static export. The context provider reads the id from useSearchParams (Suspense-wrapped in the root layout). Cypress specs updated for the new URLs, and validation tests no longer wait for API calls that client-side validation intentionally prevents. Closes #320
Owner
Author
|
CI note: the cypress-run job tests the deployed Pages site, which still serves the old build with the broken dynamic route (#320). The updated specs target the new /reminder/edit?id= route, so this check stays red until this PR merges and Pages redeploys. All 38 tests pass locally against the new build. |
PR-triggered runs previously tested the deployed Pages site, so a PR changing the app and its specs together could never be green before merge. Build and serve the app from the PR branch instead; deployment runs keep testing the live site.
kauereinbold
added a commit
that referenced
this pull request
Aug 9, 2026
…#359) * fix(react): replace dynamic reminder edit route with query param page The /reminder/[id] segment exported dynamicParams=false with a single placeholder static param (required by the Pages static export), so every real reminder id returned 404 in the server build, on client navigation and on the deployed Pages site. Segment config must be a literal, so it cannot be switched per build. The edit page is now the static route /reminder/edit?id=<id>: it works identically in the server build and the static export. The context provider reads the id from useSearchParams (Suspense-wrapped in the root layout). Cypress specs updated for the new URLs, and validation tests no longer wait for API calls that client-side validation intentionally prevents. Closes #320 * ci: run cypress against the PR branch build on pull requests PR-triggered runs previously tested the deployed Pages site, so a PR changing the app and its specs together could never be green before merge. Build and serve the app from the PR branch instead; deployment runs keep testing the live site.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/reminder/[id]exporteddynamicParams = falsewith a singleplaceholderstatic param (a Next.js 15 static-export requirement), so every real reminder id 404'd in the server build, on client navigation and on the deployed Pages site. Segment config must be a literal, so it cannot vary per build./reminder/edit?id=<id>, which behaves identically in the server build and the static export. The context provider reads the id fromuseSearchParams(Suspense-wrapped in the root layout).Closes #320
Note: the deployed Pages CI run stays red until this is deployed.
Test plan
npm test(jest): 70/70 passingGITHUB_PAGES=true next build(static export): succeeds, all routes staticdocker compose --profile allstack: 38/38 passing