Skip to content

feat: 홈 화면 진행중인 사건 섹션 구현 - #52

Merged
evenif99 merged 24 commits into
devfrom
feature/homepage-jm
Jun 18, 2026
Merged

feat: 홈 화면 진행중인 사건 섹션 구현#52
evenif99 merged 24 commits into
devfrom
feature/homepage-jm

Conversation

@wjdalss21

@wjdalss21 wjdalss21 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • 홈 화면 진행중인 사건 섹션 구현 (ActiveCasesSection)
  • disputes 테이블에서 waiting_opponent, opponent_joined, both_submitted 상태만 필터링
  • 공통 컴포넌트(CaseCard, Avatar, AvatarGroup) 구조 변경 없이 재사용
  • 카드 하단 Avatar(좌) + 날짜(우) 배치, 날짜 텍스트 text-label-s / black-400 적용
  • 카드 외곽선 black-700 / 2px / inset 적용
  • CaseCard preview 텍스트 컬러 black-700 수정
  • 카드 클릭 시 /disputes/[id] 네비게이션 연결

Test plan

  • 홈 화면(/home) 진입 시 진행중인 사건 목록 표시 확인
  • 사건 없을 때 빈 상태 메시지 표시 확인
  • 카드 클릭 시 /disputes/[id] 이동 확인
  • Avatar + 날짜 카드 내부 하단 배치 확인
  • 카드 외곽선 black-700 2px 확인

🤖 Generated with Claude Code

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 홈 화면에 진행중인 사건 섹션을 추가했습니다.
  • Improvements

    • 홈 화면 레이아웃을 개선하고 스타일을 조정했습니다.
    • 네비게이션 경로를 정리하여 사용자 경험을 향상시켰습니다.
    • 인증 처리 로직을 개선했습니다.

wjdalss21 and others added 18 commits June 17, 2026 17:52
- 헤더: 세션 유저명 + character-welcome.png 부엉이 이미지
- 일기 박스: 365x88, border black-700 2px, bg primary-100
- TODO: GangwonEduPower 폰트 추가 후 헤더 로고 텍스트 적용 필요

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Header.tsx에 variant prop 추가 (logo | title)
  - logo: 좌측 상단 말해부엉 로고 표시 (66x19, h:56, padding: 16px 20px)
  - title: 기존 뒤로가기 + 페이지 제목 형태 유지
- Header.module.scss에 __logo 스타일 추가
- home/page.tsx에 Header variant='logo' 적용
  - 헤더를 컨테이너 padding 밖으로 분리하여 상단 여백 제거
- home/page.module.scss diaryBox에 align-self: center 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- width: 365px → width: 100% + max-width: 365px
- 작은 화면에서 좌우 패딩과 결합 시 오버플로우 방지

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 일기 박스 전체를 Link로 변경 (텍스트 + 버튼 모두 클릭 가능)
- diaryBox에 text-decoration: none, cursor: pointer 추가
- /diary/new 경로는 임시 지정 (담당자 확인 후 수정 예정)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- character-welcome.png → character-home.png 교체 (169x138)
- 캐릭터 절대 위치 적용 (top: 41px, right: -20px)
- 캐릭터가 일기 박스 뒤에 위치하도록 z-index 조정 (character: 0, container: 1)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 캐릭터 이미지 가로 스크롤 방지: .page에 overflow-x: hidden 추가
- 비로그인 사용자 분기 처리: 말해부엉 알아보기 박스 추가 (/login 이동)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- greetingText, diaryTitle, diarySubtitle에 typography 믹신 사용
- 개별 font 속성 직접 선언 → @include m.text-* 토큰으로 교체

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 인사/일기 박스는 로그인 여부 무관하게 항상 표시
- 말해부엉 알아보기 박스를 진행중인 사건 위치(구분선 아래)로 이동
- 비로그인 인사: '안녕하세요' 표시

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- StatsCategorySection, useStatistics, QueryProvider 병합
- 고민 카테고리 TOP4 통계 섹션 추가
- 통계 섹션 하단 구분선 추가 (h:8px, black-100, gap:42px)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- isLoggedIn = true 하드코딩으로 로그인 상태 유지
- TODO 주석으로 배포 전 제거 안내 표시

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ActiveCasesSection 컴포넌트 추가
  - 진행중인 사건 목록 표시 (waiting_opponent / opponent_joined / both_submitted)
  - CaseCard 공통 컴포넌트 재사용
  - 좌측 카테고리 컬러 accent bar
  - 카드 간격 12px
- useActiveCases 훅 추가 (mock 데이터, TODO: 실 API 연동)
- CaseCard에 participants prop 추가 (AvatarGroup 렌더링)
- CategoryIcon의 CATEGORY_COLOR_MAP export 추가
- 홈 페이지에 로그인 시 ActiveCasesSection 표시
- 구분선 ↔ 섹션 간격 20px 적용

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CaseCard 원본 구조 완전 원복 (participants prop 제거, div 래퍼 제거)
- CategoryIcon CATEGORY_COLOR_MAP export 원복
- 불필요한 좌측 카테고리 accent bar 제거
- Avatar absolute 오버레이 우측→좌측 하단 변경

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
talky-owl Ready Ready Preview, Comment Jun 18, 2026 6:42am

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

/home 경로를 /로 리다이렉트하도록 변경하고, 루트 페이지를 서버 컴포넌트 기반 홈 화면으로 전환함. useActiveCases React Query 훅과 ActiveCasesSection 컴포넌트를 신규 추가하고, 미들웨어에 개발 환경 인증 우회 로직을 추가함.

Changes

홈 화면 통합 및 ActiveCasesSection 기능 추가

Layer / File(s) Summary
라우팅 경로 통합 및 인증 미들웨어 개선
src/app/(page)/home/page.tsx, src/app/(page)/login/page.tsx, src/components/layout/BottomNavigation.tsx, src/middleware.ts
/home 페이지를 /로 즉시 리다이렉트하도록 교체하고, 로그인 callbackUrl·BottomNavigation 홈 링크를 /로 통일함. BottomNavigation 활성 탭 판정을 정확 일치 기준으로 수정하고, 미들웨어에 개발 환경 인증 우회(DEV_BYPASS) 분기를 withAuth 래퍼로 추가함.
useActiveCases 훅 타입 및 데이터 계층
src/hooks/useActiveCases.ts
ActiveCase/RawCase/Participant 타입과 ACTIVE_DISPUTE_STATUSES를 정의하고, MOCK_RAW 모의 데이터에서 활성 상태만 필터링 후 status 필드를 제거한 ActiveCase[]를 React Query로 반환하는 useActiveCases 훅을 추가함.
ActiveCasesSection 컴포넌트 및 스타일
src/components/home/ActiveCasesSection.tsx, src/components/home/ActiveCasesSection.module.scss
useActiveCases 결과에 따라 로딩/에러/빈 목록/케이스 목록 상태를 조건부 렌더링하고, CaseCard 클릭 시 /disputes/{id}로 라우팅하며 AvatarGroupformatDate로 참여자·날짜를 표시함. 전용 SCSS 모듈로 섹션/카드 래퍼/푸터/빈 상태 스타일을 정의함.
루트 홈 페이지 전환 및 스타일 조정
src/app/page.tsx, src/app/page.module.scss, src/components/home/StatsCategorySection.module.scss, src/components/ui/CaseCard.module.scss
page.tsx를 서버 컴포넌트 홈 화면으로 전환해 Header/캐릭터 이미지/일기 진입 카드/StatsCategorySection을 배치하고, 로그인 여부에 따라 ActiveCasesSection 또는 로그인 안내 카드를 조건부 렌더링함. 여백·바 너비·미리보기 색상 토큰을 조정함.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • I5-Project/TALKY-OWL#47: src/app/(page)/home/page.tsx의 기본 내보내기를 함께 수정하며, 해당 PR은 홈 UI를 서버 렌더링으로 추가한 반면 이 PR은 동일 파일을 리다이렉트로 교체해 직접 충돌함.
  • I5-Project/TALKY-OWL#50: src/app/(page)/login/page.tsxcallbackUrlsrc/middleware.ts의 인증 미들웨어 동작을 함께 수정한 PR로, 코드 레벨에서 직접 맞닿아 있음.

Suggested reviewers

  • lyla-bae

Poem

🦉 부엉이가 집을 찾았네,
/home은 이제 /로 향하고,
사건 카드가 둥지에 쌓이며,
모의 데이터로 날개를 펴고,
진짜 API 올 날을 기다리네~ 🐾

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning PR 설명이 기본 내용은 포함하지만 필수 템플릿의 대부분 섹션(작업 내용, 담당 영역, 관련 이슈, 변경 사항, 테스트 결과, 작업 범위 확인, 보안 확인, DB/API/Storage 변경 여부 등)을 채우지 않았습니다. 저장소의 필수 템플릿을 따라 작업 영역 체크, 관련 이슈/요구사항, 테스트 결과 체크박스, 작업 범위 및 보안 확인 항목을 완성해주세요.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.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 제목이 홈 화면의 진행중인 사건 섹션 구현이라는 주요 변경점을 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 feature/homepage-jm

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 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/components/home/ActiveCasesSection.module.scss`:
- Around line 11-14: The stylelint `declaration-empty-line-before` rule is being
violated in the ActiveCasesSection.module.scss file. Add an empty line before
the `color: v.$color-black-700;` declaration within the `.title` selector to
comply with the rule, which requires empty lines before certain declarations.
Additionally, review and apply the same empty line pattern to any other
selectors or declaration blocks in the file that have similar issues,
particularly around the line ranges mentioned (lines 60-68) to ensure the entire
file passes linting validation.

In `@src/components/home/ActiveCasesSection.tsx`:
- Around line 15-23: The current implementation in the ActiveCasesSection
component treats loading and error states from useActiveCases() the same as an
empty data state, causing the message "아직 진행중인 사건이 없어요" to display during
loading or when an error occurs. Update the destructuring of useActiveCases() to
extract not just the data but also the loading and error states, then modify the
conditional logic from simply checking cases.length === 0 to properly handle
three distinct states: loading state (display a loading indicator), error state
(display an error message), and empty data state (display the current empty
message).
- Around line 25-49: The onClick handler in this code is attached only to the
CaseCard component, which means clicking the footer area (containing the
AvatarGroup and time elements) does not trigger navigation. Move the onClick
handler that calls router.push from the CaseCard component to the parent li
element with the cardWrapper class so that the entire card, including the footer
section with avatars and date, becomes clickable for navigation. Remove the
onClick prop from the CaseCard component after moving it to the li element.
🪄 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: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: cbbf9c1e-4b24-44bd-9103-11a46935ddc0

📥 Commits

Reviewing files that changed from the base of the PR and between 535b719 and 8561f05.

📒 Files selected for processing (6)
  • src/app/(page)/home/page.module.scss
  • src/app/(page)/home/page.tsx
  • src/components/home/ActiveCasesSection.module.scss
  • src/components/home/ActiveCasesSection.tsx
  • src/components/ui/CaseCard.module.scss
  • src/hooks/useActiveCases.ts

Comment thread src/components/home/ActiveCasesSection.module.scss
Comment thread src/components/home/ActiveCasesSection.tsx Outdated
Comment thread src/components/home/ActiveCasesSection.tsx
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
변경 이유:
- src/app/page.tsx: 홈 화면 콘텐츠를 루트 경로(/)에서 서빙하도록 이동
  → Next.js App Router에서 루트 경로는 src/app/page.tsx가 담당하므로
    기존 (page)/home/page.tsx 대신 루트로 이동하는 것이 구조적으로 올바름
- src/app/page.module.scss: (page)/home/page.module.scss를 루트로 이동
  → page.tsx와 동일 위치에서 관리하도록 이동 (git rename으로 추적됨)
- src/app/(page)/home/page.tsx: redirect('/')로 교체
  → 기존 /home URL 접근 시 /로 리다이렉트하여 북마크/공유 링크 호환성 유지
- src/app/(page)/login/page.tsx: callbackUrl '/home' → '/'
  → 로그인 성공 후 이동 경로를 변경된 홈 경로(/)에 맞게 수정
- src/components/layout/BottomNavigation.tsx: href '/home' → '/'
  → 하단 탭 홈 버튼이 올바른 경로를 가리키도록 수정
  → pathname.startsWith('/') 는 모든 경로에서 true이므로
    홈 탭 활성 조건을 pathname === '/' 로 변경하여 활성 상태 오류 수정
- src/components/home/StatsCategorySection.module.scss: width 100%로 변경
  → 고정 픽셀(346px) 대신 width: 100%로 반응형 처리
- src/middleware.ts: 개발 환경 인증 bypass 추가
  → PR #50 카카오 로그인 병합 후 next-auth/middleware가 모든 경로를 차단하게 됨
  → 개발 편의를 위해 NODE_ENV === development 일 때 인증 없이 접근 허용
  → 배포 전 반드시 제거 필요 (TODO 주석 명시)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 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/app/page.tsx`:
