Skip to content

[Fix] WTH-254 : clubId가 세팅되지 않는 문제 수정#46

Merged
nabbang6 merged 14 commits intodevelopfrom
WTH-254-clubId-세팅되지-않는-문제-수정
Apr 12, 2026

Hidden character warning

The head ref may contain hidden characters: "WTH-254-clubId-\uc138\ud305\ub418\uc9c0-\uc54a\ub294-\ubb38\uc81c-\uc218\uc815"
Merged

[Fix] WTH-254 : clubId가 세팅되지 않는 문제 수정#46
nabbang6 merged 14 commits intodevelopfrom
WTH-254-clubId-세팅되지-않는-문제-수정

Conversation

@nabbang6
Copy link
Copy Markdown
Collaborator

@nabbang6 nabbang6 commented Apr 12, 2026

✅ PR 유형

어떤 변경 사항이 있었나요?

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📌 관련 이슈번호

  • Closed #254

✅ Key Changes

ClubId 문제 수정

  • clubId/clubName 쿠키 및 store 세팅: useClubStore에 clubName 필드와 setClub 액션을 추가하고, lib/apis/cookies.ts에 CLUB_ID_KEY/CLUB_NAME_KEY 쿠키 상수 및 setClubCookie Server Action 추가

  • 동아리 생성/가입/이동 시 clubId 세팅: ClubCreatingPage, ClubJoiningPage, InviteCodeForm, HubActionCard에서 동아리 생성·가입·이동 시 쿠키와 store에 clubId/clubName을 세팅하도록 수정

  • ClubGuard 컴포넌트 추가: (main) 레이아웃에 ClubGuard를 감싸서, clubId가 store에 없을 경우 /clubs API를 호출해 자동 복구

  • 하드코딩된 clubId 제거: 게시판 상세([id]/page.tsx), 레이아웃(layout.tsx), 수정 페이지(edit/[id]/page.tsx)에서 하드코딩된 clubId를 쿠키 기반 clubId로 교체

기타 버그 수정

  • 프록시 API gzip 문제 수정: accept-encoding 헤더를 제거하고, response.body 스트림 대신 response.arrayBuffer()로 응답 본문을 읽어 gzip 바이너리가 그대로 전달되는 문제 해결

  • stripHtml 유틸 추출: 홈에서 마크다운 content가 그대로 보이는 문제가 있어서, NoticeBoardBox, UnreadNoticeBox에 HTML strip 로직을 추가

  • 프로필 미완성 모달 수정: "다음에 하기" 클릭 시 /board/write로 이동하는 동작이 있어 제거


📸 스크린샷 or 실행영상


🎸 기타 사항 or 추가 코멘트

  • ClubGuard는 store에 clubId가 없는 경우에만 API를 호출 (정상 상태에서는 추가 요청 X)
  • RSC(게시판)에서 clubId 쿠키가 없는 상태에서는 잠깐 null이 렌더링되고, ClubGuard가 복구 → router.refresh() → RSC가 쿠키를 읽어 정상 렌더링되는 흐름

ClubGuard의 경우 우선 /clubs에서 0번 항목 동아리를 불러오게 해뒀습니다!
mvp에서는 여러 동아리 가입이 안 되...는 걸로 알아서 이렇게 해둿는데... 아니라면 수정해보겟습니당...ㅎ_ㅎ

그리고 동아리 생성 이후 응답으로 clubId가 오고 있지 않아서... clubId 세팅이 어려운 문제가 잇엇는데,
요건 월요일 회의 때 배겐드 분들께 요청드리려고... 미리 반영만 해둿습니당

Summary by CodeRabbit

  • 새로운 기능

    • 선택한 동아리 정보(아이디·이름)를 자동 저장하고 클라이언트 상태에 반영(쿠키/스토어)
    • ClubGuard 도입으로 동아리 정보 자동 보완 및 초기화 경험 개선
  • 개선사항

    • 이동(Go) 버튼에서 동아리 정보 저장 후 네비게이션 수행
    • 공지·게시물의 HTML을 제거해 텍스트를 깔끔하게 표시
    • 게시판 조회·페이지네이션의 결손 처리 및 데이터 유효성 검증 강화

