Skip to content

[Refactor] WTH-357 : 출석 가능 시간 임시 제거#86

Merged
nabbang6 merged 3 commits intodevelopfrom
WTH-357/출석-가능-시간-임시-제거
Apr 29, 2026

Hidden character warning

The head ref may contain hidden characters: "WTH-357/\ucd9c\uc11d-\uac00\ub2a5-\uc2dc\uac04-\uc784\uc2dc-\uc81c\uac70"
Merged

[Refactor] WTH-357 : 출석 가능 시간 임시 제거#86
nabbang6 merged 3 commits intodevelopfrom
WTH-357/출석-가능-시간-임시-제거

Conversation

@nabbang6
Copy link
Copy Markdown
Collaborator

@nabbang6 nabbang6 commented Apr 29, 2026

✅ PR 유형

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

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

📌 관련 이슈번호

  • Closed #357

✅ Key Changes

  • 출석코드 확인 버튼이 운영진에게만 확인되도록 수정
  • 출석 가능 시간 SSE 관련 로직 주석 처리
    -> 출석 가능 시간은 출석 코드 입력 모달에서는 임시 제거, QR 생성 페이지에서만 표시되게 수정
  • 출석 요약 조회 시 장소가 null인 경우 장소 설명이 생략되도록 수정

📸 스크린샷 or 실행영상

2026-04-29.211145.mp4

🎸 기타 사항 or 추가 코멘트

amplify, vercel 둘 다 10초 이상 SSE 연결이 불가능해서 502 에러가 발생하는 문제가 잇엇습니다,,
금일까지 수정이 어려울 것 같아서 우선 주석 처리해두엇습니다 ㅜ_ㅜ

Summary by CodeRabbit

릴리스 노트

  • Bug Fixes

    • 출석 확인 모달의 로딩 상태 표시 제거 및 코드 완성도에만 의존하도록 개선
    • QR 만료 시간을 QR 페이로드 기반으로 변경
  • New Features

    • 관리자 기능을 관리자 사용자에게만 조건부로 표시
  • Refactor

    • 출석 정보에서 선택적 위치 정보 지원 추가

@nabbang6 nabbang6 requested review from JIN921, dalzzy and woneeeee April 29, 2026 12:19
@nabbang6 nabbang6 self-assigned this Apr 29, 2026
@nabbang6 nabbang6 added the 🔨 Refactor 코드 리팩토링 label Apr 29, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

이 PR은 출석 관련 컴포넌트들에서 SSE 기반 상태 관리를 제거하고 QR 페이로드 기반 데이터로 전환합니다. 또한 위치 매개변수 처리, 관리자 버튼 조건부 렌더링, 그리고 관련 타입 서명을 업데이트합니다.

Changes

Cohort / File(s) Summary
SSE 상태 제거 및 QR 페이로드 전환
src/components/attendance/AttendanceCodeModal.tsx, src/components/attendance/AttendanceQRContent.tsx, src/hooks/attendance/useCheckIn.ts
SSE 훅 및 상태 파생 로직을 제거하고 QR 페이로드에서 만료 시간을 직접 사용하도록 변경. 모달/내용의 로딩 및 만료 상태 UI는 주석 처리되었고, 코드 모달 열기 조건이 단순화됨.
관리자 접근 제어 개선
src/components/attendance/AttendanceTodayCard.tsx
useIsAdmin 훅을 사용하여 관리자 사용자에게만 보조 버튼을 조건부로 렌더링. 기존의 토스트 에러 기반 차단 방식에서 명시적 접근 제어로 변경.
타입 시그니처 및 포매팅 로직 업데이트
src/lib/formatTime.ts, src/components/attendance/AttendanceContent.tsx
formatAttendanceDescription의 위치 매개변수를 nullable로 변경(string | null). 위치가 없을 때는 날짜/시간 정보만 반환하도록 조건부 처리. AttendanceContent에서 위치를 직접 전달하도록 변경.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • JIN921
  • dalzzy
  • woneeeee

Poem

🐰 SSE의 실마리 풀고, QR의 빛을 따라
상태를 간결히, 흐름을 맑게 정리하니
관리자의 손길만 닿을 수 있는 문을 열고
장소의 이름도 부드럽게 담아내는 변화
더 깔끔한 출석의 세상이 피어난다! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경 사항인 '출석 가능 시간 임시 제거'를 명확하게 반영하고 있으며, 이는 원본 변경 내용과 일치합니다.
Description check ✅ Passed PR 설명에서 PR 유형, 관련 이슈번호, Key Changes를 포함하고 있으나, 스크린샷 섹션이 미작성 상태이고 'Key Changes' 섹션에 일부 한국어 설명이 제대로 구조화되지 않았습니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 WTH-357/출석-가능-시간-임시-제거

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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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/layout.tsx

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


src/components/admin/attendance/AttendanceCard.tsx

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


src/components/admin/attendance/AttendancePageContent.tsx

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


src/components/admin/attendance/AttendanceSessionCard.tsx

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


