Skip to content

fix(react): replace dynamic reminder edit route with query param page - #359

Merged
kauereinbold merged 2 commits into
mainfrom
fix/reminder-edit-route
Jul 27, 2026
Merged

fix(react): replace dynamic reminder edit route with query param page#359
kauereinbold merged 2 commits into
mainfrom
fix/reminder-edit-route

Conversation

@kauereinbold

Copy link
Copy Markdown
Owner

Summary

  • Root cause of the broken edit flow: /reminder/[id] exported dynamicParams = false with a single placeholder static 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.
  • The edit page is now the static route /reminder/edit?id=<id>, which behaves 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: new URLs (trailing-slash normalized), and validation tests no longer wait for API requests that client-side validation intentionally blocks.

Closes #320

Note: the deployed Pages CI run stays red until this is deployed.

Test plan

  • npm test (jest): 70/70 passing
  • GITHUB_PAGES=true next build (static export): succeeds, all routes static
  • Full cypress suite against docker compose --profile all stack: 38/38 passing

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
@kauereinbold

Copy link
Copy Markdown
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
kauereinbold merged commit 97c94f0 into main Jul 27, 2026
8 checks passed
@kauereinbold
kauereinbold deleted the fix/reminder-edit-route branch July 27, 2026 13:29
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ci): cypress E2E failing since 2026-07-10 against deployed Pages

1 participant