Skip to content

[Feature/#306] Setting 페이지 내 클릭수/주간리포트 알림 UI - #322

Merged
jjjsun merged 3 commits into
developfrom
feature/#306
Jul 27, 2026
Merged

[Feature/#306] Setting 페이지 내 클릭수/주간리포트 알림 UI#322
jjjsun merged 3 commits into
developfrom
feature/#306

Conversation

@jjjsun

@jjjsun jjjsun commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

🚨 관련 이슈

Closed #306

✨ 변경사항

  • 🐞 BugFix Something isn't working
  • 💻 CrossBrowsing Browser compatibility
  • 🌏 Deploy Deploy
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (storybook, jest, etc.)

✏️ 작업 내용

  • Setting 알림을 채널/워크스페이스 영역으로 분리
  • selectedOrgId 기준으로 워크스페이스명 표시하고, 미선택하였으면, empty/disabled
  • 클릭수 알림/주간 리포트 on/off 토글 UI 구현
  • draft/saved, 변경 감지, 저장 버튼 연동 (API는 UI이슈마무리후 별도로 진행예정)

🖥️ 작업 화면

image

😅 미완성 작업

  • 알림 설정 API 연동
  • 페이지 헤더 우측에 사이드바 BellIcon이용하여 알람 기록 확인 UI (다음 이슈 예정)

📢 논의 사항 및 참고 사항

  • 채널 = 유저 단위
  • 클릭수/주간 리포트 = 현재 워크스페이스 단위
  • 현재는 저장시 로컬 saved 반영만되고, 실제 API는 후속 이슈로 다룰예정입니다

💬 리뷰어 가이드 (P-Rules)
P1: 필수 반영 (Critical) - 버그 가능성, 컨벤션 위반. 해결 전 머지 불가.
P2: 적극 권장 (Recommended) - 더 나은 대안 제시. 가급적 반영 권장.
P3: 제안 (Suggestion) - 아이디어 공유. 반영 여부는 드라이버 자율.
P4: 단순 확인/칭찬 (Nit) - 사소한 오타, 칭찬 등 피드백.

Summary by CodeRabbit

  • 새 기능
    • 알림 설정을 채널 알림과 워크스페이스 알림으로 구분해 관리할 수 있습니다.
    • 워크스페이스별 클릭 알림과 주간 리포트 알림을 설정할 수 있습니다.
    • 선택한 워크스페이스에 따라 알림 상태와 설정 가능 여부가 자동으로 반영됩니다.
  • 개선 사항
    • 알림 설정 화면의 제목과 아이콘 표시를 정리했습니다.
    • 변경한 알림 설정 유형에 맞춰 저장 완료 안내가 표시됩니다.

@jjjsun
jjjsun requested review from Seojegyeong and YermIm July 27, 2026 07:29
@jjjsun jjjsun self-assigned this Jul 27, 2026
@jjjsun jjjsun added 🎨 Html&css 마크업 & 스타일링 ✨ Feature 기능 개발 labels Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jjjsun, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 866c1650-23e5-4786-8b6e-ab15fc2880cd

📥 Commits

Reviewing files that changed from the base of the PR and between 34d3d21 and add68cb.

📒 Files selected for processing (1)
  • src/pages/setting/Setting.tsx
📝 Walkthrough

Walkthrough

채널 알림과 워크스페이스 알림을 별도 타입·상태로 분리하고, 선택된 워크스페이스 기준의 클릭수 알람과 주간 리포트 토글을 설정 화면에 추가했습니다. 변경 감지, 저장, 조직 변경 시 초기화 흐름도 함께 갱신되었습니다.

Changes

알림 설정 확장

Layer / File(s) Summary
알림 계약과 워크스페이스 UI
src/types/setting/notification.ts, src/components/setting/NotificationSection.tsx
채널 및 워크스페이스 알림 타입을 추가하고, 워크스페이스 이름·비활성 상태·토글 핸들러를 NotificationSection에 연결했습니다.
설정 상태와 워크스페이스 연결
src/pages/setting/Setting.tsx
채널과 워크스페이스 알림의 saved/draft 상태를 분리하고, 선택된 조직의 워크스페이스 정보와 변경 핸들러를 UI에 전달합니다.
변경 감지와 저장 lifecycle
src/pages/setting/Setting.tsx
채널·워크스페이스별 변경 여부를 계산하고 저장 결과를 반영하며, 조직 변경 시 워크스페이스 알림 상태를 기본값으로 초기화합니다.

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

Possibly related PRs

Suggested reviewers: yermim, seojegyeong

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Setting
  participant WorkspaceQuery
  participant NotificationSection
  User->>Setting: 설정 페이지 진입
  Setting->>WorkspaceQuery: 워크스페이스 목록 조회
  WorkspaceQuery-->>Setting: 워크스페이스 목록 반환
  Setting->>NotificationSection: 선택 워크스페이스와 알림 상태 전달
  User->>NotificationSection: 알림 토글 변경
  NotificationSection->>Setting: draft 상태 변경
  User->>Setting: 저장 실행
  Setting-->>User: 저장 완료 토스트 표시
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed 채널/워크스페이스 분리, selectedOrgId 기준 표시, 토글 UI, draft/saved 연동, empty/disabled 처리까지 요구사항과 맞습니다.
Out of Scope Changes check ✅ Passed 요구사항과 무관한 변경은 보이지 않고, 타입/인터페이스 조정도 알림 UI 확장에 직접 연관됩니다.
Title check ✅ Passed 클릭수/주간리포트 알림 UI 추가라는 핵심 변경을 명확히 담고 있어 제목으로 적절합니다.
Description check ✅ Passed 관련 이슈, 변경사항, 작업 내용, 미완성 작업, 참고 사항이 포함되어 템플릿 요구를 대부분 충족합니다.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#306

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.

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

📚 Storybook 배포 완료

항목 링크
📖 Storybook https://69a147b60a56365d9e2185ef-frkxpnbkwr.chromatic.com/
🔍 Chromatic https://www.chromatic.com/build?appId=69a147b60a56365d9e2185ef&number=446

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
src/components/setting/NotificationSection.tsx (1)

12-26: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Props 타입 네이밍 컨벤션 확인해주세요.

TNotificationSectionProps는 컴포넌트 props 타입인데 T* 접두사를 쓰고 있어요. 가이드라인상 컴포넌트 props는 I*Props 네이밍(예: INotificationSectionProps)을 사용해야 합니다. 코드 자체는 문제없지만, 팀 컨벤션과 어긋나서 나중에 타입 검색/일관성에서 혼란을 줄 수 있어요.

As per coding guidelines: "Type naming conventions: API/request-response use I* (e.g., ILoginRequest), unions/options use T*, component props use I*Props."

♻️ 제안
-type TNotificationSectionProps = {
+interface INotificationSectionProps {
   email: string;
   //channel
   browserPush: boolean;
   emailNotif: boolean;
   onBrowserPushChange: (value: boolean) => void;
   onEmailNotifChange: (value: boolean) => void;
   //workspace
   workspaceName: string | null; // null이면 미선택/없음
   clickAlarm: boolean;
   weeklyReport: boolean;
   onClickAlarmChange: (value: boolean) => void;
   onWeeklyReportChange: (value: boolean) => void;
   workspaceNotifiDisabled: boolean; //selectedOrgId === null 등
-};
+}

그리고 }: TNotificationSectionProps)}: INotificationSectionProps) 로 변경해주세요.

