Skip to content

feat: 캘린더 supabase 연동 및 일정 수정 기능 추가 - #59

Merged
JiWoongE merged 3 commits into
developfrom
Feat/#55/calendar-supabase-integration
Jul 15, 2026
Merged

feat: 캘린더 supabase 연동 및 일정 수정 기능 추가#59
JiWoongE merged 3 commits into
developfrom
Feat/#55/calendar-supabase-integration

Conversation

@JiWoongE

@JiWoongE JiWoongE commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Pull Request

작업 내용

  • 캘린더 기능을 mock/store 기반에서 Supabase 실데이터 기반으로 전환했습니다.
  • 일정 조회는 TanStack Query, 생성/수정/삭제는 server action + mutation 패턴으로 연결했습니다.
  • 오른쪽 일정 패널에서 바로 수정할 수 있도록 수정 기능을 추가했습니다.
  • 시간 입력을 자유 텍스트 대신 time picker로 변경하고, 화면 표시는 오전/오후 형식으로 정리했습니다.

작업 결과

  • 캘린더 페이지에서 workspace 기준 실제 일정 데이터를 조회합니다.
  • 일정 추가/수정/삭제 후 목록이 즉시 다시 반영됩니다.
  • 기존 mock 일정 데이터와 로컬 zustand store 의존이 제거되었습니다.
  • 일정 시간은 입력값이 고정 형식(HH:mm)으로 저장되고, UI에서는 읽기 쉬운 형식으로 표시됩니다.

변경 사항

Added

  • calendar_events 조회 API
  • 일정 생성/수정/삭제 server action
  • 캘린더 query hook / mutation hook
  • 일정 시간 정규화 및 표시 포맷 mapper 유틸

Changed

  • 캘린더 화면이 mock/store 대신 Supabase 데이터를 사용하도록 변경
  • 오른쪽 일정 패널에 수정 버튼 추가
  • 일정 추가 모달을 추가/수정 공용 모달로 변경
  • 시간 입력 방식을 텍스트 입력에서 type="time"으로 변경

Fixed

  • 일정 생성 후 새로고침 시 mock 기준으로 보이던 흐름 제거
  • 일정 수정이 불가능했던 UI 흐름 보완
  • 시간 입력 포맷이 제각각 들어갈 수 있던 문제 완화

실행화면

image

테스트

  • 로컬 실행 확인
  • 주요 시나리오 확인
  • 영향 범위 확인

