-
Notifications
You must be signed in to change notification settings - Fork 5
fix: redirect to injected link in splash page #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: redirect to injected link in splash page #329
Conversation
📝 WalkthroughWalkthroughOAuth 저장소의 BehaviorSubject 초기화 및 사용자 스트림 동작을 변경하고, 디버그 모드에서 조건부 로깅을 추가하며, LinkBloc 상태 접근을 위한 게터를 추가하고, 스플래시 페이지의 네비게이션 로직에 LinkBloc을 통합하며, logging 의존성을 추가합니다. Changes
Sequence DiagramsequenceDiagram
participant SplashPage
participant LinkBloc
participant Router
participant AppVersionBloc
SplashPage->>LinkBloc: initState에서 상태 조회
LinkBloc-->>SplashPage: LinkState 반환
alt link이 비어있지 않음
SplashPage->>Router: link 푸시
Router-->>SplashPage: 성공
end
SplashPage->>Router: ListRoute로 모든 라우트 교체
SplashPage->>AppVersionBloc: 초기화
SplashPage->>SplashPage: 스플래시 제거
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
lib/app/modules/auth/data/repositories/oauth_rest_auth_repository.dart(2 hunks)lib/app/modules/common/presentation/utils/log.dart(2 hunks)lib/app/modules/core/presentation/bloc/link_bloc.dart(1 hunks)lib/app/modules/splash/presentation/pages/splash_page.dart(2 hunks)pubspec.yaml(1 hunks)
🧰 Additional context used
🧠 Learnings (11)
📓 Common learnings
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 7
File: lib/app/modules/main/presentation/pages/main_page.dart:29-46
Timestamp: 2025-04-03T08:06:18.795Z
Learning: In this PR (#7), the main_page.dart file is not the focus of the changes but rather demonstrates the usage of the implemented common components (PotGButton, PotGToggle, etc.).
📚 Learning: 2025-04-03T08:06:18.795Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 7
File: lib/app/modules/main/presentation/pages/main_page.dart:29-46
Timestamp: 2025-04-03T08:06:18.795Z
Learning: In this PR (#7), the main_page.dart file is not the focus of the changes but rather demonstrates the usage of the implemented common components (PotGButton, PotGToggle, etc.).
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-05-16T12:34:42.880Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 24
File: lib/app/router.dart:10-19
Timestamp: 2025-05-16T12:34:42.880Z
Learning: In gsainfoteam/pot-g-flutter, the router configuration needs to explicitly define all four distinct child routes to match the tabs in MainBottomNavigationPage to ensure proper synchronization with AutoTabsRouter. This change is planned to be implemented in a future PR.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-05-16T12:35:04.390Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 24
File: lib/app/modules/main/presentation/pages/main_bottom_navigation_page.dart:21-24
Timestamp: 2025-05-16T12:35:04.390Z
Learning: In the MainBottomNavigationPage of gsainfoteam/pot-g-flutter project, the routes list currently contains EmptyRoute and MainRoute instances that don't match the router configuration. The developer plans to add the missing routes in a future update to properly sync the tabs with router definitions.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-10-05T11:03:42.796Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 82
File: lib/app/modules/chat/presentation/pages/chat_room_page.dart:105-113
Timestamp: 2025-10-05T11:03:42.796Z
Learning: The chat room page (ChatRoomPage) in gsainfoteam/pot-g-flutter cannot be accessed by unauthenticated users, so AuthBloc.userOf(context) will not return null in that context.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-11-01T02:28:39.838Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 247
File: lib/app/pot_app.dart:90-129
Timestamp: 2025-11-01T02:28:39.838Z
Learning: In gsainfoteam/pot-g-flutter, PotListBloc maintains user-agnostic state - the pot list is the same for all users regardless of authentication status, so clearing its state on logout is not necessary.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-11-04T06:44:47.099Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 296
File: lib/app/router.dart:34-35
Timestamp: 2025-11-04T06:44:47.099Z
Learning: In gsainfoteam/pot-g-flutter router guard (lib/app/router.dart), when redirecting to ConsentRoute using resolver.redirectUntil with an empty onDone callback, navigation continues through automatic guard reevaluation after consent completion. When the guard reevaluates, user.agreedTerms.allRequired becomes true and resolver.next(true) is called, allowing the navigation to proceed. The empty onDone callback allows the calling page (e.g., main_bottom_navigation_page) to handle tab restoration logic rather than forcing immediate navigation.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-10-05T11:04:45.955Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 82
File: lib/app/modules/chat/presentation/bloc/chat_bloc.dart:11-43
Timestamp: 2025-10-05T11:04:45.955Z
Learning: In gsainfoteam/pot-g-flutter, ChatBloc instances are recreated when the pot changes, so using `late final PotEntity _pot` is safe as each bloc instance only receives one ChatInit event during its lifecycle.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-10-21T13:24:30.054Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 235
File: lib/app/modules/auth/presentation/pages/login_page.dart:31-39
Timestamp: 2025-10-21T13:24:30.054Z
Learning: In the pot-g-flutter codebase, widget lifecycle management (mounted checks) for callbacks passed to LoginPage is handled at the parent/caller level rather than within LoginPage itself. Therefore, mounted checks before calling widget.onCancel(), widget.onDone(), and widget.onConsent() in LoginPage are not required.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-10-09T23:55:55.441Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 151
File: lib/app/modules/list/presentation/widgets/pot_list_item.dart:109-110
Timestamp: 2025-10-09T23:55:55.441Z
Learning: In Flutter, BlocListener's listener callback is synchronous and executes immediately when state changes occur. Mounted checks are not required in synchronous BlocListener callbacks unless there are explicit await operations within the callback.
Applied to files:
lib/app/modules/splash/presentation/pages/splash_page.dart
📚 Learning: 2025-09-22T04:49:13.008Z
Learnt from: 2paperstar
Repo: gsainfoteam/pot-g-flutter PR: 70
File: lib/app/modules/device/data/repositories/flutter_secure_storage_device_info_repository.dart:1-5
Timestamp: 2025-09-22T04:49:13.008Z
Learning: In Flutter device ID repositories using secure storage, race conditions can occur during initial device ID generation when multiple concurrent calls try to create and store different UUIDs. The proper solution involves using a Mutex to protect the read-check-write sequence, implementing memory caching to avoid repeated storage access, and defensive programming to handle null/empty values. The pattern: check cache → mutex.protect(async { read from storage → if null/empty generate new → write to storage → update cache }) effectively prevents race conditions.
Applied to files:
lib/app/modules/common/presentation/utils/log.dart
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build Android App and Test
- GitHub Check: Build iOS App and Test
loggingSummary by CodeRabbit
릴리스 노트
새로운 기능
개선 사항