Skip to content

fix: 존재하지 않는 방을 루트로 이동 - #53

Merged
aryu1217 merged 5 commits into
mainfrom
dev
Aug 18, 2026
Merged

fix: 존재하지 않는 방을 루트로 이동#53
aryu1217 merged 5 commits into
mainfrom
dev

Conversation

@aryu1217

@aryu1217 aryu1217 commented Aug 17, 2026

Copy link
Copy Markdown
Member

변경 내용

  • 존재하지 않는 방을 직접 열었을 때 오류 화면 대신 루트(/)로 교체 이동합니다.
  • 방 메타 GET 404와 join의 room.not-found를 같은 종료 흐름으로 처리하고, 해당 방의 저장 접근 토큰을 제거합니다.
  • 기존 RoomPlaybackScreen 테스트 스위트에 최소 회귀 사례 1건을 추가했습니다.

변경 이유

  • /room/2323처럼 존재하지 않는 방 URL에서 사용자가 복구 불가능한 입장 오류 화면에 머물렀습니다.
  • 잘못된 경로를 히스토리에 남기지 않고 홈으로 복귀시키며, 삭제된 방의 stale 토큰도 함께 정리해야 합니다.

영향 범위

  • UI / 사용자 흐름
  • API 요청·응답 계약
  • React Query 캐시
  • WebSocket / 실시간 상태
  • 인증 / 보안
  • 문서 / 개발 도구

검증

  • npm run lint
  • npm run test
  • npm run build
  • 관련 수동 시나리오 확인
  • 실패·로딩·빈 상태 확인

검증 결과 및 재현 방법:

  • targeted Vitest: 2 files / 10 tests 통과
  • 전체 Vitest: 145 files / 563 tests 통과
  • npm run lint, npm run build, git diff --check 통과
  • 메타 GET 404에서 루트 replace, 저장 토큰 삭제, join 미전송을 자동화 테스트로 확인
  • 전체 테스트의 기존 next/image mock boolean attribute 경고는 남지만 종료 코드는 0이며 이번 변경과 무관

리뷰 포인트

  • 메타 조회와 join 사이 어느 단계에서 방이 없어져도 동일하게 루트 이동하는지
  • 다른 입장 오류, 비밀번호 입력, 이미 참여 중인 방 확인 흐름을 건드리지 않는지
  • push가 아니라 replace를 사용해 잘못된 URL을 뒤로가기 기록에서 제거하는지

기능별 커밋

  • 09bfc29 — 존재하지 않는 방의 루트 이동과 저장 토큰 정리

위험 및 후속 작업

  • blocker 없음
  • 실제 배포 API를 사용한 브라우저 수동 확인은 남아 있습니다.

추적 정보

  • Linked issue: 없음
  • Execution plan: docs/exec-plans/active/2026-08-18-room-not-found-redirect/
  • Selected skills: queuing-feature-delivery, queuing-api-boundary, queuing-ui-flow, frontend-architecture-guardrails, queuing-qa-reviewer
  • QA result: pass

Summary by CodeRabbit

  • 새 기능

    • 존재하지 않는 방에 접근하면 저장된 접근 토큰을 삭제하고 홈 화면(/)으로 이동합니다.
    • 방 목록을 최신 상태로 다시 불러와 더 이상 존재하지 않는 방이 표시되지 않도록 합니다.
    • 방 조회 및 입장 과정에서 동일한 오류 처리가 적용됩니다.
  • 문서

    • 해당 동작의 실행 계획, QA 결과 및 진행 상태를 문서화했습니다.

@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
queuing Ready Ready Preview Aug 17, 2026 6:09pm

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 15528189-2e35-416c-bfea-ef7cad578e17

📥 Commits

Reviewing files that changed from the base of the PR and between f66f631 and 1f30b5d.

📒 Files selected for processing (8)
  • docs/exec-plans/active/2026-08-18-room-not-found-redirect/delivery-state.md
  • docs/exec-plans/active/2026-08-18-room-not-found-redirect/plan.md
  • docs/exec-plans/active/2026-08-18-room-not-found-redirect/qa-report.md
  • docs/exec-plans/active/README.md
  • src/features/room/join/model/roomJoinErrors.ts
  • src/features/room/page/ui/RoomPlaybackScreen.test.tsx
  • src/features/room/page/ui/RoomPlaybackScreen.tsx
  • src/shared/lib/replaceDocumentLocation.ts

📝 Walkthrough

Walkthrough

존재하지 않는 방 오류를 공통 판별하고, 접근 토큰을 삭제한 뒤 /로 이동하도록 변경했습니다. 메타 조회와 입장 흐름의 테스트 및 실행 계획 문서를 추가했습니다.

Changes

존재하지 않는 방 처리

Layer / File(s) Summary
오류 판별 및 문서 위치 이동
src/features/room/join/model/roomJoinErrors.ts, src/shared/lib/replaceDocumentLocation.ts
HTTP 404 또는 room.not-found 오류를 판별하는 함수와 window.location.replace 호출 유틸리티를 추가했습니다.
RoomPlaybackScreen 입장 흐름
src/features/room/page/ui/RoomPlaybackScreen.tsx, src/features/room/page/ui/RoomPlaybackScreen.test.tsx
초기 입장과 비밀번호 입장에서 접근 토큰을 삭제하고 /로 이동합니다. 관련 테스트는 joinRoom 미호출과 오류 메시지 미표시도 확인합니다.
실행 계획 및 검증 기록
docs/exec-plans/active/2026-08-18-room-not-found-redirect/*, docs/exec-plans/active/README.md
구현 계획, QA 결과, 전달 상태를 기록하고 활성 실행 계획 목록에 항목을 추가했습니다.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RoomPlaybackScreen
  participant isRoomNotFoundError
  participant replaceDocumentLocation
  participant window.location

  RoomPlaybackScreen->>isRoomNotFoundError: 오류 전달
  isRoomNotFoundError-->>RoomPlaybackScreen: room-not-found 여부 반환
  RoomPlaybackScreen->>RoomPlaybackScreen: 저장된 접근 토큰 삭제
  RoomPlaybackScreen->>replaceDocumentLocation: "/" 전달
  replaceDocumentLocation->>window.location: window.location.replace("/")
Loading
✨ 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 dev

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.

@aryu1217
aryu1217 marked this pull request as ready for review August 18, 2026 00:32
@aryu1217
aryu1217 merged commit 98048e1 into main Aug 18, 2026
4 checks passed
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