@nabbang6 nabbang6 requested review from JIN921, dalzzy and woneeeee April 12, 2026 09:59
@nabbang6 nabbang6 self-assigned this Apr 12, 2026
@nabbang6 nabbang6 added the 🐞 BugFix Something isn't working label Apr 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e15fe054-b05d-481c-ae0f-5a80990e5d9a

📥 Commits

Reviewing files that changed from the base of the PR and between 96564cc and 0f45892.

📒 Files selected for processing (2)
  • src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx
  • src/stores/useClubStore.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

📝 Walkthrough

Walkthrough

클럽 ID/이름을 쿠키와 클라이언트 스토어에 영속화하고, 허브·게시판 관련 컴포넌트들이 쿠키 기반 clubId/clubName을 사용하도록 변경했으며, ClubGuard를 추가해 자동 클럽 선택 및 동기화 흐름을 도입했습니다.

Changes

Cohort / File(s) Summary
클럽 쿠키·스토어 인프라
src/lib/apis/cookies.ts, src/lib/actions/club.ts, src/stores/useClubStore.ts, src/stores/index.ts
쿠키 키/옵션 및 setClubCookie 서버 액션 추가, 스토어에 clubName·setClub 추가 및 useClubName 재수출, createClubAction 반환에 clubId 포함
허브 페이지 및 액션 카드
src/app/(private)/(auth)/hub/page.tsx, src/components/auth/hub/HubActionCard.tsx, src/components/auth/hub/ClubCreatingPage.tsx, src/components/auth/hub/ClubJoiningPage.tsx, src/components/auth/hub/InviteCodeForm.tsx
MembershipStatus의 activeClubname 포함; HubActionCard에 clubId/clubName props 추가 및 go 동작에서 쿠키·스토어 설정 후 네비게이션; 생성/참여 흐름에서 쿠키·스토어 영속화 및 에러 처리 강화
클럽 가드 및 레이아웃 통합
src/components/layout/ClubGuard.tsx, src/components/layout/index.ts, src/app/(private)/(main)/layout.tsx
새로운 클라이언트 컴포넌트 ClubGuard 추가(쿠키/스토어 미존재 시 /clubs에서 첫 클럽 선택 후 쿠키·스토어 설정 및 router.refresh), MainLayout에 래핑
게시판 페이지 클럽 ID 마이그레이션
src/app/(private)/(main)/board/(with-nav)/layout.tsx, src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx, src/app/(private)/(main)/board/edit/[id]/page.tsx
레イ아웃·상세·편집 페이지가 하드코딩 대신 cookies().get(CLUB_ID_KEY)?.value로 clubId를 읽고, 부재 시 조기 종료/notFound 처리; API 호출을 안전하게 캐치
HTML 스트립 및 콘텐츠 정규화
src/lib/stripHtml.ts, src/components/board/PostCard/PostCardListContent.tsx, src/components/home/NoticeBoardBox.tsx, src/components/home/UnreadNoticeBox.tsx, src/components/board/CategorySelector.tsx
새 유틸 stripHtml() 추가 및 관련 컴포넌트에서 HTML 제거된 평문 표시로 변경, CategorySelector가 useClubName으로 동적 제목 사용
프록시와 기타 훅·동작 변경
src/app/api/proxy/[...path]/route.ts, src/hooks/board/useBoardQuery.ts, src/hooks/home/useWritePost.ts
프록시: accept-encoding 제거 및 응답 스트림→버퍼링 변경; 보드 쿼리의 optional chaining 안전화; write-post 훅에서 프로필 스킵 후 네비게이션 제거

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Page as Main Page
    participant ClubGuard
    participant API as /clubs API
    participant Cookies as Next Cookies
    participant Store as Client Store
    participant Router as Next Router

    User->>Page: 방문
    Page->>ClubGuard: 렌더
    ClubGuard->>Store: useClubId 조회
    alt clubId 없음
        ClubGuard->>API: GET /clubs
        API-->>ClubGuard: club 목록
        ClubGuard->>Cookies: setClubCookie(id,name)
        ClubGuard->>Store: setClub(id,name)
        ClubGuard->>Router: router.refresh()
        Router-->>Page: 새로고침 후 재렌더
    else clubId 있음
        ClubGuard-->>Page: children 렌더
    end
