Skip to content

feat: 타 가족 걸음수 랭킹 화면 구현 #155

Merged
taekoong merged 8 commits intomainfrom
fe/feat/step-ranking
Aug 20, 2025
Merged

feat: 타 가족 걸음수 랭킹 화면 구현 #155
taekoong merged 8 commits intomainfrom
fe/feat/step-ranking

Conversation

@taekoong
Copy link
Collaborator

@taekoong taekoong commented Aug 20, 2025

Summary by CodeRabbit

  • New Features

    • 가족 교차 랭킹 화면 추가: 주간 평균 걸음수 요약, 가족별 랭킹 리스트, 본인 항목 강조 표시.
    • 건강 홈에서 “다른 가족들은 얼마나 걸었을까요?” 버튼 추가 및 걸음 항목 경로 변경, 단순화된 뒤로가기 버튼 도입.
    • 홈 도넛 차트에 체온 요약(멤버별 기여도) 표시 추가 및 관련 요약 수치 노출.
  • Chores

    • 교차 랭킹 화면 타이틀 로고 이미지 에셋 추가.

@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

새 CrossFamilyRankingScreen 추가와 HealthHomeScreen 내비게이션/뒤로가기 변경, 온도 요약 서비스 및 HomeDonutCapsule의 토큰/기여도 기반 도넛 로직 추가, pubspec에 타이틀 로고 에셋 등록; family_step_tracker_screen은 포맷팅만 수정됨.

Changes

Cohort / File(s) Summary of Changes
새 랭킹 화면 추가
frontend/ongi/lib/screens/health/cross_family_ranking_screen.dart
신규 StatefulWidget 화면 추가. PrefsManager로 액세스 토큰 조회, StepRankService로 가족 걸음 랭킹 비동기 로드, 로딩/에러 상태 관리, 주간 평균 표시, 랭킹 리스트 렌더링 및 현재 사용자 강조(포맷팅·천단위 구분 포함).
홈 화면 내비게이션 및 UI 변경
frontend/ongi/lib/screens/health/health_home_screen.dart
‘familyStepTracker’와 ‘crossFamilyRanking’ 뷰 처리 및 스택 렌더링 추가, 걸음 버튼 경로 변경, CTA로 crossFamilyRanking 이동, 뒤로가기 IconButton으로 교체하고 단순히 view='home'으로 복귀하도록 로직 축소, 관련 import 추가.
도넛/온도 요약 및 토큰 초기화
frontend/ongi/lib/screens/home/home_donutCapsule.dart, frontend/ongi/lib/services/temperature_summary_service.dart
HomeDonutCapsule에 토큰 기반 초기화(_token) 및 fetchTemperatureSummary 호출 추가, memberContributions 도입으로 도넛 데이터 구동. 새 TemperatureSummaryService 추가: 가족 온도 요약 API 호출(fetchTemperatureSummary) 및 응답 파싱 로직. pain-area 매핑 및 다중 pain 처리 로직 보완.
포맷팅 변경 (무변경)
frontend/ongi/lib/screens/health/family_step_tracker_screen.dart
코드 포맷팅/공백/들여쓰기 정리만 수행, 기능적 변경 없음.
에셋 등록
frontend/ongi/pubspec.yaml
assets/images/cross_family_ranking_title_logo.png 에셋 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as 사용자
  participant Home as HealthHomeScreen
  participant CFR as CrossFamilyRankingScreen
  participant Prefs as PrefsManager
  participant Svc as StepRankService

  User->>Home: "다른 가족들은..." CTA 탭
  Home->>CFR: view='crossFamilyRanking'로 전환 (Stack)

  rect rgb(250,245,240)
    CFR->>Prefs: getAccessToken()
    alt 토큰 없음
      Prefs-->>CFR: null
      CFR->>CFR: _errorMessage='로그인이 필요합니다.'
    else 토큰 있음
      Prefs-->>CFR: accessToken
      CFR->>Svc: fetchFamilyStepRanks(accessToken)
      alt 성공
        Svc-->>CFR: List<FamilyStepRank>
        CFR->>CFR: _familyRanks 업데이트 -> UI 렌더링
      else 실패
        Svc-->>CFR: Exception
        CFR->>CFR: _errorMessage 설정 -> 에러 UI 렌더링
      end
    end
  end

  Note right of CFR: 로딩/에러/랭킹 리스트 표시
Loading
sequenceDiagram
  autonumber
  actor System as 앱
  participant Donut as HomeDonutCapsule
  participant Prefs as PrefsManager
  participant TempSvc as TemperatureSummaryService

  System->>Donut: initState
  Donut->>Prefs: getAccessToken()/getFamilyCode()
  alt 토큰/가족코드 존재
    Prefs-->>Donut: token, familyCode
    Donut->>TempSvc: fetchTemperatureSummary(familyCode, token)
    alt 성공
      TempSvc-->>Donut: memberIncreaseTemperatures / total...
      Donut->>Donut: memberContributions 계산 -> 도넛 리페인트
    else 실패
      TempSvc-->>Donut: Exception
      Donut->>Donut: memberContributions 리셋/에러 처리
    end
  else 없음
    Prefs-->>Donut: null
    Donut->>Donut: 기본값 사용 또는 에러 처리
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🥕 탭 소리 나는 밤에, 나는 깡총 토끼 개발자
새 화면에 랭킹이 줄지어, 발자국들이 이야기하네
도넛은 돌고 온도는 속삭여, 멤버 기여도 춤추고
뒤로가기는 한 번에, 홈으로 폴짝!
이미지 한 장 넣고 오늘도 배포 준비 완료 🐰

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7175880 and 9bad933.

📒 Files selected for processing (2)
  • frontend/ongi/lib/screens/home/home_donutCapsule.dart (19 hunks)
  • frontend/ongi/lib/services/temperature_summary_service.dart (1 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@taekoong taekoong requested review from oxomi and removed request for oxomi August 20, 2025 13:27
@taekoong taekoong merged commit acc37ad into main Aug 20, 2025
2 of 4 checks passed
Neibce pushed a commit to 2025-PNU-SW-Hackathon/PNUSW-2025-OnGi-10 that referenced this pull request Aug 25, 2025
* feat: 타가족 걸음수 랭킹 화면

* feat: 타가족 걸음수 랭킹 화면 연결

* feat: 타가족 걸음수 랭킹 화면 연결

* feat: 타가족 걸음수 랭킹 화면 연결

* feat: 도넛 차트 api 연결
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant