Skip to content

[chore] PR #14 Revert#16

Merged
cl-o-lc merged 1 commit intomainfrom
fix/revert-reapplied
Oct 9, 2025
Merged

[chore] PR #14 Revert#16
cl-o-lc merged 1 commit intomainfrom
fix/revert-reapplied

Conversation

@cl-o-lc
Copy link
Collaborator

@cl-o-lc cl-o-lc commented Oct 9, 2025

📌 작업 내용

📝 기타

Summary by CodeRabbit

  • New Features
    • 반응 속도 테스트에서 기기 로컬 최고 기록을 저장·표시합니다(오프라인 포함). 기록이 없을 때 안내 문구를 제공합니다.
  • Refactor
    • 랭킹 보드 및 내 순위 표시를 제거하고, 로컬 최고 기록 중심으로 화면을 단순화했습니다.
    • 로그인/로그아웃 상태가 여러 탭 간 실시간으로 동기화되며, 로그아웃 시 즉시 반영됩니다.
    • API 기본 경로 구성을 업데이트했습니다.
  • Documentation
    • FAQ 내용을 최신 로직에 맞게 수정했습니다(최적 타이밍 산정 방식).
  • Chores
    • 개발 의존성(@types/react, @types/react-dom) 업데이트.

@vercel
Copy link

vercel bot commented Oct 9, 2025

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

Project Deployment Preview Comments Updated (UTC)
checktime Ready Ready Preview Comment Oct 9, 2025 7:01pm

@coderabbitai
Copy link

coderabbitai bot commented Oct 9, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

패키지 devDependencies를 다운그레이드했고, 반응속도 페이지는 서버 순위 연동을 제거하여 로컬 최고 기록만 저장·표시하도록 변경했습니다. ClientHeader는 토큰/유저명 관리를 AuthUtils에서 localStorage 기반으로 전환하고 API 베이스 URL을 변경했습니다. FAQ 문구를 조정하고 랭킹 API 파일을 삭제했습니다.

Changes

Cohort / File(s) Summary of changes
DevDeps updates
package.json
@types/react, @types/react-dom 버전 변경. 기능/로직 변경 없음.
Reaction Test: 로컬 기록화
src/app/reaction-test/page.tsx
서버 랭킹 조회/저장 제거. 로컬스토리지(reaction-best-ms) 기반 최고 기록 관리 추가. 랭킹 UI 제거 후 “최고 기록” 표시로 교체. 타이머 초기화 로직 단순화. 클릭 핸들러 비동기→동기화.
Auth 헤더/토큰 관리 전환
src/components/ClientHeader.tsx
AuthUtils 의존 제거. 로그인/회원가입/로그아웃을 localStorage 토큰(accessToken, refreshToken)과 userName으로 관리. NEXT_PUBLIC_API_URLNEXT_PUBLIC_API_BASE 엔드포인트로 변경. storage 이벤트로 탭 간 동기화.
FAQ 문구 수정
src/components/FaqSection.tsx
알림 타이밍 설명을 RTT/사용자 반응속도 반영으로 수정. 로직 변경 없음.
Ranking API 제거
src/libs/api/reactionRanking.ts
파일 전체 삭제. 공개 함수 saveReactionTimeRecord, getNearbyRankings, getTop10Rankings 제거. 관련 공용 fetch 헬퍼 제거.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor U as User
  participant P as ReactionTest Page
  participant LS as localStorage

  U->>P: 페이지 로드
  P->>LS: 최고 기록(best) 조회
  LS-->>P: best(ms) 또는 null
  Note over P: UI에 현재 best 표시

  U->>P: 반응 원 클릭
  activate P
  P->>P: 경과시간 계산
  P->>P: current, records 업데이트
  alt 기존 best 없음 또는 더 빠름
    P->>LS: best 갱신 저장
  end
  P-->>U: 최신 best 표시
  deactivate P
Loading
sequenceDiagram
  autonumber
  actor U as User
  participant H as ClientHeader
  participant API as NEXT_PUBLIC_API_BASE
  participant LS as localStorage

  U->>H: 로그인 제출
  H->>API: POST /auth/login
  API-->>H: { accessToken, refreshToken, userName? }
  H->>LS: 토큰 및 userName 저장
  H-->>U: 로그인 상태/헤더 갱신

  U->>H: 로그아웃 클릭
  H->>LS: 토큰 및 userName 제거
  H-->>U: 홈으로 이동/알림

  note over H,LS: storage 이벤트로 다른 탭 상태 동기화
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

refactor🪄

Poem

토끼가 탁, 원을 콩! 반짝 반응해요 ⏱️
서버의 산을 넘지 않고, 내 굴에 기록해요.
상위 10? 안녕—이젠 내 최고가 주인공!
헤더는 달, 토큰은 별—상자(localStorage)에 쏙✨
삐약-삐약 RTT 따라, 새벽 알림 맞춰 봐요.
(_)/ hop hop, 기록 갱신 고고! 🥕

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/revert-reapplied

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e4a543 and ab30277.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • package.json (1 hunks)
  • src/app/reaction-test/page.tsx (5 hunks)
  • src/components/ClientHeader.tsx (4 hunks)
  • src/components/FaqSection.tsx (1 hunks)
  • src/libs/api/reactionRanking.ts (0 hunks)

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.

@cl-o-lc cl-o-lc added chore💭 환경 세팅 etc. fix🔨 오류 수정 labels Oct 9, 2025
@cl-o-lc cl-o-lc merged commit f32896a into main Oct 9, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore💭 환경 세팅 etc. fix🔨 오류 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant