Skip to content

[codex] Restore preparation timers from action events#577

Merged
jjoonleo merged 4 commits into
mainfrom
feature/preparation
Jun 28, 2026
Merged

[codex] Restore preparation timers from action events#577
jjoonleo merged 4 commits into
mainfrom
feature/preparation

Conversation

@jjoonleo

Copy link
Copy Markdown
Contributor

Summary

  • Persist timed preparation runs with startedAt and user Preparation Action Events instead of relying on suspended timer ticks.
  • Rebuild ongoing preparation progress from start time, skip actions, and the current time on app resume/re-entry.
  • Preserve restoration across backend preparation freeze when step IDs change but the preparation shape is unchanged.
  • Clear local timed preparation state when schedules are finished, deleted, stale, or structurally changed.

Root Cause

Dart timer ticks can stop while the phone sleeps, and the old restoration path depended on elapsed snapshots. After schedule start, backend frozen preparation can also change step IDs/fingerprints, which caused local run snapshots and skip actions to be discarded.

Validation

  • dart run build_runner build --delete-conflicting-outputs
  • flutter analyze
  • flutter test test/presentation/app/bloc/schedule/schedule_bloc_test.dart
  • flutter test
  • git diff --check

@jjoonleo jjoonleo marked this pull request as ready for review June 28, 2026 14:50
@jjoonleo jjoonleo merged commit d8de44d into main Jun 28, 2026
3 of 5 checks passed
@jjoonleo jjoonleo deleted the feature/preparation branch June 28, 2026 14:50
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.

1 participant