Skip to content

fix: 마음기록 새로고침 오류 수정#205

Merged
Neibce merged 1 commit intomainfrom
fe/fix/maum-log
Aug 28, 2025
Merged

fix: 마음기록 새로고침 오류 수정#205
Neibce merged 1 commit intomainfrom
fe/fix/maum-log

Conversation

@Neibce
Copy link
Owner

@Neibce Neibce commented Aug 28, 2025

Important

Adds refresh functionality for PhotoCalendarScreen and fixes a null value issue in home_degree_graph.dart.

  • Behavior:
    • Adds _refreshPhotoData() in bottom_nav.dart to refresh PhotoCalendarScreen data when the album tab is selected.
    • Adds refreshPhotoCalendar() method in photo_calendar_screen.dart to fetch calendar data.
    • Fixes potential null value issue in home_degree_graph.dart by removing null check for item.formattedDate.
  • Keys:
    • Introduces photoCalendarScreenKey in photo_calendar_screen.dart for external access to refresh method.
  • Misc:
    • Removes unused import in check_record_screen.dart.
    • Removes unused import in pain_service.dart and temperature_summary_service.dart.

This description was created by Ellipsis for 3defb45. You can customize this summary. It will automatically update as commits are pushed.

Summary by CodeRabbit

  • 신기능
    • 앨범 탭 선택 시 사진 데이터가 자동으로 백그라운드 새로고침됩니다.
    • 캘린더 화면으로 돌아올 때 현재 월 데이터가 자동으로 새로고침됩니다.
  • 버그 수정
    • 히스토리 날짜 표시가 null 대비 없이 일관되게 렌더링되도록 개선했습니다.
  • 잡무(Chores)
    • 사용되지 않는 import를 정리해 빌드 경고를 감소시켰습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

PhotoCalendarScreen에 GlobalKey와 refresh 메서드를 추가하고, 하단 탭 전환 및 캘린더로 복귀 시 데이터 새로고침을 트리거하도록 연결했습니다. 홈 그래프의 날짜 표시 로직을 간소화했고, 여러 파일에서 불필요한 import를 제거했습니다.

Changes

Cohort / File(s) Summary
Photo Calendar 새로고침 연동
frontend/ongi/lib/screens/bottom_nav.dart, frontend/ongi/lib/screens/photo/photo_calendar_screen.dart
GlobalKey(photoCalendarScreenKey) 도입, PhotoCalendarScreen 상태에 refreshPhotoCalendar() 추가. 탭 인덱스 2 선택 시 백그라운드 새로고침 수행. 캘린더로 복귀할 때 post-frame 콜백으로 현재 월 데이터 재조회.
홈 그래프 날짜 표시 수정
frontend/ongi/lib/screens/home/home_degree_graph.dart
날짜 렌더링을 item.formattedDate로 직접 사용하도록 변경(널 병합 제거).
정리: 불필요한 import 제거
frontend/ongi/lib/screens/photo/check_record_screen.dart, frontend/ongi/lib/services/pain_service.dart, frontend/ongi/lib/services/temperature_summary_service.dart
미사용 import 정리(home_screen.dart, dart:math, package:flutter/material.dart), 기능 변화 없음.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as User
  participant BottomNav as BottomNav
  participant PhotoTab as PhotoCalendarScreen (Widget)
  participant PhotoState as _PhotoCalendarScreenState

  User->>BottomNav: 탭 선택(index=2)
  BottomNav->>PhotoState: photoCalendarScreenKey.currentState?.refreshPhotoCalendar()
  activate PhotoState
  PhotoState->>PhotoState: _fetchCalendarDataForMonth(_focusedDay)
  PhotoState-->>BottomNav: 완료/실패(로그만)
  deactivate PhotoState
