Skip to content

feat: 가족 걸음수 랭킹 서비스파일 추가 #164

Merged
Neibce merged 10 commits intomainfrom
fe/feat/step-ranking
Aug 21, 2025
Merged

feat: 가족 걸음수 랭킹 서비스파일 추가 #164
Neibce merged 10 commits intomainfrom
fe/feat/step-ranking

Conversation

@taekoong
Copy link
Collaborator

@taekoong taekoong commented Aug 21, 2025

  • 스트레칭 화면 구현 중 서비스 파일 누락으로 먼저 pr 올립니다, 스트레칭 화면 부분 구현 모습이 어색하긴 하지만 다른 부분은 동일, 오류는 생기지 않아요!

Summary by CodeRabbit

  • 신기능

    • 통증 기록 로딩 후 화면 하단에 스트레칭 안내 패널과 “스트레칭 하러 가기” 버튼이 표시되며, 안내 다이얼로그를 통해 가이던스를 제공합니다.
    • 가족 걸음 수 랭킹 데이터를 불러와 표시할 수 있도록 데이터 연동을 추가했습니다.
  • 리팩터링

    • 통증 부위 표기 로직을 간소화하고 일부 표시 문자열과 공백을 정리했습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 21, 2025

Walkthrough

HealthStatusInputScreen에 스트레칭 안내 패널과 다이얼로그가 조건부 표시로 추가되었고, 통증 기록 로딩 완료 시 노출되도록 플래그가 도입됨. 별도로 가족 걸음 수 랭킹을 가져오는 StepRankService와 FamilyStepRank 모델이 새로 추가됨.

Changes

Cohort / File(s) Summary
Health UI: Stretch Prompt
frontend/ongi/lib/screens/health/health_status_input_screen.dart
스트레칭 패널 표시 플래그 추가, 통증 기록 로딩 흐름에 플래그 토글, 하단 패널 UI와 “스트레칭 하러 가기” 버튼 추가, 스트레칭 안내 다이얼로그 구현, 제목 텍스트 빌더의 리스트/단일 값 처리 명시화 및 정리.
Step Rank Service & Model
frontend/ongi/lib/services/step_rank_service.dart
StepRankService/FamilyStepRank 신규: /steps/rank API 호출, 10초 타임아웃, 다양한 응답 형태(List/Map) 정규화, 숫자 파싱 보강, 상태코드별 에러 처리(401/403/5xx/기타), Timeout 분기, 모델 JSON 역직렬화 및 디버그 toString.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant H as HealthStatusInputScreen
  participant R as PainRecordStore/Service

  U->>H: 화면 진입
  note over H: _isiStrechingVisible = false
  H->>R: _loadPainRecords()
  R-->>H: 통증 기록 로딩 성공
  note over H: _isiStrechingVisible = true
  U->>H: "스트레칭 하러 가기" 버튼 탭
  H-->>U: 스트레칭 안내 다이얼로그 표시
Loading
sequenceDiagram
  autonumber
  participant C as Client (App)
  participant S as StepRankService
  participant API as /steps/rank API

  C->>S: fetchFamilyStepRanks(accessToken)
  S->>API: GET /steps/rank (Bearer token, JSON)
  alt 200 OK
    API-->>S: Body(List|Map{data|familyRanks|...})
    S->>S: 응답 정규화(List) 및 타입 파싱
    S-->>C: List<FamilyStepRank>
  else 401/403/5xx/기타
    API-->>S: Error status
    S-->>C: 예외(상태별 메시지)
  end
  opt 네트워크 지연
    S-->>C: TimeoutException -> 사용자 메시지
  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 db5e9fd and 78faf8b.

📒 Files selected for processing (2)
  • frontend/ongi/lib/screens/health/health_status_input_screen.dart (24 hunks)
  • frontend/ongi/lib/services/step_rank_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.

@Neibce Neibce merged commit ddd0401 into main Aug 21, 2025
3 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 연결

* feat: 서비스 파일 pr
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.

2 participants