src/components/admin/attendance/useAttendanceCard.ts

오류: 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: 통과

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

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.

sse 진짜 쉽지 않은 녀석이네요.... 저도 공부해 오겟습니다...

@github-actions
Copy link
Copy Markdown

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

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.

아쉽네욤... ㅜ.ㅜ 저도 한 번 같이 찾아보게씀니당 !!!! ㅍㅏ이팅...

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.

🧹 Nitpick comments (2)
src/components/attendance/AttendanceCodeModal.tsx (1)

104-121: 주석 처리된 코드 블록이 상당함

SSE 복원 전까지 임시 조치로 이해되지만, 주석 처리된 코드가 많아 가독성이 저하됩니다. 장기간 유지될 경우 git history나 별도 브랜치에서 코드를 관리하고, 여기서는 TODO 주석만 남기는 것도 고려해 볼 수 있습니다.

현재 상태로도 복원에 문제가 없다면 괜찮습니다.

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

In `@src/components/attendance/AttendanceCodeModal.tsx` around lines 104 - 121,
The large commented JSX block inside AttendanceCodeModal (the conditional that
uses isLoading, isExpired, minutes, seconds) should be removed to improve
readability: keep a single concise TODO comment indicating SSE/time-display will
be restored, or move the commented logic to a dedicated branch/issue or add it
to git history (e.g., create a patch/PR or note an issue id), and ensure the
original conditional logic using isLoading/isExpired/minutes/seconds is
preserved in that branch or issue so it can be restored later; simply delete the
multi-line commented JSX and leave one TODO comment in AttendanceCodeModal
noting why it was removed and where the original code is stored.
src/components/attendance/AttendanceTodayCard.tsx (1)

19-19: isAdmin prop은 사용되지 않으므로 제거를 고려하세요

isAdmin prop이 인터페이스에 정의되어 있고 기본값도 설정되어 있지만, 컴포넌트 내부에서는 실제로 사용되지 않습니다. 대신 useIsAdmin() 훅의 isAdminUser만 사용되고 있습니다 (line 58, 77). 호출자들이 이 prop을 전달하고 있다면 제거 시 breaking change가 되므로, API 변경이 가능하다면 prop을 제거하고 호출 시 함께 정리하세요.

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

In `@src/components/attendance/AttendanceTodayCard.tsx` at line 19, The props
interface and default prop isAdmin on AttendanceTodayCard are unused and should
be removed: delete the isAdmin field from the component Props/interface and any
default value handling for isAdmin in AttendanceTodayCard, keep using the hook
useIsAdmin() and the isAdminUser value inside the component (references:
AttendanceTodayCard, Props, isAdmin, useIsAdmin, isAdminUser), and update all
callers to stop passing the isAdmin prop (or migrate them) to avoid a runtime
warning—note this is a breaking API change so remove usages across the codebase
or keep a temporary shim in callers if you cannot change them all at once.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/components/attendance/AttendanceCodeModal.tsx`:
- Around line 104-121: The large commented JSX block inside AttendanceCodeModal
(the conditional that uses isLoading, isExpired, minutes, seconds) should be
removed to improve readability: keep a single concise TODO comment indicating
SSE/time-display will be restored, or move the commented logic to a dedicated
branch/issue or add it to git history (e.g., create a patch/PR or note an issue
id), and ensure the original conditional logic using
isLoading/isExpired/minutes/seconds is preserved in that branch or issue so it
can be restored later; simply delete the multi-line commented JSX and leave one
TODO comment in AttendanceCodeModal noting why it was removed and where the
original code is stored.

In `@src/components/attendance/AttendanceTodayCard.tsx`:
- Line 19: The props interface and default prop isAdmin on AttendanceTodayCard
are unused and should be removed: delete the isAdmin field from the component
Props/interface and any default value handling for isAdmin in
AttendanceTodayCard, keep using the hook useIsAdmin() and the isAdminUser value
inside the component (references: AttendanceTodayCard, Props, isAdmin,
useIsAdmin, isAdminUser), and update all callers to stop passing the isAdmin
prop (or migrate them) to avoid a runtime warning—note this is a breaking API
change so remove usages across the codebase or keep a temporary shim in callers
if you cannot change them all at once.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39a5df87-cdee-490f-969d-019e50e2c678

📥 Commits

Reviewing files that changed from the base of the PR and between ada47af and 03e21b0.

📒 Files selected for processing (6)
  • src/components/attendance/AttendanceCodeModal.tsx
  • src/components/attendance/AttendanceContent.tsx
  • src/components/attendance/AttendanceQRContent.tsx
  • src/components/attendance/AttendanceTodayCard.tsx
  • src/hooks/attendance/useCheckIn.ts
  • src/lib/formatTime.ts

@nabbang6 nabbang6 merged commit 7846283 into develop Apr 29, 2026
5 checks passed
@nabbang6 nabbang6 deleted the WTH-357/출석-가능-시간-임시-제거 branch May 3, 2026 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants