Skip to content

[Refactor] - admin 배포 설정 및 리팩토링#49

Merged
KyeongJooni merged 8 commits into
mainfrom
48-refactor/admin-refactor
May 26, 2026
Merged

[Refactor] - admin 배포 설정 및 리팩토링#49
KyeongJooni merged 8 commits into
mainfrom
48-refactor/admin-refactor

Conversation

@KyeongJooni

@KyeongJooni KyeongJooni commented May 25, 2026

Copy link
Copy Markdown
Contributor

✨ 주요 변경사항

  • admin 페이지 폴더에서 Page 접미사를 제거해 폴더/컴포넌트 이름을 일관화 (LoginPageLogin, UserDetailPageUserDetail, UsersListPageUsersList)
  • 전역 에러 페이지(GlobalError)와 404 페이지(NotFound) 컴포넌트 추가
  • 라우터에 errorElement로 전역 에러를 연결하고, catch-all 라우트를 Navigate 대신 NotFound로 교체
  • Vercel SPA 라우팅 fallback을 위한 apps/admin/vercel.json 추가

📝 작업 상세 내용

  • 페이지 폴더 rename은 단순 이름 변경이며 내부 로직 변경은 없습니다. import 경로와 컴포넌트 이름만 동기화됐어요.
  • 라우터 구조를 트리 최상단에 errorElement를 두는 형태로 정리해, 보호 라우트/레이아웃 어디서 에러가 터지든 동일한 에러 페이지를 보여주도록 했습니다.
  • 기존에는 잘못된 경로 접근 시 /users로 강제 리다이렉트되었는데, 이제 NotFound를 보여주도록 변경했습니다.
  • vercel.json/(.*) → /index.html rewrite만 추가해 SPA 라우팅의 새로고침/직접 접근 케이스를 처리합니다.

✅ 체크리스트

  • PR 본문에 Close #번호 추가
  • 불필요한 주석, 디버깅 코드 제거
  • 기능 테스트 및 정상 동작 확인
  • 커밋컨벤션 / 코드컨벤션 준수

📸 스크린샷 (선택)


🔍 기타 참고사항

  • vercel.json은 admin 앱 전용이며 web에는 영향 없습니다.

🔗 관련 이슈

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 에러 발생 시 표시되는 전용 에러 페이지 추가
    • 404 페이지 추가로 찾을 수 없는 경로에 대한 안내 제공
  • Refactor

    • 라우팅 구조 개선으로 에러 처리 강화
    • 컴포넌트 스타일 경로 통일

Review Change Stack

@vercel

vercel Bot commented May 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
muneo-client-web Ready Ready Preview, Comment May 26, 2026 5:49am

@github-actions
github-actions Bot requested a review from tmdcks1103 May 25, 2026 11:22
@github-actions github-actions Bot changed the title 48 refactor/admin refactor [Refactor] - admin 배포 설정 및 리팩토링 May 25, 2026
@github-actions github-actions Bot added the ♻️Refactor 코드 리팩토링 label May 25, 2026
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 96e26d7b-5bea-4fad-a786-314570a82596

📥 Commits

Reviewing files that changed from the base of the PR and between 34604db and 9a852c7.

📒 Files selected for processing (21)
  • apps/admin/src/pages/GlobalError/GlobalError.tsx
  • apps/admin/src/pages/Login/Login.css.ts
  • apps/admin/src/pages/Login/Login.tsx
  • apps/admin/src/pages/Login/components/LoginForm.tsx
  • apps/admin/src/pages/Login/hooks/useLoginForm.ts
  • apps/admin/src/pages/NotFound/NotFound.tsx
  • apps/admin/src/pages/UserDetail/UserDetail.css.ts
  • apps/admin/src/pages/UserDetail/UserDetail.tsx
  • apps/admin/src/pages/UserDetail/components/UserDangerZone.tsx
  • apps/admin/src/pages/UserDetail/components/UserEditForm.tsx
  • apps/admin/src/pages/UserDetail/components/UserRoleSection.tsx
  • apps/admin/src/pages/UserDetail/hooks/useUserDetail.ts
  • apps/admin/src/pages/UsersList/UsersList.css.ts
  • apps/admin/src/pages/UsersList/UsersList.tsx
  • apps/admin/src/pages/UsersList/components/UserFilters.css.ts
  • apps/admin/src/pages/UsersList/components/UserFilters.tsx
  • apps/admin/src/pages/UsersList/components/UsersTable.css.ts
  • apps/admin/src/pages/UsersList/components/UsersTable.tsx
  • apps/admin/src/pages/UsersList/hooks/useUsersFilters.ts
  • apps/admin/src/router/router.tsx
  • apps/admin/vercel.json

