Skip to content

[codex] Avoid schedule tick router refreshes#549

Merged
jjoonleo merged 1 commit into
mainfrom
feature/issue-524-router-refresh
Jun 28, 2026
Merged

[codex] Avoid schedule tick router refreshes#549
jjoonleo merged 1 commit into
mainfrom
feature/issue-524-router-refresh

Conversation

@jjoonleo

Copy link
Copy Markdown
Contributor

Summary

  • Remove raw ScheduleBloc.stream from the app-level GoRouter.refreshListenable.
  • Keep router refreshes tied to auth, notification gate, and alarm gate state changes.
  • Add a focused regression test proving schedule progress events do not notify the router refresh listenable while route gate events still do.

Root Cause

GoRouter.refreshListenable subscribed directly to ScheduleBloc.stream, so every per-second ScheduleTick during active preparation could trigger global redirect evaluation even though global redirects do not read schedule progress.

Closes #524.

Validation

  • flutter test test/presentation/shared/router/go_router_redirect_test.dart
  • flutter analyze
  • flutter test

@jjoonleo jjoonleo marked this pull request as ready for review June 28, 2026 05:06
@jjoonleo jjoonleo merged commit 8a048aa into main Jun 28, 2026
3 of 5 checks passed
@jjoonleo jjoonleo deleted the feature/issue-524-router-refresh branch June 28, 2026 05:07
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.

Refactor GoRouter refreshListenable to avoid per-second schedule tick redirects

1 participant