- Around line 12-14: Replace the hardcoded `const isLoggedIn = true` assignment
in the page.tsx file with the actual session-based logic `const isLoggedIn =
!!session` to properly reflect the user's authentication state. Remove the TODO
comments above this line that indicate this is temporary development code.
Additionally, search for similar development bypass logic such as DEV_BYPASS in
middleware files and ensure all temporary authentication shortcuts are tracked
together for removal before deployment.

In `@src/middleware.ts`:
- Around line 4-16: The development authentication bypass mechanism using
DEV_BYPASS in the middleware function poses a production deployment risk despite
the TODO comment. Remove the DEV_BYPASS constant definition and the conditional
check within the authorized callback that returns true when DEV_BYPASS is set.
Instead, implement a build-time or CI-time validation approach such as adding a
grep check in your CI pipeline to detect and reject any remaining DEV_BYPASS
references before deployment, or restructure the authentication logic to use a
proper environment-based configuration that cannot be accidentally left in
production builds.
🪄 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: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 37d8930c-0a79-475b-bc24-cb0d8cdc8bdc

📥 Commits

Reviewing files that changed from the base of the PR and between 2afe223 and 200262e.

⛔ Files ignored due to path filters (1)
  • public/images/characters/character-home.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • src/app/(page)/home/page.tsx
  • src/app/(page)/login/page.tsx
  • src/app/page.module.scss
  • src/app/page.tsx
  • src/components/home/StatsCategorySection.module.scss
  • src/components/layout/BottomNavigation.tsx
  • src/middleware.ts
💤 Files with no reviewable changes (1)
  • src/app/page.module.scss

Comment thread src/app/page.tsx
Comment on lines +12 to +14
// TODO: [개발 완료 후 반드시 제거] 개발 편의를 위해 로그인 상태 강제 설정
// 실제 배포 전 아래 줄을 삭제하고 const isLoggedIn = !!session 으로 교체할 것
const isLoggedIn = true

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

하드코딩된 isLoggedIn = true로 인해 비로그인 UI 경로가 테스트 불가

isLoggedIn이 항상 true로 고정되어 있어 Lines 56-64의 비로그인 상태 UI(말해부엉 알아보기 링크)가 절대 렌더링되지 않습니다. 미들웨어의 DEV_BYPASS와 함께 배포 전 반드시 제거해야 합니다.

두 파일의 개발용 우회 로직을 동시에 추적할 수 있도록 하나의 이슈나 체크리스트로 관리하는 것을 권장합니다.

✅ 배포 전 변경 사항
-  // TODO: [개발 완료 후 반드시 제거] 개발 편의를 위해 로그인 상태 강제 설정
-  // 실제 배포 전 아래 줄을 삭제하고 const isLoggedIn = !!session 으로 교체할 것
-  const isLoggedIn = true
+  const isLoggedIn = !!session
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// TODO: [개발 완료 후 반드시 제거] 개발 편의를 위해 로그인 상태 강제 설정
// 실제 배포 전 아래 줄을 삭제하고 const isLoggedIn = !!session 으로 교체할 것
const isLoggedIn = true
const isLoggedIn = !!session
🤖 Prompt for 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.

In `@src/app/page.tsx` around lines 12 - 14, Replace the hardcoded `const
isLoggedIn = true` assignment in the page.tsx file with the actual session-based
logic `const isLoggedIn = !!session` to properly reflect the user's
authentication state. Remove the TODO comments above this line that indicate
this is temporary development code. Additionally, search for similar development
bypass logic such as DEV_BYPASS in middleware files and ensure all temporary
authentication shortcuts are tracked together for removal before deployment.

Comment thread src/middleware.ts
Comment on lines +4 to +16
// TODO: [개발 완료 후 반드시 제거] 개발 편의를 위해 인증 bypass 설정
// 실제 배포 전 아래 DEV_BYPASS 조건 및 분기 로직을 제거하고 export { default } from 'next-auth/middleware' 로 교체할 것
const DEV_BYPASS = process.env.NODE_ENV === 'development'

export default withAuth(
function middleware() {
return NextResponse.next()
},
{
callbacks: {
authorized: ({ token }) => {
if (DEV_BYPASS) return true
return !!token

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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

배포 전 DEV_BYPASS 제거 필수 - CI 검증 추가 권장

TODO 주석이 있지만, 수동 프로세스에 의존하면 실수로 프로덕션에 배포될 위험이 있습니다. NODE_ENV가 올바르게 설정되면 문제없지만, 설정 오류 시 인증이 완전히 우회됩니다.

배포 파이프라인에 다음과 같은 검증을 추가하는 것을 권장합니다:

# CI에서 DEV_BYPASS 존재 여부 검사
grep -r "DEV_BYPASS" src/ && echo "ERROR: DEV_BYPASS found in code" && exit 1

또는 빌드 타임에 환경 변수로 제어하는 방식으로 변경:

🔒 환경 변수 기반 접근 방식 제안
-// TODO: [개발 완료 후 반드시 제거] 개발 편의를 위해 인증 bypass 설정
-// 실제 배포 전 아래 DEV_BYPASS 조건 및 분기 로직을 제거하고 export { default } from 'next-auth/middleware' 로 교체할 것
-const DEV_BYPASS = process.env.NODE_ENV === 'development'
+// 명시적 환경 변수로만 우회 가능 (CI에서 NEXT_PUBLIC_AUTH_BYPASS 설정 금지)
+const DEV_BYPASS = process.env.NEXT_PUBLIC_AUTH_BYPASS === 'true' && process.env.NODE_ENV === 'development'
🤖 Prompt for 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.

In `@src/middleware.ts` around lines 4 - 16, The development authentication bypass
mechanism using DEV_BYPASS in the middleware function poses a production
deployment risk despite the TODO comment. Remove the DEV_BYPASS constant
definition and the conditional check within the authorized callback that returns
true when DEV_BYPASS is set. Instead, implement a build-time or CI-time
validation approach such as adding a grep check in your CI pipeline to detect
and reject any remaining DEV_BYPASS references before deployment, or restructure
the authentication logic to use a proper environment-based configuration that
cannot be accidentally left in production builds.

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.

2 participants