fix(session): 회원 앱 세션 복구 첫 설정·계정 전환 리셋·404 화면 정리 - #2647
Merged
Merged
Conversation
auto-dispose 가 아닌 recordSpanProvider 가 리셋 레지스트리에 없어, 계정을 바꾸면 앞 계정의 첫 기록일부터 '전체' 그래프를 그렸다. 같은 감사에서 빠진 주간 피드백 '나중에' 표시와 코칭 시트의 본 카드 수도 함께 등록한다. 세션 provider 감사 문서에 세 줄을 더한다. Refs #2632
onboarding_done 은 기기 전체에 하나라, 앞 계정이 끝낸 기록을 보고 프로필 조회에 실패한 새 계정도 홈으로 보냈다. 로그인으로 새 토큰을 받을 때, 로그아웃·실행 중 만료로 세션을 닫을 때, 복구 중 만료가 확인될 때 이 기록만 지운다. 같은 토큰으로 되살아나는 세션 복구에서는 이어 쓴다. 홈 가이드 기록과 언어는 건드리지 않는다. Refs #2630
첫 설정 판단은 로그인 화면에서만 불려, 가입 직후 첫 설정 폼에서 앱을 닫은 회원은 다시 켜면 시작 화면에서 곧장 홈으로 가 빈 프로필로 남았다. 라우터 provider 가 세션 전이 중 복구(unknown -> authenticated)만 골라 로그인과 같은 규칙으로 판단하고, 첫 설정이 남았고 그 사이 세션이 그대로면 /onboarding 으로 옮긴다. 판단 함수는 provider 를 읽는 함수를 받도록 넓혀 로그인 화면(컨테이너)과 라우터 provider(Ref)가 같은 규칙을 쓴다. Refs #2630
GoRouter 에 errorBuilder 가 없어 없는 주소에서 go_router 기본 영어 오류 화면이 떴다. 흰 바탕 가운데에 oncare_ui 빈 화면 안내로 ko/en 문구를 두고, 로그인(또는 데모) 상태면 '홈으로'(대시보드), 아니면 '로그인하러 가기'로 돌아가게 한다. 주소창은 그대로 둔다. Refs #2633
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: CSE-Sudo/on-care/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID:
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 |
This was referenced Sep 30, 2026
7 of 10 tasks
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.
Summary
/onboarding으로 간다(fix(account): 한 번 놓치면 다시 열리지 않는 첫 설정 온보딩 #1927 에서 빠졌던 복구 경로).onboarding_done)을 지금 세션 계정의 것으로 좁혀, 앞 계정의 기록을 보고 새 계정을 홈으로 보내지 않는다.recordSpanProvider)·주간 피드백나중에표시·코칭 시트 본 카드 수를 등록해, 앞 계정 값이 새 계정 화면에 남지 않는다.홈으로/로그인하러 가기로 돌아가게 한다.Changes
✨ Features
NotFoundPage(app/router/not_found_page.dart) 신규,GoRouter.errorBuilder에 연결 — 로그인·데모면 대시보드, 아니면 로그인 화면으로 보내는 버튼notFoundTitle·notFoundMessage·notFoundGoHome·notFoundGoSignIn추가, 생성 파일 갱신🔧 Improvements
first_run_route.dart)이 provider 를 읽는 함수를 받도록 넓힘 — 로그인 화면(컨테이너)과 라우터 provider(Ref)가 같은 규칙을 씀. 기존firstRouteAfterSignIn·rememberFirstRunDone호출은 그대로AppPrefs.forgetOnboardingDone()— 첫 설정 기록만 지우는 메서드(홈 가이드·언어는 유지)🎨 UI/UX
AppEmptyState(연결 끊김 아이콘·제목·안내·버튼)가 뜸. 주소창은 그대로📝 Docs
frontend/flutter/docs/SESSION_PROVIDER_AUDIT.md에recordSpanProvider·weeklyFeedbackDismissedProvider·coachingSeenCountProvider추가🐛 Fixes
unknown→authenticated)만 골라 첫 설정 여부를 판단하고, 판단 사이 세션(토큰)이 그대로일 때만/onboarding으로 옮김. 로그인 경로는 기존대로 로그인 화면이 맡고, 데모는 묻지 않음SessionController가 계정 경계(로그인으로 새 토큰 수신, 로그아웃·실행 중 만료로 세션 종료, 복구 중 만료 확인)에서 첫 설정 기기 기록을 지움. 같은 토큰으로 되살아나는 복구에서는 이어 씀sessionFeatureResetOverride()에recordSpanProvider·weeklyFeedbackDismissedProvider·coachingSeenCountProvider등록Commits
d52b248f0fix(session): 계정 전환 리셋에 기록 시작일·코칭 표시 상태 등록40795cc28fix(account): 첫 설정 기기 기록의 계정 경계 정리97cbf514bfix(account): 세션 복구 뒤 첫 설정 온보딩 연결563c04db4feat(router): 회원 앱 없는 주소용 404 화면 추가Notes
LocalApiInterceptor의/users/me·프로필·/me/records/span)과 실서버(dio) 모두 같은 provider 를 거치므로 한 경로로 둘 다 맞는다. 백엔드 변경 없음.recordSpanProvider를 다시 읽는 일은 이 PR 범위가 아니다(리셋 등록만).frontend/flutter/lib/l10n/app_en.arb·app_ko.arb(및 생성 l10n 파일)가 겹친다. 새 키는 파일 앞쪽(appTitle다음)에 넣어 충돌 범위를 줄였다.Screenshots (Optional)
Page Not Found영어 화면홈으로버튼Test Plan
flutter analyze·flutter test·UI 하드코딩 가드 통과 확인Manual Test Steps
전체그래프 확인 → 로그아웃 → 계정 B 로 로그인:전체가 B 의 첫 기록일부터 그려지고, 코칭 배지가 다시 보인다./nope입력: 404 안내와홈으로버튼이 보이고, 누르면 홈으로 간다. 영어 설정에서 영어 문구 확인.Related Issues
Closes #2630
Closes #2632
Closes #2633
Checklist