Skip to content

Feature/api integration#46

Merged
yerroong merged 5 commits into
developfrom
feature/api-integration
Mar 15, 2026
Merged

Feature/api integration#46
yerroong merged 5 commits into
developfrom
feature/api-integration

Conversation

@yerroong
Copy link
Copy Markdown
Contributor

@yerroong yerroong commented Mar 15, 2026

✔️ 체크리스트

  • : Merge할 브랜치를 확인해 주세요.

🔍 작업 내용

  • API 에러 핸들링: client.ts에 ApiErrorResponse 타입, getErrorMessage() (에러코드 포함), getErrorCode() 유틸 추가. 백엔드 커스텀 에러코드(5001, 5002 등) 파싱 지원. DEV 환경에서 전체 에러 응답 콘솔 출력
  • 상세페이지 리팩토링: DetailPage.tsx 중복 코드 정리 (formatYearMonth, emptyAppUsage, logApiError, parseAppUsageResponse, fetchAppUsage 헬퍼 추출). 앱 사용량 HTML 응답(데이터 없는 사용자)은 에러 대신 조용히 처리.
  • 큰글씨 모드: 설정 토글 ON 시 Layout에 large-text-content 클래스 적용, CSS에서 Tailwind 텍스트 클래스(text-xs~text-3xl) 오버라이드.
  • 도메인 분기: isAdminDomain()에 hostname.includes('office') 조건 추가.
  • 에러 처리 통합: SharedData, Support, PolicyDetail, Login, Setting 페이지에 getErrorMessage() 유틸 적용.

⚠️ 주의 사항 / 기타

큰글씨 모드는 em 기반이라 px 하드코딩된 font-size는 영향 안 받음
새 컴포넌트 만들 때 text-sm, text-base 같은 Tailwind 클래스 사용 권장

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 더 큰 글씨 모드에서 개선된 텍스트 크기 조정 기능 추가
  • 버그 수정

    • API 오류 메시지 처리 표준화로 사용자 경험 개선
    • 관리자 도메인 인식 로직 개선
  • 스타일

    • 앱 전역 폰트 크기 및 레이아웃 조정
    • 최소 너비 증가 및 상태 표시줄 스타일 정리

@yerroong yerroong merged commit 3f75293 into develop Mar 15, 2026
1 of 2 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 15, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3c202dc9-8608-4148-8608-e09fcd70c401

📥 Commits

Reviewing files that changed from the base of the PR and between a954e3d and 18c2364.

📒 Files selected for processing (18)
  • src/api/client.ts
  • src/api/index.ts
  • src/components/StatusBar.tsx
  • src/index.css
  • src/layout/Layout.tsx
  • src/page/Detail/DetailPage.tsx
  • src/page/Detail/components/AppUsageChart.tsx
  • src/page/Login/LoginPage.tsx
  • src/page/Main/components/PieChart.tsx
  • src/page/PolicyDetail/PolicyDetail.tsx
  • src/page/PolicyDetail/hooks/useAppPolicyData.ts
  • src/page/Setting/Setting.tsx
  • src/page/Setting/components/ModeSettings.tsx
  • src/page/Setting/components/NotificationSettings.tsx
  • src/page/SharedData/SharedData.tsx
  • src/page/Support/Support.tsx
  • src/page/Support/components/InquiryForm.tsx
  • src/utils/domain.ts

📝 Walkthrough

Walkthrough

API 에러 처리를 중앙화하고 구조화된 에러 타입을 도입했으며, 다양한 페이지에서 일관된 에러 메시지 유틸리티를 적용했습니다. UI 스타일링을 업데이트하고 DetailPage의 데이터 로딩 흐름을 리팩토링했으며, 관리자 도메인 검사 로직을 유연화했습니다.

Changes

Cohort / File(s) Summary
API 에러 처리 개선
src/api/client.ts, src/api/index.ts
새로운 공개 타입 ApiErrorResponse와 유틸리티 함수 getErrorMessage, getErrorCode를 추가했습니다. 응답 인터셉터에서 백엔드 에러 페이로드를 일관된 구조로 정규화하고 DEV 환경에서의 상세 로깅을 추가했습니다.
에러 메시지 통합
src/page/Login/LoginPage.tsx, src/page/PolicyDetail/PolicyDetail.tsx, src/page/PolicyDetail/hooks/useAppPolicyData.ts, src/page/Setting/Setting.tsx, src/page/SharedData/SharedData.tsx, src/page/Support/Support.tsx, src/page/Support/components/InquiryForm.tsx
모든 catch 블록에서 직접적인 에러 객체 대신 getErrorMessage 유틸리티를 사용하여 일관된 에러 메시지 처리를 적용했습니다.
UI 스타일링 업데이트
src/layout/Layout.tsx, src/components/StatusBar.tsx, src/index.css, src/page/Setting/components/ModeSettings.tsx, src/page/Setting/components/NotificationSettings.tsx, src/page/Main/components/PieChart.tsx
최소 너비 조정, Tailwind 시맨틱 유틸리티로 폰트 크기 클래스 교체, 큰 텍스트 콘텐츠 모드를 위한 CSS 오버라이드 추가, 칩 레이아웃 래핑 및 센터링을 적용했습니다.
컴포넌트 리팩토링
src/page/Detail/DetailPage.tsx, src/page/Detail/components/AppUsageChart.tsx
DetailPage에서 헬퍼 유틸리티 추가, 중앙화된 데이터 페칭 로직, 월 네비게이션 통합, 공개 여부 토글 보호 로직을 도입했습니다. AppUsageChart에서 canToggle prop을 제거했습니다.
도메인 로직 개선
src/utils/domain.ts
isAdminDomain 로직을 변경하여 정확한 일치 또는 "office"를 포함하는 호스트명을 모두 허용하도록 했습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/api-integration
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

This was referenced Mar 16, 2026
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