Skip to content

개설한 스터디가 마이 스터디 탭에서 보이지 않는 문제 수정#537

Merged
HA-SEUNG-JEONG merged 2 commits into
developfrom
fix/my-study
Apr 7, 2026
Merged

개설한 스터디가 마이 스터디 탭에서 보이지 않는 문제 수정#537
HA-SEUNG-JEONG merged 2 commits into
developfrom
fix/my-study

Conversation

@HA-SEUNG-JEONG

@HA-SEUNG-JEONG HA-SEUNG-JEONG commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

🌱 연관된 이슈

  • 그룹스터디의 경우, 개설한 스터디가 마이스터디 탭에서 보였지만 멘토스터디의 경우 보이지 않던 문제

☘️ 작업 내용

  • 코드 상으로 확인해봤을 때 그룹스터디 한정으로 작업되어있었고, MENTOR_STUDY 타입 추가하여 확장 수정

🍀 참고사항

스크린샷 (선택)

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 내 스터디 페이지에서 멘토 스터디 유형 지원 추가
    • 멘토 스터디 항목에 대한 올바른 라우팅 구현
  • 문서

    • 프로젝트 인덱스 문서 업데이트
    • 프론트엔드-백엔드 정렬 검증 규칙 추가
  • 리팩토

    • 내 스터디 목록 필터링 로직 개선
    • 데이터 조회 범위 확대

@HA-SEUNG-JEONG HA-SEUNG-JEONG self-assigned this Apr 7, 2026
@vercel

vercel Bot commented Apr 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
study-platform-client-dev Building Building Preview, Comment Apr 7, 2026 3:20am

@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

여러 마이스터디 페이지와 컴포넌트에서 GROUP_STUDY 타입만 지원하던 것에서 MENTOR_STUDY 타입도 함께 지원하도록 확장했습니다. 쿼리 파라미터를 'BOTH'로 변경하고, 필터링 로직을 업데이트하여 두 가지 연구 유형 모두 포함하도록 수정했습니다.

Changes

Cohort / File(s) Summary
Documentation
CLAUDE.md, PROJECT_INDEX.md
규칙 추가 및 프로젝트 인덱스 갱신 — 프론트엔드와 백엔드 정렬 검증 규칙 추가 및 의존성 버전/구조 문서 업데이트
마이스터디 페이지
src/app/(service)/(my)/my-study/page.tsx, src/app/(service)/(my)/my-study/completed/page.tsx, src/app/(service)/(my)/my-study/not-completed/page.tsx
MemberGroupStudyList 타입을 'GROUP_STUDY' | 'MENTOR_STUDY'로 확장하고, 쿼리의 studyType'BOTH'로 변경한 후 필터링 로직을 업데이트하여 두 가지 연구 유형 모두 포함하도록 수정
리스트 컴포넌트
src/components/lists/completed-group-study-list.tsx, src/components/lists/not-completed-group-study-list.tsx
MemberStudyItem 임포트를 타입 전용 임포트로 변경하고, MemberGroupStudyList 인터페이스에서 type 필드를 'GROUP_STUDY' | 'MENTOR_STUDY'로 확장
마이스터디 정보 카드
src/components/my-page/my-study-info-card.tsx
type 프로퍼티를 확장하여 'MENTOR_STUDY'를 지원하고, 라우팅 로직을 추가하여 'MENTOR_STUDY'/premium-study/${studyId}로, 그 외는 /group-study/${studyId}로 이동하도록 수정

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 깡충깡충 연구 유형이 늘어났네,
멘토 스터디도 이제 친구야,
타입이 펼쳐지고 경로도 갈라지니,
모든 학습이 한곳에 모여라! 🌟

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 마이 스터디 탭에서 스터디가 보이지 않는 문제 수정에 대해 명확하게 설명하고 있으며, 실제 변경 사항(MENTOR_STUDY 타입 추가로 멘토 스터디 표시)과 일치합니다.

✏️ 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 fix/my-study

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.

@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

🧹 Nitpick comments (3)
PROJECT_INDEX.md (1)

161-166: 관리자 페이지 스타일링 예외 정책을 문서에 명시해 주세요.

현재 문구는 p-4, rounded-lg 같은 base Tailwind 클래스를 전면 금지하는 것으로 읽히는데, 관리자 영역은 예외 허용 정책이 이미 있습니다. 전역 규칙로만 적지 말고 admin 경로 예외를 함께 명시해 주세요.

Based on learnings, in code-zero-to-one/study-platform-client, admin pages under src/app/(admin)/** are intentionally exempt from custom design token guidelines and raw Tailwind utility classes are acceptable.

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

In `@PROJECT_INDEX.md` around lines 161 - 166, The Styling Conventions section
currently forbids base Tailwind utilities globally; update the document to state
an explicit exception for admin pages by adding a sentence clarifying that pages
under the admin route (src/app/(admin)/**) may use raw Tailwind utility classes
and base scale tokens (e.g., p-4, rounded-lg) instead of project tokens, while
the global rule (no arbitrary values, use cn() from
src/components/common/ui/(shadcn)/lib/utils.ts) remains enforced for all
non-admin code; ensure the added text appears in the "Styling Conventions" block
so readers see the admin exemption alongside the existing rules.
src/app/(service)/(my)/my-study/completed/page.tsx (1)

34-36: Line [36]의 배열 단언(as)은 타입 가드로 대체하는 편이 안전합니다.

현재는 필터 조건과 타입 계약이 어긋나도 컴파일에서 놓칠 수 있습니다. filter 자체를 타입 가드로 만들면 단언 없이 안전하게 좁힐 수 있습니다.

제안 코드
-  const completedStudyList = (data?.content || []).filter(
-    (list) => list.type === 'GROUP_STUDY' || list.type === 'MENTOR_STUDY',
-  ) as MemberGroupStudyList[];
+  const isCompletedGroupOrMentorStudy = (
+    list: MemberStudyItem,
+  ): list is MemberGroupStudyList =>
+    (list.type === 'GROUP_STUDY' || list.type === 'MENTOR_STUDY') &&
+    list.status === 'COMPLETED';
+
+  const completedStudyList = (data?.content ?? []).filter(
+    isCompletedGroupOrMentorStudy,
+  );

As per coding guidelines, **/*.{ts,tsx}: Use in guard with fallback instead of TypeScript as assertion for enum-like string type assertions.

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

In `@src/app/`(service)/(my)/my-study/completed/page.tsx around lines 34 - 36,
Replace the unsafe TypeScript assertion on completedStudyList with a proper type
guard: change the filter callback used to derive completedStudyList so it
narrows items by checking the discriminant (e.g., verify 'type' exists and
equals 'GROUP_STUDY' or 'MENTOR_STUDY' using an "in" guard or property check)
and return a boolean typed as a user-defined type predicate (e.g., function
isMemberGroupStudy(item): item is MemberGroupStudyList). Update the call that
builds completedStudyList to use that predicate instead of "as" so the array is
safely narrowed without assertions.
src/app/(service)/(my)/my-study/not-completed/page.tsx (1)

34-36: Line [36]의 타입 단언은 제거하고 타입 가드로 고정해 주세요.

현재 필터는 type만 검사한 뒤 배열 전체를 단언하고 있어, 실제 응답 형태 변화 시 타입 안정성이 약해집니다.

제안 코드
-  const notCompletedStudyList = (data?.content || []).filter(
-    (s) => s.type === 'GROUP_STUDY' || s.type === 'MENTOR_STUDY',
-  ) as MemberGroupStudyList[];
+  const isGroupOrMentorStudy = (
+    s: MemberStudyItem,
+  ): s is MemberGroupStudyList =>
+    s.type === 'GROUP_STUDY' || s.type === 'MENTOR_STUDY';
+
+  const notCompletedStudyList = (data?.content ?? []).filter(
+    isGroupOrMentorStudy,
+  );

As per coding guidelines, **/*.{ts,tsx}: Use in guard with fallback instead of TypeScript as assertion for enum-like string type assertions.

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

In `@src/app/`(service)/(my)/my-study/not-completed/page.tsx around lines 34 - 36,
Remove the use of the type assertion on notCompletedStudyList and replace it
with a proper type guard function (e.g., isMemberGroupStudy) that narrows to
MemberGroupStudyList by checking both s.type === 'GROUP_STUDY' || s.type ===
'MENTOR_STUDY' and the presence of required properties using the `in` operator
(or other property checks) to ensure runtime shape safety; then use that guard
in the filter call that constructs notCompletedStudyList and, if necessary,
provide a fallback path for items that fail the guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@PROJECT_INDEX.md`:
- Line 244: The hardcoded branch line "Current branch: `feat/delete-inquiry` |
Main branch: `develop`" is inconsistent with this PR's source branch
(`fix/my-study`) and will become stale; update PROJECT_INDEX.md by either
removing that hardcoded branch info or replacing it with a generic example
placeholder (e.g., "Current branch: `<your-branch>` | Main branch:
`<main-branch>`") so it no longer ties the document to a specific branch.

---

Nitpick comments:
In `@PROJECT_INDEX.md`:
- Around line 161-166: The Styling Conventions section currently forbids base
Tailwind utilities globally; update the document to state an explicit exception
for admin pages by adding a sentence clarifying that pages under the admin route
(src/app/(admin)/**) may use raw Tailwind utility classes and base scale tokens
(e.g., p-4, rounded-lg) instead of project tokens, while the global rule (no
arbitrary values, use cn() from src/components/common/ui/(shadcn)/lib/utils.ts)
remains enforced for all non-admin code; ensure the added text appears in the
"Styling Conventions" block so readers see the admin exemption alongside the
existing rules.

In `@src/app/`(service)/(my)/my-study/completed/page.tsx:
- Around line 34-36: Replace the unsafe TypeScript assertion on
completedStudyList with a proper type guard: change the filter callback used to
derive completedStudyList so it narrows items by checking the discriminant
(e.g., verify 'type' exists and equals 'GROUP_STUDY' or 'MENTOR_STUDY' using an
"in" guard or property check) and return a boolean typed as a user-defined type
predicate (e.g., function isMemberGroupStudy(item): item is
MemberGroupStudyList). Update the call that builds completedStudyList to use
that predicate instead of "as" so the array is safely narrowed without
assertions.

In `@src/app/`(service)/(my)/my-study/not-completed/page.tsx:
- Around line 34-36: Remove the use of the type assertion on
notCompletedStudyList and replace it with a proper type guard function (e.g.,
isMemberGroupStudy) that narrows to MemberGroupStudyList by checking both s.type
=== 'GROUP_STUDY' || s.type === 'MENTOR_STUDY' and the presence of required
properties using the `in` operator (or other property checks) to ensure runtime
shape safety; then use that guard in the filter call that constructs
notCompletedStudyList and, if necessary, provide a fallback path for items that
fail the guard.
🪄 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: CHILL

Plan: Pro

Run ID: c0f75354-8fb1-41dd-87a8-6e9077cdb7fe

📥 Commits

Reviewing files that changed from the base of the PR and between 9bfd498 and 90f5408.

📒 Files selected for processing (8)
  • CLAUDE.md
  • PROJECT_INDEX.md
  • src/app/(service)/(my)/my-study/completed/page.tsx
  • src/app/(service)/(my)/my-study/not-completed/page.tsx
  • src/app/(service)/(my)/my-study/page.tsx
  • src/components/lists/completed-group-study-list.tsx
  • src/components/lists/not-completed-group-study-list.tsx
  • src/components/my-page/my-study-info-card.tsx

Comment thread PROJECT_INDEX.md
@HA-SEUNG-JEONG HA-SEUNG-JEONG merged commit 69d7efa into develop Apr 7, 2026
10 of 11 checks passed
@HA-SEUNG-JEONG HA-SEUNG-JEONG deleted the fix/my-study branch April 7, 2026 05:40
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