Loading
sequenceDiagram
    participant User
    participant HubActionCard
    participant Cookies as Next Cookies
    participant Store as Client Store
    participant Router as Next Router

    User->>HubActionCard: 'go' 버튼 클릭 (clubId, clubName)
    HubActionCard->>Cookies: setClubCookie(clubId, clubName)
    Cookies-->>HubActionCard: 쿠키 저장 완료
    HubActionCard->>Store: setClub(clubId, clubName)
    Store-->>HubActionCard: 상태 업데이트
    HubActionCard->>Router: router.push(href)
    Router-->>User: 네비게이션 완료
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

🔨 Refactor

Suggested reviewers

  • JIN921
  • woneeeee
  • dalzzy

Poem

🐰 쿠키 한 움큼 품에 담아,
가드가 살며시 첫 클럽 골라주네.
이름과 아이디 포근히 안고,
HTML 껍질은 벗겨 평문으로,
새로고침 한 번에 모두 제자리로 ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.52% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 fix 태그와 이슈 번호(WTH-254), 주요 변경 사항(clubId 세팅 문제 수정)을 명확하게 담고 있어 changeset의 주요 내용을 정확히 반영합니다.
Description check ✅ Passed PR 설명은 템플릿의 필수 섹션(PR 유형, 이슈번호, Key Changes)을 모두 포함하며, 변경사항에 대한 상세한 설명과 함께 기타 버그 수정 사항도 명시되어 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 WTH-254-clubId-세팅되지-않는-문제-수정

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.

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/(auth)/hub/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/edit/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/(auth)/hub/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/edit/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 실패
Build: 통과

⚠️ 일부 검증에 실패했습니다. 확인 후 수정해주세요.

1 similar comment
@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 실패
Build: 통과

⚠️ 일부 검증에 실패했습니다. 확인 후 수정해주세요.

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-1imxce94x-weethsite-4975s-projects.vercel.app

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-gxqf8u74n-weethsite-4975s-projects.vercel.app

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/(auth)/hub/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/edit/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Build: 통과

🎉 모든 검증을 통과했습니다!

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-9epl5dx3l-weethsite-4975s-projects.vercel.app

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/components/home/UnreadNoticeBox.tsx (1)

8-38: ⚠️ Potential issue | 🟡 Minor

Prettier 체크 실패를 먼저 정리해 주세요.

CI에서 이 파일의 Prettier --check 경고가 보고되었습니다. 머지 전 해당 파일 포맷 정리가 필요합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/home/UnreadNoticeBox.tsx` around lines 8 - 38, This file fails
Prettier --check; run Prettier to reformat the component file (e.g., run
prettier --write on the file or run your editor's format command) to fix
spacing, trailing commas, and JSX formatting in the UnreadNoticeBox component
(references: function UnreadNoticeBox, useUnreadNoticeQuery, stripHtml,
onTransitionEnd). After formatting, re-run Prettier --check/CI to ensure the
warning is resolved before merging.
src/stores/useClubStore.ts (1)

1-36: ⚠️ Potential issue | 🟡 Minor

이 파일은 Prettier 체크를 통과하지 못하고 있습니다.

CI 경고 기준으로, 병합 전 해당 파일에 formatter를 재적용해 스타일 불일치를 정리해 주세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/stores/useClubStore.ts` around lines 1 - 36, This file fails Prettier
formatting; run your formatter (e.g. prettier --write) on the file containing
useClubStore, useClubId, useClubName and useClubActions, fix any
spacing/commas/indentation differences and re-save so the exported
create/devtools/persist/combine block and the hook exports conform to the
project's Prettier rules, then re-commit the formatted file so CI passes.
🧹 Nitpick comments (2)
src/stores/useClubStore.ts (1)

16-18: setClubId 호출 시 clubName 잔존 가능성이 있습니다.

Line 16에서 clubId만 갱신하면 이후 UI가 이전 clubName을 계속 표시할 수 있습니다. 상태 일관성을 위해 setClubIdclubName을 함께 초기화하는 편이 안전합니다.

