Skip to content

fix: 연동 캘린더의 실제 일정을 후보 시간에 반영 (#115) - #120

Merged
Siul49 merged 1 commit into
devfrom
fix/115-calendar-events-availability
Jul 10, 2026
Merged

fix: 연동 캘린더의 실제 일정을 후보 시간에 반영 (#115)#120
Siul49 merged 1 commit into
devfrom
fix/115-calendar-events-availability

Conversation

@kokkumong

@kokkumong kokkumong commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

🚀 작업 내용 (What)

  • Google / iCloud 연동 캘린더의 실제 이벤트를 조회해 후보 시간 격자의 "바쁜 시간"으로 반영
  • 연동 이벤트 집계 API 신규 추가: GET /api/calendar/events?start=&end=
    • Google(getValidTokens + events.list)과 iCloud(CalDAV queryEvents + ICS 파싱)를 병합해 표준 CalendarEvent로 반환 (한쪽 실패해도 나머지 보존)
  • 절대 시각 이벤트 → 요일격자 busy 슬롯 키(MON-10) 변환 유틸 eventsToBusySlotKeys 추가 (사용자 로컬 시간대 기준, 클라이언트에서 변환)
  • 모임 생성 화면: 하드코딩된 가짜 바쁜 시간(MON-10, WED-14…) 제거 → 후보 기간의 실제 이벤트로 교체 (후보 기간 변경 시 재조회)
  • 조율/참여 화면: 항상 떠 있던 가짜 "구글 캘린더 감지됨" 배너 제거 → 실제 연동된 경우에만 바쁜 시간을 제외한 가용 시간대를 자동 선택하고 사실에 맞는 배너 노출 (사용자가 이미 선택한 칸은 덮어쓰지 않음)
  • eventsToBusySlotKeys 단위 테스트 7개 추가

📣 핵심 변경 이유 (Why)

  • 연동 인프라(OAuth 토큰·CalDAV·어댑터·busy→free 변환)는 이미 있었으나, 실제 이벤트를 조회해 격자에 연결하는 부분이 없어 생성 화면은 하드코딩된 가짜 바쁜 시간을, 조율 화면은 순수 장식 배너만 보여주고 있었습니다.
  • 사용자가 연동한 일정이 후보 시간에 전혀 반영되지 않던 [BUG] Google 및 iCloud 연동 후 실제 일정이 후보 시간에 반영되지 않음 #115 버그를 해결합니다.

📸 스크린샷 (Visuals, 선택)

  • 로컬 DB(postgres) 환경 미구성으로 종단 캡처는 생략했습니다. 순수 변환 로직은 단위 테스트로 검증했고, tsc/eslint/vitest 통과했습니다.
  • 실제 OAuth/CalDAV 연동 계정에서의 종단 동작 확인은 리뷰/스테이징에서 권장합니다.

⚠️ 체크리스트 (Checklist)

  • 브랜치 컨벤션(feature/00-name)을 지켰나요?
  • 커밋 컨벤션(feat:, fix: 등)을 지켰나요?
  • 작업 전에 관련 이슈를 생성하고 연결했나요?
  • 내 코드가 팀의 기존 코드를 망가뜨리지 않았는지 확인했나요?

🔗 관련 이슈 (Issue)

Close #115

Google/iCloud 연동 후에도 후보 격자가 하드코딩된 가짜 바쁜 시간이나
순수 장식 배너만 보여주던 문제를 해결한다.

- 연동 캘린더 이벤트 집계 API(GET /api/calendar/events) 추가:
  Google(getValidTokens+events.list)와 iCloud(CalDAV queryEvents)를
  병합해 표준 CalendarEvent로 반환(부분 실패 허용)
- 절대 시각 이벤트를 요일격자 busy 슬롯 키로 변환하는
  eventsToBusySlotKeys 유틸 추가(클라이언트 로컬 시간대 기준)
- 생성 화면: mock busySlots 제거, 후보 기간 실제 이벤트로 교체
- 조율/참여 화면: 가짜 "감지됨" 배너 제거, 실제 연동 시 바쁜 시간을
  제외한 가용 시간대를 자동 선택하고 사실에 맞는 배너 노출
- calendar-busy 단위 테스트 추가

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moim-app Ready Ready Preview, Comment Jun 15, 2026 1:18am

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kokkumong, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 36 minutes and 46 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3fe23f69-a0af-40d4-a5b0-605bbfc404ab

📥 Commits

Reviewing files that changed from the base of the PR and between 2ffffcf and dfa3534.

📒 Files selected for processing (6)
  • src/app/api/calendar/events/route.ts
  • src/app/schedule/[id]/ScheduleRoomClient.tsx
  • src/app/schedule/create/CreateScheduleClient.tsx
  • src/lib/calendar/fetch-events.ts
  • src/lib/scheduling/__tests__/calendar-busy.test.ts
  • src/lib/scheduling/calendar-busy.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/115-calendar-events-availability

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Siul49
Siul49 merged commit 4c1dde5 into dev Jul 10, 2026
5 of 6 checks passed
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.

[BUG] Google 및 iCloud 연동 후 실제 일정이 후보 시간에 반영되지 않음

2 participants