Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
44c19df
마이페이지 설계 문서 작성 (#26)
Cassiiopeia Feb 23, 2026
b641f86
프로필 조회/수정 설정 화면 필요 : docs : 마이페이지 구현 계획 작성 https://github.com/MapSee-…
Cassiiopeia Feb 23, 2026
0de4504
프로필 조회/수정 설정 화면 필요 : feat : Freezed DTO 모델 생성 (ProfileUpdateRequest, …
Cassiiopeia Feb 23, 2026
d5b3242
AI 장소 추출 후 장소 선택 및 저장 UI 구현 필요 : fix : import 오류 수정 및 build_runner 코드…
Cassiiopeia Feb 23, 2026
35a65d0
chore: update generated files (build_runner) [skip ci]
github-actions[bot] Feb 23, 2026
9009dc0
프로필 조회/수정 설정 화면 필요 : feat : Data Layer 구현 (RemoteDataSource + Reposit…
Cassiiopeia Feb 23, 2026
14a6556
AI 장소 추출 후 장소 선택 및 저장 UI 구현 필요 : fix : import 오류 수정 및 build_runner 코드…
Cassiiopeia Feb 23, 2026
2f50392
Merge branch '20260223_26_프로필_조회_수정_설정_화면_필요' of https://github.com/M…
Cassiiopeia Feb 23, 2026
c2a28ab
프로필 조회/수정 설정 화면 필요 : feat : 이용약관 및 개인정보처리방침 페이지 구현 https://github.com…
Cassiiopeia Feb 23, 2026
dd08546
chore: update generated files (build_runner) [skip ci]
github-actions[bot] Feb 23, 2026
8a90bf8
프로필 조회/수정 설정 화면 필요 : feat : MypageProvider 상태 관리 구현 https://github.co…
Cassiiopeia Feb 23, 2026
e2f3cae
Merge branch '20260223_26_프로필_조회_수정_설정_화면_필요' of https://github.com/M…
Cassiiopeia Feb 23, 2026
7c5579c
chore: update generated files (build_runner) [skip ci]
github-actions[bot] Feb 23, 2026
15d7529
마이페이지 하위 라우팅 추가 : feat : 이용약관, 개인정보처리방침 라우트 등록
Cassiiopeia Feb 23, 2026
1259155
프로필 조회/수정 설정 화면 필요 : feat : 닉네임 수정 바텀시트 구현 https://github.com/MapSee-…
Cassiiopeia Feb 23, 2026
789c86d
프로필 조회/수정 설정 화면 필요 : feat : MypagePage 메인 화면 구현 https://github.com/Ma…
Cassiiopeia Feb 23, 2026
82047bd
Merge branch '20260223_26_프로필_조회_수정_설정_화면_필요' of https://github.com/M…
Cassiiopeia Feb 23, 2026
7c2c934
AI 장소 추출 후 장소 선택 및 저장 UI 구현 필요 : fix : import 오류 수정3 https://github.c…
Cassiiopeia Feb 23, 2026
f4520e3
프로필 조회/수정 설정 화면 필요 : fix : 코드 리뷰 이슈 수정 (TextStyle 하드코딩 제거, copyWith 센…
Cassiiopeia Feb 23, 2026
4e0bf33
AI 장소 추출 후 장소 선택 및 저장 UI 구현 필요 : fix : import 문제 수정 https://github.co…
Cassiiopeia Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 151 additions & 0 deletions docs/plans/2026-02-23-mypage-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
# 마이페이지 설계 문서

## 개요

마이페이지 기능 구현. 프로필 조회/닉네임 수정, 알림 설정, 이용약관, 로그아웃/회원탈퇴를 단일 페이지 + 인라인 수정 방식으로 구현.

**관련 이슈**: https://github.com/MapSee-Lab/MapSy-FE/issues/26

## 화면 구성

### 마이페이지 (MypagePage) - 메인

단일 ScrollView, 3개 섹션:

```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

펜스 코드 블록에 언어 식별자를 추가해 주세요.

마크다운 린터(MD040)가 언어 미지정 경고를 발생시키고 있습니다. ASCII 아트 다이어그램, 파일 트리, 라우팅 목록 모두 text 또는 plaintext로 지정하면 됩니다.

📝 제안 수정
- ```
+ ```text
  ┌─────────────────────────────────┐
  ...
- ```
+ ```text
  lib/features/mypage/
  ...
- ```
+ ```text
  /mypage
  ...

Also applies to: 60-60, 96-96

🧰 Tools
🪛 markdownlint-cli2 (0.21.0)

[warning] 15-15: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-02-23-mypage-design.md` at line 15, 마크다운의 펜스 코드 블록들이 언어 식별자
없이 작성되어 MD040 경고가 발생하므로, ASCII 아트 블록(예: 블록 시작에
"┌─────────────────────────────────┐"가 있는 블록), 파일 트리 블록(예:
"lib/features/mypage/"), 라우팅 목록 블록(예: "/mypage"로 시작하는 블록) 등 모든 ``` 코드 블록에 언어 식별자
text 또는 plaintext를 추가하여 ```text 또는 ```plaintext 형태로 수정해 주세요.

┌─────────────────────────────────┐
│ AppBar: "마이페이지" │
├─────────────────────────────────┤
│ ┌───────────────────────────┐ │
│ │ 👤 홍길동 > │ │
│ │ user@gmail.com │ │
│ └───────────────────────────┘ │
│ │
│ ─ 앱 설정 ─────────────────── │
│ 알림 설정 [토글] │
│ │
│ ─ 정보 ───────────────────── │
│ 이용약관 > │
│ 개인정보처리방침 > │
│ 오픈소스 라이선스 > │
│ 앱 버전 v1.0.41 │
│ │
│ ─ 계정 ───────────────────── │
│ 로그아웃 │
│ 회원탈퇴 │
└─────────────────────────────────┘
```

### 닉네임 수정 - 바텀시트

프로필 카드 탭 → 바텀시트:

- 현재 닉네임이 채워진 TextField
- 2~20자, 한글/영문/숫자 검증
- 중복확인은 변경하기 버튼 클릭 시 자동 수행
- 성공 시 바텀시트 닫힘 + 토스트

### 이용약관 / 개인정보처리방침 - 별도 페이지

앱 내 하드코딩 텍스트 표시 (AppBar + 스크롤 텍스트).

### 오픈소스 라이선스

`showLicensePage()` 호출 (별도 구현 불필요).

## 아키텍처

### 파일 구조

```
lib/features/mypage/
├── data/
│ ├── mypage_repository.dart
│ ├── mypage_repository_impl.dart
│ ├── mypage_remote_datasource.dart
│ └── models/
│ ├── profile_update_request.dart
│ └── check_name_response.dart
├── presentation/
│ ├── mypage_provider.dart
│ ├── pages/
│ │ ├── mypage_page.dart (기존 수정)
│ │ ├── terms_page.dart
│ │ └── privacy_policy_page.dart
│ └── widgets/
│ ├── profile_card.dart
│ ├── setting_tile.dart
│ └── nickname_edit_bottom_sheet.dart
```

### 데이터 흐름

1. **마이페이지 진입**: TokenStorage에서 사용자 정보 로드 + SharedPreferences에서 알림 설정 로드
2. **닉네임 수정**: 클라이언트 검증 → GET check-name → POST profile → 상태 갱신
3. **로그아웃/탈퇴**: 확인 다이얼로그 → AuthNotifier 메서드 호출 → 자동 리다이렉트

### 상태 관리

- 사용자 정보: 기존 AuthNotifier의 MemberDto에서 읽기
- 알림 설정: SharedPreferences 로컬 저장
- 닉네임 수정: MypageRepository → API 호출 후 AuthNotifier 상태도 갱신
- 로그아웃/탈퇴: 기존 AuthNotifier 재사용

### 라우팅

```
/mypage (기존)
/mypage/terms (신규)
/mypage/privacy-policy (신규)
```

## 에러 처리

### 닉네임 수정

| 상황 | 처리 |
|------|------|
| 현재 닉네임과 동일 | 버튼 비활성화 |
| 2자 미만 / 20자 초과 | TextField 하단 에러 텍스트 |
| 특수문자/공백 포함 | TextField 하단 에러 텍스트 |
| 닉네임 중복 | "이미 사용 중인 닉네임입니다" |
| 네트워크 오류 | 토스트 "네트워크 연결을 확인해주세요" |

### 로그아웃 / 회원탈퇴

- 확인 다이얼로그 필수 (회원탈퇴는 빨간색 강조)
- 실패 시 토스트로 에러 안내

### 알림 설정

- 토글 ON: 시스템 알림 권한 확인 → 권한 없으면 설정 앱 안내
- 토글 OFF: SharedPreferences에 즉시 저장
Comment on lines +119 to +122
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

알림 토글 ON → 설정 앱 이동 후 권한 미허용 복귀 시 상태 처리가 누락되어 있습니다.

현재 문서는 토글 ON 시 "권한 없으면 설정 앱 안내"까지만 명시하고 있습니다. 사용자가 시스템 설정 앱으로 이동했다가 권한을 허용하지 않고 앱으로 복귀했을 때, 토글은 ON 상태로 남지만 실제 권한은 거부된 상황이 발생합니다.

구현 전에 아래 케이스를 설계에 포함해야 합니다:

  • AppLifecycleState.resumed 시점에 권한 상태 재확인 후 토글 상태 동기화
  • 권한이 여전히 거부된 경우 토글을 OFF로 되돌리고 사용자에게 재안내하거나, 토글을 비활성 상태로 유지
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/plans/2026-02-23-mypage-design.md` around lines 119 - 122, 문서의 알림 토글 동작에
AppLifecycleState.resumed 처리 누락이 있으므로, 앱이 포그라운드로 돌아올
때(AppLifecycleState.resumed) 시스템 권한을 재확인하고 토글 상태를 동기화하도록 설계에 추가하세요; 구체적으로는
onResume 또는 WidgetsBindingObserver의 didChangeAppLifecycleState에서 권한 체크를 호출하고(예:
checkNotificationPermission), 권한이 거부되어 있으면 SharedPreferences와 UI 토글 상태(알림 토글
위젯)를 OFF로 롤백하고 사용자에게 재안내 또는 설명 토스트를 표시하도록 명시하세요.


## 구현 범위

### 포함

- 프로필 카드 (닉네임, 이메일 표시)
- 닉네임 수정 바텀시트
- 알림 ON/OFF 토글 1개
- 이용약관 페이지 (앱 내 텍스트)
- 개인정보처리방침 페이지 (앱 내 텍스트)
- 오픈소스 라이선스 (showLicensePage)
- 앱 버전 표시 (package_info_plus)
- 로그아웃 (확인 다이얼로그)
- 회원탈퇴 (확인 다이얼로그)

### 제외 (YAGNI)

- 프로필 이미지
- 성별/생년월일 수정
- 알림 카테고리별 설정
- 다크모드/언어 설정
- 캐시 삭제

## 의존하는 기존 코드 (수정 없이 재사용)

- AuthNotifier: signOut(), withdraw()
- TokenStorage: 사용자 정보 읽기
- AuthInterceptor: 토큰 자동 갱신
- AppColors, HomeColors, AppTextStyles: 디자인 시스템
Loading