리팩터 제안
-        setClubId: (clubId: string) => set({ clubId }, false, 'setClubId'),
+        setClubId: (clubId: string) => set({ clubId, clubName: null }, false, 'setClubId'),
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/stores/useClubStore.ts` around lines 16 - 18, The setClubId updater
leaves clubName stale; update setClubId to reset clubName as well (e.g., set({
clubId, clubName: '' }, false, 'setClubId')) so state stays consistent—note
setClub already sets both clubId and clubName, so make setClubId mirror that
behavior by clearing clubName when only the id is provided.
src/components/layout/ClubGuard.tsx (1)

14-21: 로컬 Club 인터페이스 대신 기존 타입을 재사용하는 것을 고려해보세요.

src/types/mypage.tsClubDto 타입이 이미 정의되어 있습니다. 로컬 인터페이스를 정의하는 대신 기존 타입을 import하면 API 응답 구조 변경 시 타입 안전성이 향상됩니다.

♻️ 권장 수정안
+import type { ClubDto } from '@/types/mypage';
+import type { ApiResponse } from '@/types'; // 또는 적절한 경로

-interface Club {
-  id: string;
-  name: string;
-}
-
-interface MyClubsResponse {
-  data: Club[];
-}
+type MyClubsResponse = ApiResponse<ClubDto[]>;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/layout/ClubGuard.tsx` around lines 14 - 21, Replace the local
Club and MyClubsResponse interfaces in ClubGuard.tsx with the existing ClubDto
type from src/types/mypage.ts: import ClubDto and change MyClubsResponse to use
data: ClubDto[] (remove the local interface Club and any references to it) so
the component (e.g., ClubGuard) reuses the shared ClubDto type for type safety
when the API changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/`(private)/(main)/board/(with-nav)/[id]/page.tsx:
- Around line 12-17: 현재 페이지에서 params의 id를 바로 Number(id)로 변환하고
boardServerApi.getPostById를 호출해 예외 경로(잘못된 id, NaN, 404 등)를 처리하지 않아 런타임 500이 발생할
수 있습니다; 수정하려면 params에서 id를 받아 parseInt/Number 변환 후 isNaN 체크를 하고
clubId(cookies().get(CLUB_ID_KEY)) 존재도 확인한 뒤 boardServerApi.getPostById 호출을
try/catch로 감싸며, API가 404/NotFound을 반환하거나 id가 유효하지 않으면 Next.js의 notFound()를 호출하거나
적절한 에러경로로 분기하도록 변경하고, 성공 시에만 PostDetailContent에 response.data를 전달하도록 구현하세요.

In `@src/app/`(private)/(main)/board/(with-nav)/layout.tsx:
- Around line 15-18: The call to boardServerApi.getBoards in layout.tsx can
throw and crash the whole layout; wrap the getBoards call in a try/catch (or
handle the promise rejection) around the code that uses clubId and
boardServerApi.getBoards, and on error set a safe fallback (e.g., responseData =
[] or boards = []) so the rest of the layout can render; ensure you still return
null when clubId is missing, but prevent exceptions from propagating by
defaulting response.data to an empty array before sorting/using it.

In `@src/app/`(private)/(main)/board/edit/[id]/page.tsx:
- Around line 20-22: The handler returns null when clubId is missing which is
inconsistent with other missing-resource handling; change the early-return to
call notFound() instead. Locate the clubId retrieval
(cookies().get(CLUB_ID_KEY)?.value) and replace the "if (!clubId) return null"
with a call to notFound() so missing CLUB_ID_KEY is treated the same as an
absent post; ensure subsequent logic using postId and boardServerApi.getPostById
remains unchanged.

In `@src/components/auth/hub/ClubCreatingPage.tsx`:
- Around line 57-61: The current logic calls setApiDone(true) even when
result.clubId is missing, allowing progression without proper club setup; update
the flow so setApiDone(true) is only called when result.clubId exists (the same
branch that sets createdClubIdRef.current and calls setClub), and handle the
missing clubId case by setting an error state or keeping the API-unfinished
state and logging/throwing an error so the UI does not advance; modify the block
around createdClubIdRef.current, setClub, setApiDone and use result.clubId as
the gate.

In `@src/components/layout/ClubGuard.tsx`:
- Around line 35-41: The current check only verifies club exists but can pass
undefined id/name into setClubCookie and setClub; update the .then(async (res)
=> { ... }) block to validate that club.id and club.name are present and
non-empty before calling setClubCookie(club.id, club.name), setClub(club.id,
club.name), and router.refresh(); if either field is missing, bail out (or
handle gracefully—e.g., log an error/warning and avoid setting cookies/state) so
you never persist "undefined" into cookies or state.

In `@src/hooks/board/useBoardQuery.ts`:
- Around line 41-45: getNextPageParam already defensively handles missing
page.data.data but select still assumes every page has data.data.content; update
the select callback in useBoardQuery.ts to guard for missing data by using
optional chaining and a default empty array so it never tries to access .content
on undefined (e.g., treat page.data?.data?.content as possibly undefined and
replace with []), and also handle the case where the top-level data is undefined
(return an empty array instead of crashing).

---

Outside diff comments:
In `@src/components/home/UnreadNoticeBox.tsx`:
- Around line 8-38: This file fails Prettier --check; run Prettier to reformat
the component file (e.g., run prettier --write on the file or run your editor's
format command) to fix spacing, trailing commas, and JSX formatting in the
UnreadNoticeBox component (references: function UnreadNoticeBox,
useUnreadNoticeQuery, stripHtml, onTransitionEnd). After formatting, re-run
Prettier --check/CI to ensure the warning is resolved before merging.

In `@src/stores/useClubStore.ts`:
- Around line 1-36: This file fails Prettier formatting; run your formatter
(e.g. prettier --write) on the file containing useClubStore, useClubId,
useClubName and useClubActions, fix any spacing/commas/indentation differences
and re-save so the exported create/devtools/persist/combine block and the hook
exports conform to the project's Prettier rules, then re-commit the formatted
file so CI passes.

---

Nitpick comments:
In `@src/components/layout/ClubGuard.tsx`:
- Around line 14-21: Replace the local Club and MyClubsResponse interfaces in
ClubGuard.tsx with the existing ClubDto type from src/types/mypage.ts: import
ClubDto and change MyClubsResponse to use data: ClubDto[] (remove the local
interface Club and any references to it) so the component (e.g., ClubGuard)
reuses the shared ClubDto type for type safety when the API changes.

In `@src/stores/useClubStore.ts`:
- Around line 16-18: The setClubId updater leaves clubName stale; update
setClubId to reset clubName as well (e.g., set({ clubId, clubName: '' }, false,
'setClubId')) so state stays consistent—note setClub already sets both clubId
and clubName, so make setClubId mirror that behavior by clearing clubName when
only the id is provided.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e835822a-85f4-4766-bf1b-a140e3ec170c

📥 Commits

Reviewing files that changed from the base of the PR and between b5a0aa7 and d21dd56.

📒 Files selected for processing (23)
  • src/app/(private)/(auth)/hub/page.tsx
  • src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx
  • src/app/(private)/(main)/board/(with-nav)/layout.tsx
  • src/app/(private)/(main)/board/edit/[id]/page.tsx
  • src/app/(private)/(main)/layout.tsx
  • src/app/api/proxy/[...path]/route.ts
  • src/components/auth/hub/ClubCreatingPage.tsx
  • src/components/auth/hub/ClubJoiningPage.tsx
  • src/components/auth/hub/HubActionCard.tsx
  • src/components/auth/hub/InviteCodeForm.tsx
  • src/components/board/CategorySelector.tsx
  • src/components/board/PostCard/PostCardListContent.tsx
  • src/components/home/NoticeBoardBox.tsx
  • src/components/home/UnreadNoticeBox.tsx
  • src/components/layout/ClubGuard.tsx
  • src/components/layout/index.ts
  • src/hooks/board/useBoardQuery.ts
  • src/hooks/home/useWritePost.ts
  • src/lib/actions/club.ts
  • src/lib/apis/cookies.ts
  • src/lib/stripHtml.ts
  • src/stores/index.ts
  • src/stores/useClubStore.ts
💤 Files with no reviewable changes (1)
  • src/hooks/home/useWritePost.ts

Copy link
Copy Markdown
Member

@woneeeee woneeeee left a comment

Choose a reason for hiding this comment

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

저두 MVP에서는 하나의 동아리만 가입되는걸로 알고 있어요!! 일단 0번으로 세팅되도록 하고 MVP 이후에 다시 수정해보아요 🦦!! 동아리 생성 이후 응답으로 clubId가 오고 있지 않고 있군요.... ㅜㅜㅜㅜ 내일 회의때 말해봅시당..ㅜ.ㅜ 수고하셨어요 !!!

Copy link
Copy Markdown
Member

@dalzzy dalzzy left a comment

Choose a reason for hiding this comment

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

확인했습니다!!!! 코드래빗이 달아준 리뷰만 확인해주시면 될 것 같아용
동아리 생성 시 clubId 필요한거는,,,, 제가 동아리 생성 api 연결하면서 요청드렸어야 됐는데 생각을 못했네요 ,,, ㅠㅠ
감사합니다........ 최고 👍🏻

Copy link
Copy Markdown
Collaborator

@JIN921 JIN921 left a comment

Choose a reason for hiding this comment

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

이제 클럽 아이디 하드코딩 없이 쓸 수 잇다...!!~~!! 수고하셨습니다!! 지원님 말씀대로 동아리는 1개만 가능해서 현재 구현단에서는 문제될 부분 없을 거 같습니다!

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/(auth)/hub/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/edit/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Build: 통과

🎉 모든 검증을 통과했습니다!

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-3y2ulkyph-weethsite-4975s-projects.vercel.app

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/`(private)/(main)/board/(with-nav)/[id]/page.tsx:
- Around line 19-20: The current call to boardServerApi.getPostById uses
.catch(() => null) which swallows all errors and maps every failure to
notFound(); change this to only treat a 404 or missing response data as notFound
and rethrow or let other errors propagate to the error boundary. Replace the
.catch(() => null) pattern with a try/catch around boardServerApi.getPostById
(or inspect the caught error from getPostById), call notFound() only when
response?.data is falsy or when the caught error indicates HTTP 404 (e.g.,
error.response?.status === 404), and rethrow or throw the original error for
network/5xx/auth errors so they reach the error boundary.

