[Refactor] WTH-357 : 출석 가능 시간 임시 제거#86
Conversation
📝 WalkthroughWalkthrough이 PR은 출석 관련 컴포넌트들에서 SSE 기반 상태 관리를 제거하고 QR 페이로드 기반 데이터로 전환합니다. 또한 위치 매개변수 처리, 관리자 버튼 조건부 렌더링, 그리고 관련 타입 서명을 업데이트합니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
🤖 Claude 테스트 제안
변경된 컴포넌트에 대해 Claude가 생성한 테스트 코드입니다. 검토 후 적합한 부분만 사용하세요.
|
PR 테스트 결과✅ Jest: 통과 🎉 모든 테스트를 통과했습니다! |
PR 검증 결과✅ TypeScript: 통과 🎉 모든 검증을 통과했습니다! |
JIN921
left a comment
There was a problem hiding this comment.
sse 진짜 쉽지 않은 녀석이네요.... 저도 공부해 오겟습니다...
|
구현한 기능 Preview: https://weeth-jojrht6uz-weethsite-4975s-projects.vercel.app |
woneeeee
left a comment
There was a problem hiding this comment.
아쉽네욤... ㅜ.ㅜ 저도 한 번 같이 찾아보게씀니당 !!!! ㅍㅏ이팅...
There was a problem hiding this comment.
🧹 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:isAdminprop은 사용되지 않으므로 제거를 고려하세요
isAdminprop이 인터페이스에 정의되어 있고 기본값도 설정되어 있지만, 컴포넌트 내부에서는 실제로 사용되지 않습니다. 대신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
📒 Files selected for processing (6)
src/components/attendance/AttendanceCodeModal.tsxsrc/components/attendance/AttendanceContent.tsxsrc/components/attendance/AttendanceQRContent.tsxsrc/components/attendance/AttendanceTodayCard.tsxsrc/hooks/attendance/useCheckIn.tssrc/lib/formatTime.ts
✅ PR 유형
어떤 변경 사항이 있었나요?
📌 관련 이슈번호
✅ Key Changes
-> 출석 가능 시간은 출석 코드 입력 모달에서는 임시 제거, QR 생성 페이지에서만 표시되게 수정
📸 스크린샷 or 실행영상
2026-04-29.211145.mp4
🎸 기타 사항 or 추가 코멘트
amplify, vercel 둘 다 10초 이상 SSE 연결이 불가능해서 502 에러가 발생하는 문제가 잇엇습니다,,
금일까지 수정이 어려울 것 같아서 우선 주석 처리해두엇습니다 ㅜ_ㅜ
Summary by CodeRabbit
릴리스 노트
Bug Fixes
New Features
Refactor