[Feature/#332] 내 알림 설정 GET API 연동 - #334
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough조직별 알림 설정 조회 API와 React Query 훅을 추가하고, Setting 화면에서 조회된 값을 초기 상태에 반영합니다. 로딩·오류·재시도 상태와 알림 설정 저장 제어도 함께 연결했습니다. Changes알림 설정 조회 연동
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant Setting
participant useMyNotificationSettings
participant NotificationAPI
User->>Setting: 조직 선택
Setting->>useMyNotificationSettings: selectedOrgId 전달
useMyNotificationSettings->>NotificationAPI: getMyNotificationSettings(orgId)
NotificationAPI-->>useMyNotificationSettings: 알림 설정 또는 오류 반환
useMyNotificationSettings-->>Setting: 데이터·로딩·오류 상태 반환
Setting-->>User: 설정 토글 또는 재시도 UI 표시
Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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. Comment |
📚 Storybook 배포 완료
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/hooks/setting/useMyNotificationSettings.ts (1)
1-1: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
useCoreQueryimport를 별칭 경로로 통일해주세요.Line 1의 상대 경로는 프로젝트 import 규칙과 다릅니다.
수정 예시
-import { useCoreQuery } from "../customQuery"; +import { useCoreQuery } from "`@/hooks/customQuery`";As per coding guidelines, use
@/alias for all imports.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/hooks/setting/useMyNotificationSettings.ts` at line 1, Update the useCoreQuery import in useMyNotificationSettings.ts to use the project’s `@/` alias path instead of the relative ../customQuery path, preserving the same imported symbol.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/setting/Setting.tsx`:
- Around line 266-271: Update the Setting component’s notificationSettings
handling so DEFAULT_CHANNEL and DEFAULT_WORKSPACE_NOTIF are applied only when no
workspace is selected, not when settings loading fails. Preserve the error state
instead of rendering editable defaults: disable the notification section and
save action, display an error message, and provide the existing settings
refetch/retry behavior.
- Around line 274-281: Update the nextWorkspace mapping in Setting.tsx to use
the organization-scoped response fields for the workspace notification toggles
instead of the personal notificationSettings.alertClicks and alertReport values.
Keep nextChannel mapped to the personal browser and email settings, and ensure
draftWorkspaceNotif receives the organization values for clickAlarm and
weeklyReport.
---
Nitpick comments:
In `@src/hooks/setting/useMyNotificationSettings.ts`:
- Line 1: Update the useCoreQuery import in useMyNotificationSettings.ts to use
the project’s `@/` alias path instead of the relative ../customQuery path,
preserving the same imported symbol.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b769c24a-97c5-4bab-80d2-1c24715277eb
📒 Files selected for processing (5)
src/api/notification/notification.tssrc/hooks/setting/useMyNotificationSettings.tssrc/lib/queryKeys.tssrc/pages/setting/Setting.tsxsrc/types/setting/notification.ts
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/setting/Setting.tsx`:
- Around line 92-98: Update the notification settings error flow around
useMyNotificationSettings and isNotificationError to show toast.error when
loading fails, while retaining the existing inline error UI and retry action.
Trigger the toast from a useEffect guarded by an indicator so it fires once per
error rather than repeatedly during rendering.
- Around line 108-109: Update isNotificationSectionLoading in the Setting
component to include the notification query’s refetching or fetching state
alongside isNotificationLoading, while preserving the selectedOrgId guard, so
skeleton content and save-button locking remain active during retries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: adb36f40-d105-4c0b-85e2-7a9127038a60
📒 Files selected for processing (4)
src/api/notification/notification.tssrc/hooks/setting/useMyNotificationSettings.tssrc/lib/queryKeys.tssrc/pages/setting/Setting.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
- src/lib/queryKeys.ts
- src/hooks/setting/useMyNotificationSettings.ts
|
P4: 확인했습니다! 저는 서버 에러로 뜨는데 잘 확인되시나요?? |
음...저도 지금 서버에러뜹니다..한번 백엔드에 문의해볼게요!! |
백엔드에서 500 서버에러 발생했던거라, 백엔드 오류 해결하니 잘 나옵니다!! 바로 merge하겠습니다! |
🚨 관련 이슈
Closed #332
✨ 변경사항
✏️ 작업 내용
GET /api/notification/settings/{orgId}연동useMyNotificationSettings훅/queryKey 추가😅 미완성 작업
📢 논의 사항 및 참고 사항
Summary by CodeRabbit
새 기능
버그 수정