[feat/MAT-873] <홈> Empty State (개발)#358
Merged
Merged
Conversation
… item 홈 빈 상태 표시용 회색 안내 카드(placeholder)를 HomeStudyItem 의 discriminated union 변형으로 추가. text 는 단순 문자열 또는 inline bold 지원 세그먼트 배열을 받는다. 기존 정상 카드 타입은 호환 유지.
OS 알림 권한 상태를 마운트 시 1회 + AppState 'active' 복귀마다 재조회하는 훅. 초기값을 undefined 로 두어 호출자가 '확인 전' 과 '거부됨' 을 구분할 수 있게 한다. Android 13+ POST_NOTIFICATIONS 처리를 위해 expo-notifications, iOS 는 firebase messaging 사용.
발급된 집중학습 카드가 없을 때 study-summary 껍데기는 그대로 두고 안쪽 item만 회색 안내 placeholder 로 채워 '발행 예정' 메시지를 노출한다. OS 알림 권한이 거부됐거나 푸시/서비스 알림 토글이 꺼져 있으면 그 아래에 '전체메뉴 > 알림 설정' 안내 카드를 추가로 표시한다.
문제 세트가 비었을 때 '풀이할 문제가 보이지 않나요? 피드백 보내기로 요청해주세요!' 안내와 함께 Feedback 화면으로 진입하는 인라인 링크를 노출한다. 홈에서 진입할 때 status bar 영역을 확보하도록 Feedback 라우트에 withTopInset 옵션을 추가. 시작 CTA 는 라벨 없는 상태에서 비활성 표시(primary-300, '문제 1번부터 풀기' fallback)로 변경.
…le results - home-renderer: placeholder 세그먼트 루프를 bold/non-bold 분기로 분리해 가독성 개선 (동작 동일) - useOsNotificationPermission: AppState 빠른 토글 시 in-flight 응답의 stale 덮어쓰기와 언마운트 이후 setState 를 request id + mounted ref 로 차단
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
Contributor
There was a problem hiding this comment.
Pull request overview
학생 홈 화면에서 “집중학습 카드가 아직 없을 때”의 빈 상태 UI를 노출하고, 알림 비활성 상태 및 문제세트 빈 상태에서의 추가 안내/진입 동선을 제공하기 위한 변경입니다. pointer-content-renderer의 홈 카드 타입/렌더링을 확장하고, apps/native에서 홈 init 메시지 구성 및 알림 권한/설정 기반 분기를 추가합니다.
Changes:
pointer-content-renderer의HomeStudyItem에placeholder변형을 추가하고 홈 렌더러/CSS에 placeholder UI 분기를 구현apps/native에서 OS 알림 권한 상태를 구독하는useOsNotificationPermission훅 추가 및 홈 init 메시지에서 빈 상태 fallback 카드 구성- 문제 세트가 비어 있을 때 피드백 화면으로 이동하는 인라인 링크 추가 + Root Stack에
Feedback라우트 등록
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/pointer-content-renderer/src/web/modes/home/home.css | 홈 study item placeholder 스타일 토큰/클래스 추가 |
| packages/pointer-content-renderer/src/web/modes/home/home-renderer.ts | HomeStudyItem.kind === 'placeholder' 렌더링 분기 추가(멀티라인/볼드 세그먼트 지원) |
| packages/pointer-content-renderer/src/types.ts | HomeStudyItem을 normal/placeholder union으로 확장, placeholder 텍스트 타입 추가 |
| packages/pointer-content-renderer/dev/mock-data.ts | dev 확인용 홈 빈 상태 mock 카드 2종 추가 |
| packages/pointer-content-renderer/dev/dev-panel.ts | dev panel에 홈 빈 상태 렌더 버튼 추가 |
| apps/native/src/navigation/student/types.ts | Root Stack에 Feedback 라우트 파라미터 타입 추가 |
| apps/native/src/navigation/student/StudentNavigator.tsx | Root Stack에 FeedbackScreen 등록 |
| apps/native/src/hooks/useOsNotificationPermission.ts | OS 알림 권한 상태 조회/구독 훅 신규 추가 |
| apps/native/src/hooks/index.ts | useOsNotificationPermission 및 checkOsNotificationPermission re-export |
| apps/native/src/features/student/menu/screens/FeedbackScreen.tsx | 라우트 파라미터로 top inset 적용 옵션 추가 |
| apps/native/src/features/student/home/transforms/homeContentTransforms.ts | 홈 init에서 빈 상태 fallback study-summary 카드 생성 로직 추가 |
| apps/native/src/features/student/home/screens/HomeScreen.tsx | OS 권한 + 푸시 설정 결합해 showNotificationOff 계산 후 home init에 전달 |
| apps/native/src/features/student/home/components/ProblemSet.tsx | 문제 세트 빈 상태 안내 + “피드백 보내기” 링크 및 CTA 비활성 표기 개선 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const items: HomeStudyItem[] = [ | ||
| { | ||
| kind: 'placeholder', | ||
| text: `${name}님의 6월 모고 오답 문항을 중심으로 집중학습 카드와 문제가 발행될 예정이에요.`, |
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
홈 화면에서 발급된 집중학습 카드가 없을 때 study-summary 카드의 껍데기는 유지하고 내부 item만 회색 placeholder 안내로 대체해 빈 상태 UI 를 노출한다. OS 알림 권한이나 앱 푸시/서비스 알림 토글이 꺼져 있으면 같은 그룹에 알림 활성 안내 카드를 한 칸 더 표시한다. 문제 세트 영역에도 빈 상태 안내와 피드백 화면 진입 링크를 추가했다.
Linear
Changes
pointer-content-renderer:HomeStudyItem을 discriminated union 으로 확장해placeholder변형 추가.text는 단순 문자열 또는 inline bold 지원 세그먼트 배열을 받는다. 기존 정상 카드(kind미지정)는 자동으로 normal 로 narrow.pointer-content-renderer: home 렌더러에 placeholder 분기 추가(뱃지/토글 없는 회색 안내 박스, bold 세그먼트는<strong>으로 감쌈) + CSS 토큰 정의.pointer-content-renderer: dev panel/mock-data 에mockHomeEmptyCards,mockHomeEmptyWithNotificationOffCards추가(기존 mock 손대지 않음).apps/native:useOsNotificationPermission훅 신설. 마운트 1회 + AppState 'active' 복귀 시 재조회, 초기값undefined로 깜빡임 방지, request id + mounted ref 로 stale 응답/언마운트 후 setState 차단.apps/native:homeContentTransforms.buildHomeInit가 더 이상 null 을 반환하지 않고 빈 상태에서는 fallback summary 카드를 push.showNotificationOff옵션이 true 면 알림 OFF 안내 카드를 추가.apps/native: HomeScreen 이useOsNotificationPermission+useGetPushSetting결과를 결합해showNotificationOff산정 후buildHomeInit에 전달.apps/native: ProblemSet 빈 상태에 "풀이할 문제가 보이지 않나요? 피드백 보내기로 문제를 요청해 주세요!" 안내와 인라인 피드백 링크 추가. CTA 는 라벨 없는 상태에서 비활성 표시(primary-300, '문제 1번부터 풀기' 폴백)로 변경.apps/native: root stack 에Feedback라우트 등록,withTopInset옵션으로 홈 진입 시 status bar 영역 확보.Testing
pnpm typecheck(pointer-content-renderer, apps/native)pnpm lint(pointer-content-renderer)pnpm build(pointer-content-renderer — bundle 재생성)Risk / Impact
pointer-content-renderer의HomeStudyItem타입.HomeStudyItem에 대해 exhaustive switch 를 하는 소비자가 있는 경우 신규placeholder분기 처리 추가가 필요. 현재 워크스페이스 내에서는 home-renderer 외 사용처 없음.=== false체크라 OS/푸시 설정이 미조회(undefined)일 때는 노출되지 않음. 초기 로딩 직후 OS 권한 결과가 도착하면 카드가 새로 끼어드는 한 프레임의 layout shift 가능.Screenshots / Video