Skip to content

feat(calendar): Google 캘린더 연동 BE - #592

Open
LeenaKim wants to merge 6 commits into
betafrom
feat/calendar-integration-be
Open

LeenaKim wants to merge 6 commits into
betafrom
feat/calendar-integration-be

Conversation

@LeenaKim

@LeenaKim LeenaKim commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • ./gradlew check (OAuth 실값 없이 mock·통합 테스트)
  • GOOGLE_CALENDAR_CLIENT_ID / CLIENT_SECRET 수신 후 로컬 콜백 http://localhost:4700/api/calendar/callback E2E

Follow-ups

  • Analytics Calendar Connected / Disconnected 서버 계측
  • 스펙 추가 통합 시나리오(경합·해제 503 등)
  • specs/calendar 문서 상태 정리

Made with Cursor

rowing0328 and others added 4 commits December 5, 2026 01:25
- core-front /my/joined 「구글 캘린더 연동」 팝업: 서버 status 로 화면, actions 로 버튼을 그리고
  PENDING · DISCONNECTING 동안 팝업이 열려 있을 때만 3초 폴링
- 전용 OAuth 콜백 /api/calendar/callback (자기 출처로만 postMessage), 수신 측은 origin 과 source 를 함께 확인
- 행사 상세 「구글 캘린더에 추가」(myRegistration.canAddToCalendar, 없으면 false)
- 스터디 일정표 다음 회차 저장 계측
- Calendar Connect Clicked · Calendar Connect Failed · Calendar Event Add Clicked 와 analytics 스펙 표
- @studyclub/mock 캘린더 핸들러(7개 상태 · 오류 프리셋)와 행사 참가 확정 프리셋
- prober 케이스, 두 PRD 개발 범위 FE 줄 갱신

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
spec #578 / FE #586 연동용 연결·콜백·해제 API, 토큰 암호화, 미팅·참여 변경 sync,
정기 reconcile, 계정 삭제 정리, 행사 canAddToCalendar. V75 migration 포함.

Co-authored-by: Cursor <cursoragent@cursor.com>
beta의 V75__complete_participants_of_ended_studies와 충돌해 캘린더 마이그레이션을 V76으로 변경.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown

DB 구조 · studyclub-engineering:backend

beta @ 70de8f9 대비 · 테이블 +2 −0 · 바뀐 테이블 0 (컬럼 0)

  • 추가 CALENDAR_CONNECTION 테이블
  • 추가 CALENDAR_EVENT_LINK 테이블

Prober 에서 전·후 보기

doxxx93 added a commit that referenced this pull request Dec 6, 2026
- V77__clear_paused_participants.sql 을 V76 으로 옮기고, 테스트 · 스펙 · ERD · 결정 기록 · prober 케이스의 V77 과 앵커를 고친다
- #592 도 V76 을 쓰고 있어 나중에 머지되는 쪽이 번호를 올린다
doxxx93 added a commit that referenced this pull request Dec 6, 2026
- V77__clear_paused_participants.sql 을 V76 으로 옮기고, 테스트 · 스펙 · ERD · 결정 기록 · prober 케이스의 V77 과 앵커를 고친다
- #592 도 V76 을 쓰고 있어 나중에 머지되는 쪽이 번호를 올린다
LeenaKim and others added 2 commits December 6, 2026 10:25
feat/calendar-integration-fe 를 BE 브랜치에 merge. MSW/프로토와 구분하는
.prober/tests/calendar-e2e-local.md 체크리스트를 추가한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
.setParameter("id", id)
.setParameter("calendarId", calendarId)
.setParameter("startedAt", connectStartedAt)
.setParameter("now", now)

@j00hyun j00hyun Dec 6, 2026 •

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.

이 쿼리에는 :now가 없는데 .setParameter("now", now)를 호출하고 있어, 캘린더 ID 저장 시 IllegalArgumentException이 발생합니다.

Google에서 캘린더 생성에 성공했더라도 ID를 저장하지 못하고, 호출부의 ensureCalendar()가 예외를 잡아 null을 반환하면서 일정 등록과 연동 완료 처리가 진행되지 않을 수 있습니다.

사용하지 않는 now 파라미터 설정을 제거하고, Google 생성 응답 이후 CALENDAR_ID가 실제로 저장되는지 확인하는 테스트를 추가 부탁드립니다. 일정 등록까지 성공하면 CONNECTED로 전환되는 흐름도 함께 확인해 주시면 좋겠습니다.

try {
restClient
.post()
.uri(uri -> uri.path(REVOKE_URL).queryParam("token", refreshToken).build())

@j00hyun j00hyun Dec 6, 2026 •

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.

path(REVOKE_URL)에 전체 URL을 넣고 있어, 실제로는 https:/oauth2.googleapis.com/revoke처럼 호스트가 없는 URI가 만들어집니다. 이 상태에서는 Google 권한 취소 요청이 정상적으로 실행되지 않습니다.

전체 URL을 .uri(REVOKE_URL) 등으로 지정하고, 토큰을 Google 요청 형식에 맞춰 전달하도록 수정 부탁드립니다. 실제로 조립되는 요청 주소가 올바른지도 테스트로 확인해 주세요.

"https://www.googleapis.com/auth/calendar.app.created";
private static final Duration REVOKE_TIMEOUT = Duration.ofSeconds(5);

private final RestClient restClient = RestClient.create();

@j00hyun j00hyun Dec 6, 2026 •

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.

REVOKE_TIMEOUT을 5초로 선언했지만, 실제 HTTP 요청에는 적용되지 않은 것으로 보입니다. Google 응답이 지연될 때 스펙의 5초 대기 제한이 동작하도록 설정 부탁드립니다.

지연 응답 테스트를 추가해서, 제한 시간을 넘기면 요청 처리가 종료되고 CALENDAR_DISCONNECT_UNCONFIRMED 응답으로 이어지는지도 확인해 주세요.

This branch has not been deployed

No deployments
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.

3 participants