Loading
sequenceDiagram
  autonumber
  participant PhotoState as _PhotoCalendarScreenState
  participant Framework as Flutter Frame
  Note over PhotoState: _goBackToCalendar()\n- view 업데이트\n- post-frame에 refresh 예약
  PhotoState->>Framework: addPostFrameCallback
  Framework-->>PhotoState: 다음 프레임
  PhotoState->>PhotoState: refreshPhotoCalendar()\n_fetchCalendarDataForMonth(_focusedDay)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

달력 탭 톡, 새芽가 도록 🌱
프레임 뒤 살짝, 신선한 바람이 불고
토끼는 귀를 쫑긋, 날짜를 또록또록
불필요한 짐은 툭툭—가벼워졌지
오늘의 사진은 방금 갓 구운 빵처럼 따끈! 🥐🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6b9ed28 and 3defb45.

📒 Files selected for processing (6)
  • frontend/ongi/lib/screens/bottom_nav.dart (3 hunks)
  • frontend/ongi/lib/screens/home/home_degree_graph.dart (1 hunks)
  • frontend/ongi/lib/screens/photo/check_record_screen.dart (0 hunks)
  • frontend/ongi/lib/screens/photo/photo_calendar_screen.dart (2 hunks)
  • frontend/ongi/lib/services/pain_service.dart (0 hunks)
  • frontend/ongi/lib/services/temperature_summary_service.dart (0 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fe/fix/maum-log

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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 @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit 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:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit 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? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @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 19a856f into main Aug 28, 2025
2 of 4 checks passed
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 3defb45 in 1 minute and 10 seconds. Click for details.
  • Reviewed 131 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/ongi/lib/screens/bottom_nav.dart:31
  • Draft comment:
    Using a GlobalKey for PhotoCalendarScreen enables external refresh; ensure this pattern fits your state strategy.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. frontend/ongi/lib/screens/bottom_nav.dart:125
  • Draft comment:
    Consider using a proper logging mechanism instead of print in _refreshPhotoData for production diagnostics.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. frontend/ongi/lib/screens/bottom_nav.dart:161
  • Draft comment:
    Ensure refreshing photo data on album tab (index 2) aligns with expected user experience.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. frontend/ongi/lib/screens/home/home_degree_graph.dart:324
  • Draft comment:
    Removed null fallback from item.formattedDate; confirm that formattedDate is always non-null.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
5. frontend/ongi/lib/screens/photo/check_record_screen.dart:7
  • Draft comment:
    Unused import removed; this cleanup improves dependency management.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it just states that an unused import was removed and claims it improves dependency management. It doesn't provide any actionable feedback or suggestions for improvement.
6. frontend/ongi/lib/screens/photo/photo_calendar_screen.dart:18
  • Draft comment:
    Exposing refreshPhotoCalendar via a GlobalKey works; ensure the global key usage is well-justified and documented.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
7. frontend/ongi/lib/screens/photo/photo_calendar_screen.dart:38
  • Draft comment:
    The try-catch in refreshPhotoCalendar uses print; consider using a logging framework for error reporting.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
8. frontend/ongi/lib/services/pain_service.dart:2
  • Draft comment:
    Removed unused 'dart:math' import for cleaner code.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, as it simply states that an unused import was removed for cleaner code. It does not provide a suggestion, ask for confirmation, or point out a potential issue.
9. frontend/ongi/lib/services/temperature_summary_service.dart:3
  • Draft comment:
    Removed unnecessary import of 'package:flutter/material.dart' to reduce dependency overhead.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, stating that an import was removed to reduce dependency overhead. It doesn't provide a suggestion, ask for confirmation, or point out a potential issue. According to the rules, purely informative comments should be removed.

Workflow ID: wflow_LzPTZRvBfiIr5Ksm

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@Neibce Neibce deleted the fe/fix/maum-log branch August 28, 2025 17:20
Neibce added a commit to 2025-PNU-SW-Hackathon/PNUSW-2025-OnGi-10 that referenced this pull request Aug 28, 2025
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