Repository navigation
Feat/ject 179 session restore - #6
Open
bess-cater wants to merge 2 commits into
Open
bess-cater wants to merge 2 commits into
bess-cater wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경
Jira: JECT-179 로그인 정보 저장·앱 재시작 시 로그인 복원하기 (공통 준비)
로그인 세션을 secure storage에 저장·복원하고, 앱을 다시 켰을 때 로그인 상태에 맞는 화면으로 보낸다. 로그인 API가 아직 없어 로그인은 임시 토큰으로 한다 (workflow 3절 "서버가 아직 없을 때").
흐름
/splash→ 저장된 세션 복원 → 있으면/home, 없거나 읽기 실패면/login/home/login추가
core/storage/secure_store.dart:FlutterSecureStorage래퍼 + 토큰 키 상수features/auth/models/session.dart: 세션 모델 (freezed, 토큰이 로그에 안 찍히게toString생성 안 함)features/auth/data/repositories/session_repository.dart: 저장·복원·삭제features/auth/data/services/auth_service.dart: 임시 고정 토큰. 로그인 API가 나오면 이 파일만 실제 호출로 교체features/auth/data/dto/token_dto.dart,data/repositories/auth_repository.dart: 로그인 응답 → 세션features/auth/presentation/view_models/session_view_model.dart:sessionProvider(keepAlive) — 시작 시 복원,signIn(),signOut()features/auth/presentation/view_models/login_view_model.dart: 로그인 명령, 중복 실행 방지/splash경로 +SplashViewapp/router.dart:sessionRedirect+refreshListenable(세션ref.listen)app/di.dart:SecureStore,SessionRepository,AuthService,AuthRepository등록 (lazy singleton)onSignOut으로 연결[session]복원·로그인·로그아웃,[login]버튼·실패,[router]이동mobile-architecture.md(redirect 규칙,/splash, 임시 로그인),AGENTS.md·overview.md"아직 안 한 것"에서 세션 복원 제거검증
apps/mobile):dart format·flutter analyze·check_imports·flutter test(56개) · build_runner 생성 파일 최신 — 통과app_test·main_shell_test는 빈/로그인된 가짜 저장소를 넣도록 수정UI 캡처
로그인 화면에 "임시 로그인" 버튼, 마이페이지에 "로그아웃" 버튼 추가 (임시 UI). 캡처 첨부 예정
호환성·주의
/login→/splash, 인증 redirect), 모델(Session) — 사전 공유 필요Podfile,Debug/Release.xcconfig의#include?)이 같이 들어갔다. 플러그인(secure storage 등) iOS 빌드에 필요한 파일이지만 이 Task와는 별개라 확인 부탁리뷰 순서
apps/mobile/lib/app/router.dart(sessionRedirect,refreshListenable),app/routes.dart(/splash)features/auth/presentation/view_models/session_view_model.dart→login_view_model.dart→data/repositories/session_repository.dart→auth_repository.dart→data/services/auth_service.dart→core/storage/secure_store.dartsessionRedirect), 로그인 중복 탭 무시·실패 상태(login_view_model.dart)features/auth/presentation/views/login_view.dart,splash_view.dart,features/my_page/presentation/views/my_page_view.darttest/app/router_test.dart,test/features/auth/**,test/app/app_test.dart,test/app/main_shell_test.dart새 문구
임시 로그인(임시)로그아웃로그인작성자 체크 (docs/pr-checklist.md A절)
Colors.*·숫자 크기 없음. 토큰 변경은 앱·웹·문서 함께AppButton) 아직 없어 Material 버튼 사용임시 로그인·로그아웃)로 찾는다. 문구 고정 규칙에 어긋나 Key로 바꿀 예정session.freezed.dart,token_dto.g.dart리뷰어 체크 (docs/pr-checklist.md B절)
[must]/[nit]접두사와 근거 절 번호