📝 Walkthrough

Walkthrough

Admin 애플리케이션의 페이지 구조를 정규화하고 라우팅을 개선하는 리팩토링입니다. 에러 처리 페이지를 추가하고, 페이지 컴포넌트 이름을 간결하게 정규화하며, 라우터를 중첩 구조로 재구성합니다. Vercel 배포를 위한 설정도 추가됩니다.

Changes

Admin 페이지 및 라우팅 리팩토링

Layer / File(s) Summary
에러 처리 페이지 추가
apps/admin/src/pages/GlobalError/GlobalError.tsx, apps/admin/src/pages/NotFound/NotFound.tsx
GlobalError 컴포넌트는 라우팅 에러를 useRouteError로 수집하고 콘솔에 로깅하며, 재시도(새로고침) 및 홈 이동 버튼을 제공합니다. NotFound 컴포넌트는 404 상황에서 사용자를 홈으로 안내하는 UI를 표시합니다.
페이지 컴포넌트 명명 정규화
apps/admin/src/pages/Login/Login.tsx, apps/admin/src/pages/Login/components/LoginForm.tsx, apps/admin/src/pages/UsersList/UsersList.tsx, apps/admin/src/pages/UserDetail/UserDetail.tsx, apps/admin/src/pages/UserDetail/components/UserDangerZone.tsx, apps/admin/src/pages/UserDetail/components/UserEditForm.tsx, apps/admin/src/pages/UserDetail/components/UserRoleSection.tsx
페이지 컴포넌트를 LoginPageLogin, UsersListPageUsersList, UserDetailPageUserDetail로 정규화합니다. 모든 CSS 모듈 경로도 대응하는 파일명으로 업데이트되어 일관성이 유지됩니다.
라우터 구조 재구성 및 에러 바운더리 통합
apps/admin/src/router/router.tsx
라우터에 전역 errorElement: <GlobalError />를 추가하고, 보호된 라우트 내부에 <Layout> 래퍼를 도입하여 중첩 구조로 개선합니다. 와일드카드 처리를 기존의 리다이렉트에서 <NotFound /> 컴포넌트 렌더링으로 변경하여 사용자 경험을 개선합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

🛠️ Chore

Suggested reviewers

  • tmdcks1103

Poem

페이지 이름은 깔끔하게,
에러는 우아하게, 🎭
라우팅은 구조있게,
배포는 한 발짝 더 가까워졌네요! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 'admin 배포 설정 및 리팩토링'으로 PR의 주요 변경사항(배포 설정, 컴포넌트 이름 일관화, 에러 페이지 추가, 라우터 개선)을 포괄적으로 요약합니다.
Description check ✅ Passed PR 설명은 템플릿 구조를 따르며, 주요 변경사항, 상세 내용, 체크리스트를 완벽하게 작성했고 관련 이슈 #48을 명시했습니다.
Linked Issues check ✅ Passed 이슈 #48의 목표인 'admin 배포 설정 및 리팩토링'을 모두 충족합니다: 컴포넌트 이름 일관화, 에러 페이지 추가, vercel.json 배포 설정 완료.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #48 범위 내입니다. 컴포넌트 이름 변경, 에러/404 페이지 추가, 라우터 개선, vercel.json 추가 모두 목표에 직접 관련됩니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 48-refactor/admin-refactor

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

apps/admin/src/pages/GlobalError/GlobalError.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

apps/admin/src/pages/Login/Login.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

apps/admin/src/pages/Login/components/LoginForm.tsx

ESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.

  • 7 others

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.

@github-actions

Copy link
Copy Markdown

🔍 CI 검증 결과

검증 항목 web admin design-system
Type ✅ 통과 ✅ 통과 ✅ 통과
Prettier ✅ 통과 ✅ 통과 ✅ 통과
Lint ✅ 통과 ✅ 통과 ✅ 통과
tests ✅ 통과 ✅ 통과 ✅ 통과
Build ✅ 통과 ✅ 통과 ➖ 해당 없음

@github-actions

Copy link
Copy Markdown

🔍 CI 검증 결과

검증 항목 web admin design-system
Type ✅ 통과 ✅ 통과 ✅ 통과
Prettier ✅ 통과 ✅ 통과 ✅ 통과
Lint ✅ 통과 ✅ 통과 ✅ 통과
tests ✅ 통과 ✅ 통과 ✅ 통과
Build ✅ 통과 ✅ 통과 ➖ 해당 없음

@KyeongJooni
KyeongJooni merged commit 1975c4b into main May 26, 2026
13 checks passed
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.

[Refactor] #48 - admin 배포 설정 및 리팩토링

2 participants