In `@src/stores/useClubStore.ts`:
- Around line 16-18: setClubId currently only updates clubId and leaves clubName
stale, causing mismatched club state; update the setClubId updater to also clear
clubName (set clubName to null or the initialState value) so that calling
setClubId resets the name; locate the setter in useClubStore (setClubId) and
mirror the behavior of reset/initialState when clearing club identity to avoid
stale data (ensure types for clubName allow null if needed).
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39a2e20f-63fa-4d33-ab1d-bc74c9c38485

📥 Commits

Reviewing files that changed from the base of the PR and between d21dd56 and 96564cc.

📒 Files selected for processing (7)
  • src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx
  • src/app/(private)/(main)/board/(with-nav)/layout.tsx
  • src/components/auth/hub/ClubCreatingPage.tsx
  • src/components/home/UnreadNoticeBox.tsx
  • src/components/layout/ClubGuard.tsx
  • src/hooks/board/useBoardQuery.ts
  • src/stores/useClubStore.ts
🚧 Files skipped from review as they are similar to previous changes (5)
  • src/app/(private)/(main)/board/(with-nav)/layout.tsx
  • src/hooks/board/useBoardQuery.ts
  • src/components/home/UnreadNoticeBox.tsx
  • src/components/auth/hub/ClubCreatingPage.tsx
  • src/components/layout/ClubGuard.tsx

@github-actions
Copy link
Copy Markdown

🤖 Claude 테스트 제안

모델: claude-sonnet-4-6 | 토큰: 0 입력 / 0 출력

변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.

src/app/(private)/(auth)/hub/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/(with-nav)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/board/edit/[id]/page.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


src/app/(private)/(main)/layout.tsx

오류: Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.


이 코멘트는 Claude API를 통해 자동 생성되었습니다. 반드시 검토 후 사용하세요.

@github-actions
Copy link
Copy Markdown

PR 테스트 결과

Jest: 통과

🎉 모든 테스트를 통과했습니다!

@github-actions
Copy link
Copy Markdown

PR 검증 결과

TypeScript: 통과
ESLint: 통과
Prettier: 통과
Build: 통과

🎉 모든 검증을 통과했습니다!

@github-actions
Copy link
Copy Markdown

구현한 기능 Preview: https://weeth-qqgbwqegf-weethsite-4975s-projects.vercel.app

@nabbang6 nabbang6 merged commit 996bf1f into develop Apr 12, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants