Skip to content

[codex] Harden GoRouter route argument parsing#399

Merged
jjoonleo merged 1 commit into
mainfrom
feat/implement-issue-391
May 7, 2026
Merged

[codex] Harden GoRouter route argument parsing#399
jjoonleo merged 1 commit into
mainfrom
feat/implement-issue-391

Conversation

@jjoonleo

@jjoonleo jjoonleo commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add defensive typed route argument parsing for /calendar, /scheduleStart, and /earlyLate
  • preserve valid existing extras while adding durable query parameters for calendar and early/late routes
  • redirect malformed /earlyLate payloads to /home instead of crashing
  • cover missing, malformed, legacy, and query-based route payloads with focused tests

Why

Direct URL entry, browser refresh, stale links, or native/deep-link payload drift can drop or corrupt state.extra. The previous direct casts could throw in production before the user reached a recoverable state.

Closes #391

Validation

  • flutter test test/presentation/shared/router/route_arguments_test.dart
  • flutter test test/presentation/alarm/screens/preparation_flow_widget_test.dart
  • flutter analyze
  • git diff --check

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit bac7ac4):

https://ontime-c63f1--pr399-feat-implement-issue-1tvodg9c.web.app

(expires Thu, 14 May 2026 04:25:47 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7d60a2eae4c4a5839220ed6a57552a3b61cce5a3

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit bac7ac4):

https://on-time-front-widgetbook--pr399-feat-implement-issue-vz5hamc2.web.app

(expires Thu, 14 May 2026 04:26:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e53128a376fed0209d449279de9c0d94c83cdd8b

@jjoonleo jjoonleo marked this pull request as ready for review May 7, 2026 05:21
@jjoonleo jjoonleo merged commit b850d85 into main May 7, 2026
4 checks passed
@jjoonleo jjoonleo deleted the feat/implement-issue-391 branch May 7, 2026 05:22
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.

[Production readiness] Defensively parse GoRouter route extras

1 participant