Skip to content

feat: 통증 부위 수정 연결 #151

Merged
taekoong merged 6 commits intomainfrom
fe/fix/pain-record
Aug 19, 2025
Merged

feat: 통증 부위 수정 연결 #151
taekoong merged 6 commits intomainfrom
fe/fix/pain-record

Conversation

@taekoong
Copy link
Collaborator

@taekoong taekoong commented Aug 19, 2025

Summary by CodeRabbit

  • New Features
    • 통증 부위를 다중 선택할 수 있고, 전면/후면 전환에 따라 가슴·등을 별도로 선택 가능
    • 신체 부위를 좌/우 및 세부 부위(어깨·상완·전완·손·허벅지·종아리·무릎·발 등)로 세분화
    • 오늘의 통증 기록에서 여러 부위를 한 번에 표시
    • 통증 강도 입력 단계를 제거해 입력을 간소화
  • Bug Fixes
    • 단일 값/목록 형태의 통증 부위를 모두 안정적으로 처리하여 표시 오류 예방
  • Style
    • 성공 스낵바 스타일 개선

@coderabbitai
Copy link

coderabbitai bot commented Aug 19, 2025

Walkthrough

Pain 영역 처리가 전반적으로 확장되었습니다. 표시·변환 로직이 단일 문자열에서 리스트 기반으로 변경되어 다중 부위 지원이 추가되었습니다. 입력 화면은 세분화된 신체 부위를 선택·전송하며, PainService는 painLevel 없이 다중 painAreas 리스트를 전송하도록 API가 변경되었습니다. 기타 파일은 포맷팅 변경뿐입니다.

Changes

Cohort / File(s) Summary
AndroidManifest 포맷
frontend/ongi/android/app/src/main/AndroidManifest.xml
기능 변경 없음. 파일 말미 개행 포맷만 수정.
Health 홈 화면 표시 로직
frontend/ongi/lib/screens/health/health_home_screen.dart
Pain 영역 키를 대문자 기반 매핑으로 변경. 단일/리스트 모두 지원하여 한국어 변환 후 중복 제거·콤마 결합. 디버그 로그 추가. 공개 시그니처 변화 없음.
Health 상태 입력 화면 로직/전송
frontend/ongi/lib/screens/health/health_status_input_screen.dart
앞/뒤(가슴/등) 분리 상태 추가. 세분화된 좌/우 어깨·상완·전완·손·허벅지·종아리·무릎·발 등 선택 로직 도입. 선택 부위 리스트 추출 및 한국어 변환 업데이트. 화면 전환 동기화. submit 시 다중 painAreas 리스트로 단일 API 호출로 변경. 디버그/에러 로그 강화.
PainService API/Enum
frontend/ongi/lib/services/pain_service.dart
addPainRecord 시그니처를 painAreas(List)만 받도록 변경(painLevel 제거). 요청 바디에서 painLevel 제거, 다중 부위 전송. 응답 에러 로깅 확장. PainArea enum을 좌/우 및 세분화된 부위로 대폭 확장. PainLevel enum 삭제.
HealthService 포맷
frontend/ongi/lib/services/health_service.dart
기능 변경 없음. 파일 말미 개행 포맷만 수정.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as HealthStatusInputScreen
  participant PS as PainService
  participant API as Backend

  rect rgba(200,230,255,0.3)
  Note over UI: 사용자 신체 부위 선택(복수 가능)
  UI->>UI: _getSelectedPainAreas()로 부위 리스트 산출
  UI->>UI: 화면 전면/후면 전환 시 표시 동기화
  end

  rect rgba(220,255,220,0.3)
  UI->>PS: addPainRecord(date, painAreas: List)
  PS->>API: POST /pain-records { date, painArea: [ ... ] }
  API-->>PS: 2xx 또는 오류 응답(본문 포함)
  alt 성공
    PS-->>UI: 결과 반환
    UI->>UI: 성공 스낵바 표시
  else 오류
    PS-->>UI: 상태/본문 포함 예외
    UI->>UI: 에러 메시지 표시
  end
  end
Loading
sequenceDiagram
  autonumber
  participant UI as HealthHomeScreen
  participant Map as PainArea Map

  UI->>UI: 오늘 기록 불러오기
  alt painArea가 List
    loop 각 항목
      UI->>Map: 대문자 키로 한국어 변환
      Map-->>UI: 한국어 라벨
    end
    UI->>UI: 중복 제거 후 콤마 결합
  else 단일 값
    UI->>Map: 대문자 키로 한국어 변환
    Map-->>UI: 한국어 라벨 또는 원문
  end
  UI->>UI: 화면에 표시
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 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 eea9cfb and 2ced409.

📒 Files selected for processing (5)
  • frontend/ongi/android/app/src/main/AndroidManifest.xml (1 hunks)
  • frontend/ongi/lib/screens/health/health_home_screen.dart (2 hunks)
  • frontend/ongi/lib/screens/health/health_status_input_screen.dart (11 hunks)
  • frontend/ongi/lib/services/health_service.dart (1 hunks)
  • frontend/ongi/lib/services/pain_service.dart (2 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 merged commit 6df4f8a into main Aug 19, 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: 통증 부위 연결
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