리뷰 체크리스트

  • PR base branch가 올바릅니다. (feature/* -> develop, 배포 시 develop 또는 release/* -> main)
  • 브랜치명이 Type/#issue-number/description 형식을 따릅니다.
  • 커밋 메시지가 컨벤션을 따릅니다.
  • 불필요한 console.log, 주석, 임시 코드를 제거했습니다.
  • 타입 에러와 린트 에러를 확인했습니다.
  • CodeRabbit 1차 리뷰를 확인했습니다.
  • CodeRabbit 리뷰 반영 후 Discord에 공유했습니다.
  • 최소 1명 이상의 approve 후 merge합니다.

리뷰 요청사항

  • calendar_events 테이블에 time, color 전용 컬럼이 아직 없어 현재는 description 메타데이터로 저장하고 있습니다. 추후 스키마 분리 방향이 괜찮은지 같이 봐주시면 좋겠습니다.
  • 현재 작업 범위에서는 캘린더 조회/추가/수정/삭제까지 우선 연결했고, 전체 프로젝트의 별도 typecheck/build 이슈는 기존 develop 상태와 분리해서 봐주시면 됩니다.

관련 이슈

Closes #55

Summary by CodeRabbit

  • 새 기능
    • 워크스페이스 기준으로 캘린더 일정을 조회하고 생성/수정/삭제할 수 있습니다.
    • 일정별 수정·삭제 버튼을 제공하며, 시간 라벨과 색상 입력을 함께 지원합니다.
  • 개선
    • 저장/수정/삭제 중에는 입력과 버튼이 비활성화되어 중복 작업을 방지합니다.
    • 작업 완료 후 일정 목록이 자동으로 최신 상태로 갱신됩니다.
    • 로딩/오류 상태와 재시도, 실패 시 토스트 안내를 추가했습니다.
    • 시간 입력을 time 형식으로 변경해 입력 안정성을 높였습니다.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d6b00480-9184-4b9d-b7a6-8f40acdf8d77

📥 Commits

Reviewing files that changed from the base of the PR and between a50d38f and 676abb9.

📒 Files selected for processing (2)
  • src/entities/calendar-event/api/update-calendar-event.ts
  • src/features/manage-calendar/ui/CalendarView.tsx

📝 Walkthrough

Walkthrough

캘린더 mock·Zustand 기반 데이터를 제거하고 Supabase 조회·생성·수정·삭제 API와 React Query 훅을 연결했습니다. 이벤트 매핑 및 시간 처리를 추가했으며, CalendarView에 편집·오류·로딩·재시도·제출 상태를 반영했습니다.

Changes

캘린더 실데이터 연동

Layer / File(s) Summary
이벤트 데이터 매핑
src/entities/calendar-event/model/calendar-event.mapper.ts
DB 행과 도메인 이벤트 변환, JSON 메타데이터 처리, 시간 정규화·표시, KST 기반 삽입 payload 생성을 추가했습니다.
Supabase 이벤트 CRUD API
src/entities/calendar-event/api/create-calendar-event.ts, src/entities/calendar-event/api/update-calendar-event.ts, src/entities/calendar-event/api/delete-calendar-event.ts, src/entities/calendar-event/api/get-calendar-events-by-workspace-id.ts
워크스페이스별 이벤트 조회와 생성·수정·삭제를 Supabase calendar_events 테이블에 연결하고 오류 처리를 추가했습니다.
React Query 훅과 공개 API
src/entities/calendar-event/api/use-*.ts, src/entities/calendar-event/index.ts
워크스페이스별 query key, 조회 query, CRUD mutation 훅을 추가하고 실제 API와 포맷터를 공개 export했습니다.
CalendarView CRUD 화면 연동
src/features/manage-calendar/ui/CalendarView.tsx
mock·Zustand 흐름을 제거하고 비동기 CRUD, 편집 모달, 로딩·오류·재시도 UI, 시간 입력 및 제출 중 비활성화를 적용했습니다.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant CalendarView
  participant ReactQuery
  participant CalendarAPI
  participant Supabase
  User->>CalendarView: 이벤트 조회 또는 CRUD 동작
  CalendarView->>ReactQuery: query/mutation 실행
  ReactQuery->>CalendarAPI: workspaceId와 이벤트 데이터 전달
  CalendarAPI->>Supabase: calendar_events 조회/삽입/수정/삭제
  Supabase-->>CalendarAPI: 결과 반환
  CalendarAPI-->>ReactQuery: 데이터 또는 오류 반환
  ReactQuery-->>CalendarView: 상태 갱신 및 query 무효화
  CalendarView-->>User: 이벤트 목록과 상태 UI 표시
Loading

Possibly related PRs

  • TeampleRun/syncly#35: 초기 mock·Zustand 기반 캘린더 UI를 추가했으며, 본 변경은 해당 흐름을 Supabase CRUD와 React Query 기반으로 전환합니다.

Suggested reviewers: seongjinss555, wjswlgh96, kwon812

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning 일정 수정 서버액션과 time picker/표시 포맷 개선은 #55의 조회·추가·삭제 중심 범위를 넘는 추가 변경입니다. 수정 및 시간 포맷 개선은 별도 PR로 분리하거나, #55 범위에 포함된 근거를 이슈에 명확히 추가해 주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 캘린더 Supabase 연동과 일정 수정 기능 추가라는 핵심 변경을 간결하게 잘 요약합니다.
Description check ✅ Passed 작업 내용, 결과, 변경 사항, 테스트, 리뷰 체크리스트, 관련 이슈가 템플릿의 필수 섹션을 대부분 충족합니다.
Linked Issues check ✅ Passed workspace별 실데이터 조회, mock/store 제거, create/delete 연동, query invalidation, 빈/에러 상태 반영이 모두 구현되었습니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Feat/#55/calendar-supabase-integration

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/features/manage-calendar/ui/CalendarView.tsx`:
- Around line 326-335: Update the delete button handler in CalendarView to call
deleteCalendarEventMutation.mutate instead of mutateAsync, since the result is
not awaited and no rejection is caught; preserve the existing calendarEvent.id
argument and submission behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0f7e013b-2578-4d03-aff8-6f9b63e23b37

📥 Commits

Reviewing files that changed from the base of the PR and between 01d1666 and a50d38f.

📒 Files selected for processing (13)
  • src/entities/calendar-event/api/create-calendar-event.ts
  • src/entities/calendar-event/api/delete-calendar-event.ts
  • src/entities/calendar-event/api/get-calendar-events-by-workspace-id.ts
  • src/entities/calendar-event/api/update-calendar-event.ts
  • src/entities/calendar-event/api/use-calendar-events-by-workspace-id.ts
  • src/entities/calendar-event/api/use-create-calendar-event.ts
  • src/entities/calendar-event/api/use-delete-calendar-event.ts
  • src/entities/calendar-event/api/use-update-calendar-event.ts
  • src/entities/calendar-event/index.ts
  • src/entities/calendar-event/model/calendar-event.mapper.ts
  • src/entities/calendar-event/model/mock-calendar-events-by-workspace.ts
  • src/features/manage-calendar/model/use-calendar-events-store.ts
  • src/features/manage-calendar/ui/CalendarView.tsx
💤 Files with no reviewable changes (2)
  • src/entities/calendar-event/model/mock-calendar-events-by-workspace.ts
  • src/features/manage-calendar/model/use-calendar-events-store.ts

Comment thread src/features/manage-calendar/ui/CalendarView.tsx

@seongjinss555 seongjinss555 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

리뷰 남겨두었습니다. 고생하셨습니다~

createdBy: '',
});

const { error } = await supabase

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수정 대상이 0건인 경우에도 error가 null일 수 있어 성공으로 오인될 수 있습니다. update 결과를 반환받아 실제 수정 여부를 확인하고, 대상이 없으면 별도 에러를 반환하도록 보완하면 좋겠습니다.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

수정 후 select('id') 결과를 확인하도록 변경했습니다 !

@JiWoongE
JiWoongE merged commit 7e0a3b9 into develop Jul 15, 2026
1 check was pending
@JiWoongE
JiWoongE deleted the Feat/#55/calendar-supabase-integration branch July 15, 2026 03:31
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.

feat: 캘린더 Supabase 실데이터 연동

2 participants