Skip to content

Conversation

jjoonleo
Copy link
Contributor

@jjoonleo jjoonleo commented Sep 8, 2025

Describe your changes

  • app bloc을 auth bloc으로 바꾸고 upcoming schedule 가져오고 처리하는 로직을 schedule bloc으로 분리 하였습니다.
  • schedule bloc에서 준비시작까지 timer와 routing을 처리하도록 하였습니다.
  • schedule bloc의 state에서 각 단계의 남은 시간을 처리하기 위한 class 추가하였습니다.

추가 작업 예정

  • 기존 alarm bloc에서 처리하던 준비과정 진행 상태 관리를 가장 상위에 존재하는 schedule bloc로 옮겨 전역적으로 처리할 예정입니다.

git-subtree-dir: docs
git-subtree-split: bfe4c5cb74bd77125285649cb658d6cc7211e6b7
…ity and structure

- Enhanced the Architecture.md with additional details on technology stack, development guidelines, and testing strategies.
- Revised Wiki-Management.md to clarify the process for modifying and creating wiki documentation, including best practices and common issues.
- Added a StreamSubscription to handle the upcoming schedule updates.
- Updated the subscription management in the AppUpcomingScheduleSubscriptionRequested method to ensure proper cancellation of previous subscriptions.
- Enhanced the close method to cancel the upcoming schedule subscription, ensuring resource cleanup.
- Added ClampingScrollPhysics to the SingleChildScrollView in HomeScreenContent to improve scroll performance and user experience.
…n events and states

- Removed the old AppEvent and AppState files, consolidating authentication logic into AuthBloc.
- Introduced AuthEvent and AuthState to manage user authentication and upcoming schedule subscriptions.
- Updated references throughout the application to use AuthBloc, ensuring consistent authentication handling.
- Introduced ScheduleBloc to handle schedule-related events and states.
- Added ScheduleEvent and ScheduleState classes to manage the lifecycle of schedules.
- Implemented subscription management for upcoming schedules with proper cleanup on close.
- Enhanced state management to reflect ongoing, upcoming, and started schedules.
- Introduced an automatic timer system within the ScheduleBloc to manage precise timing for schedule start notifications.
- Updated Architecture.md to include details about the new timer system and its functionality.
- Created Schedule-Timer-System.md for comprehensive documentation on the timer's implementation, flow, and safety features.
- Removed upcoming schedule subscription logic from AuthBloc and replaced it with ScheduleBloc integration.
- Updated AuthBloc to handle authentication events while delegating schedule-related events to ScheduleBloc.
- Cleaned up unused events and states in AuthEvent and AuthState related to schedule management.
- Enhanced app structure by providing a clearer separation of concerns between authentication and scheduling functionalities.
- Changed the ScheduleBloc annotation from @Injectable to @singleton for improved instance management.
- Renamed the state emission from ScheduleState.started to ScheduleState.starting to better reflect the state transition during schedule initiation.
- Added a new ScheduleStatus 'starting' to represent the initial phase of a schedule.
- Introduced a new ScheduleState constructor for 'starting' to manage the corresponding state.
- Updated GoRouter configuration to include ScheduleBloc, allowing for routing based on the new 'starting' state.
- Enhanced the redirect logic to navigate to the '/scheduleStart' route when the schedule is in the 'starting' state.
…ation

- Added new entities for preparation steps and their management within the ScheduleBloc.
- Updated ScheduleState to include the current preparation step during ongoing schedules.
- Refactored state emissions to accommodate the new preparation logic and improved navigation to the schedule start screen.
- Introduced methods to convert schedules to include preparation timing details.
…rove logout handling

- Replaced direct instantiation of TokenLocalDataSource with dependency injection using getIt.
- Enhanced logout logic to utilize SignOutUseCase, ensuring a more robust handling of token deletion upon refresh failure.
- Adjusted UserRepositoryImpl to correctly handle authentication state changes by checking for false instead of true.
@jjoonleo jjoonleo requested a review from yayo0 September 8, 2025 12:48
@jjoonleo jjoonleo linked an issue Sep 8, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Sep 8, 2025

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

https://ontime-c63f1--pr309-306-schedule-prepari-rd4t9nmz.web.app

(expires Thu, 18 Sep 2025 08:17:14 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7d60a2eae4c4a5839220ed6a57552a3b61cce5a3

cursor[bot]

This comment was marked as outdated.

Copy link

github-actions bot commented Sep 8, 2025

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

https://on-time-front-widgetbook--pr309-306-schedule-prepari-t6x5pdba.web.app

(expires Thu, 18 Sep 2025 08:18:19 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e53128a376fed0209d449279de9c0d94c83cdd8b

- Updated UserRepositoryImpl to remove print statement for idToken.
- Replaced print statements with debugPrint in AlarmTimerBloc for null checks and timer ticks.
- Changed print statements to debugPrint in ScheduleBloc for ongoing and upcoming schedule logs.
- Enhanced logging consistency across the application by using debugPrint.
yayo0
yayo0 previously approved these changes Sep 9, 2025
cursor[bot]

This comment was marked as outdated.

- Renamed PreprationStepWithTime to PreparationStepWithTime for consistency.
- Updated methods to use the new class name and improved elapsed time handling with a copyWithElapsed method.
- Ensured proper casting of preparation step lists in ScheduleBloc and ScheduleState.
@jjoonleo jjoonleo merged commit ebfd815 into main Sep 13, 2025
5 checks passed
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.

Schedule Preparing logic refactor
2 participants