🤖 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/components/setting/NotificationSection.tsx` around lines 12 - 26, Rename
the component props type TNotificationSectionProps to INotificationSectionProps
and update the NotificationSection component’s props annotation to use the new
name, preserving all fields and behavior unchanged.

Source: Coding guidelines

src/pages/setting/Setting.tsx (1)

59-66: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

알림 상태 로직을 커스텀 훅으로 분리하는 것도 고려해보세요.

프로필/비밀번호/채널 알림/워크스페이스 알림까지 Setting 컴포넌트 하나가 상태·변경감지·저장·초기화를 모두 담당하면서 점점 커지고 있어요. 채널/워크스페이스 알림 관련 state(59-66), 변경 감지(108-125), org 변경 시 초기화(242-246) 부분을 useNotificationSettings 같은 커스텀 훅으로 묶으면 페이지 컴포넌트의 책임이 가벼워지고 테스트도 쉬워집니다.

As per path instructions: "구조와 책임 분리: 페이지에 비즈니스 로직이 과도하지 않은지 확인. 커스텀 훅으로의 분리 여부 검토."

Also applies to: 108-125, 242-246

🤖 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/pages/setting/Setting.tsx` around lines 59 - 66, Extract the channel and
workspace notification state management from Setting into a
useNotificationSettings custom hook. Move the related saved/draft state, change
detection logic, and organization-change initialization currently handled by
Setting, and expose the values and actions the page needs for rendering and
saving. Keep profile and password responsibilities in Setting while preserving
the existing notification behavior.

Source: Path instructions

🤖 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 194-208: Update the toast.success message selection in Setting so
hasWorkspaceNotifChanges is included when determining the successful save
message. Ensure workspace notification-only changes do not fall through to the
account-update message, while preserving the existing account and channel
messaging behavior.
- Around line 79-91: Distinguish workspace loading from the unselected state in
the settings flow: destructure the query’s loading flag from useCoreQuery,
derive workspaceNotifiDisabled from selectedOrgId rather than the temporarily
missing currentWorkspaceName, and pass the loading state to NotificationSection
so it can show loading UI instead of “select a workspace” while data is pending.

---

Nitpick comments:
In `@src/components/setting/NotificationSection.tsx`:
- Around line 12-26: Rename the component props type TNotificationSectionProps
to INotificationSectionProps and update the NotificationSection component’s
props annotation to use the new name, preserving all fields and behavior
unchanged.

In `@src/pages/setting/Setting.tsx`:
- Around line 59-66: Extract the channel and workspace notification state
management from Setting into a useNotificationSettings custom hook. Move the
related saved/draft state, change detection logic, and organization-change
initialization currently handled by Setting, and expose the values and actions
the page needs for rendering and saving. Keep profile and password
responsibilities in Setting while preserving the existing notification behavior.
🪄 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: 653f1b74-dc84-4321-bd72-2c7d0753c66e

📥 Commits

Reviewing files that changed from the base of the PR and between 29c5bce and 34d3d21.

📒 Files selected for processing (3)
  • src/components/setting/NotificationSection.tsx
  • src/pages/setting/Setting.tsx
  • src/types/setting/notification.ts

Comment thread src/pages/setting/Setting.tsx
Comment thread src/pages/setting/Setting.tsx

@Seojegyeong Seojegyeong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P4: 확인했습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 개발 🎨 Html&css 마크업 & 스타일링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feature] 채널 클릭수 알람 / 리포트 수신 UI

2 participants