Skip to content

[#x] 협업툴 제안 구현 / 온보딩 관련 리다이렉트 문제 - #114

Merged
jaqwe2301 merged 6 commits into
developfrom
feat/proposal-tool
Mar 5, 2026
Merged

jaqwe2301 merged 6 commits into
developfrom
feat/proposal-tool

Conversation

@jaqwe2301

Copy link
Copy Markdown
Collaborator

📄 PR 내용 요약

  • 협업툴 제안 구현
  • 온보딩 관련 리다이렉트 문제 해결
  • 알림 API 연결 / 백그라운드 상태 알림 구현
  • 협업툴, 규칙 파일 위치 변경
  • GTM 도입

✅ 작업 내용 상세

협업툴 제안 구현

  • 디자인과 동일하게, 알림을 통해 협업툴 제안 승인/반려 페이지로 이동할 수 있도록 구현하였습니다.
  • 알림이 오면 나타나는 Toast나 알림 목록에서 해당 알림을 클릭하면 승인/반려 페이지로 이동할 수 있습니다.
  • 협업툴 승인에 한정하여 알림이 오면 tanstack query를 통해 알림을 다시 조회합니다. 이를 통해, 팀룸 페이지에서 해당 알림이 왔을 때 승인된 협업툴이 UI 상 바로 반영됩니다.

온보딩 관련 리다이렉트 문제 해결

  • 온보딩을 완료하지 않은 유저가 온보딩 후 다시 온보딩으로 리다이렉트 되는 문제가 있었습니다.
  • 세션 스토리지에 온보딩 URL이 저장되면서 생기는 문제로, 온보딩 페이지면 세션 스토리지에 URL이 저장되지 않도록 수정하였습니다.
  • 또한, 로그인 이전에 /home 경로에 접속 -> 로그인 -> /home 경로 접속 시 다른 페이지로 넘어가지 않는 문제가 있었습니다.
  • 현재 /home 경로일 때 세션 스토리지에 저장된 URL로 리다이렉트되지 않도록 수정하였습니다.
  • 백엔드 측에서 JWT에 온보딩 상태를 저장해두도록 구현하셔서 최소 accessToken 발급 시 decode하여 온보딩이 안되어 있으면 온보딩 페이지로 리다이렉트 되도록 반영하였습니다.

알림 API 연결 / 백그라운드 상태 알림 구현

  • 알림 목록 조회, 읽음 처리 등의 API를 연결하였습니다.
  • 알림은 tanstack query 캐싱처리를 하였으며, 읽음과 관련하여 세세하게 캐싱처리가 되어있습니다.
  • 이전에는 포그라운드 상태에서의 알림만 구현되어 있었는데, 백그라운드에서도 알림 처리를 할 수 있도록 반영하였습니다.

협업툴, 규칙 파일 위치 변경

  • 이전에는 협업툴, 규칙과 관련되 파일 위치가 setup 폴더 안에 있었다면, timeselect에 맞춰 상위 폴더로 옮겼습니다.

GTM 도입

  • 재형님 요청사항에 맞춰 GTM을 도입하였습니다.
  • main.tsx에서 <script>를 올리는 방식이고, 관련 id를 환경변수 처리하기 위해 이와 같은 방식으로 구현하였습니다.

📸 스크린샷 (선택사항)

image image

💬 참고 사항

  • GTM에 사용되는 id 환경변수를 로컬에 반영하면 배포/로컬 환경 모두 감지되는 문제가 있을 수 있어서 로컬 환경변수에는 반영하면 안됩니다!

📝 체크리스트

  • 기능이 정상 동작하는지 확인
  • 로컬 빌드/테스트 통과
  • 불필요한 코드/주석 제거

@jaqwe2301 jaqwe2301 self-assigned this Mar 4, 2026
@github-actions
github-actions Bot requested a review from junye0l March 4, 2026 18:07
@jaqwe2301 jaqwe2301 added ✨ feature 새로운 기능 추가, 요구사항 반영 🐞 bug 기능 오류, 화면 깨짐, 예외 발생 등 예상치 못한 문제 🔧 refactor 코드 리팩터링, 구조 개선, 클린 코드 작업 labels Mar 4, 2026
@jaqwe2301
jaqwe2301 requested a review from Copilot March 4, 2026 18:08
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 협업툴 제안 및 승인/반려 기능을 도입하여 팀룸 내 협업 도구 관리를 강화하고, 사용자 온보딩 과정에서 발생하던 리다이렉트 문제를 해결하여 사용자 경험을 개선합니다. 또한, 알림 시스템을 백엔드 API와 완전히 연동하고 백그라운드 알림을 지원하며, Google Tag Manager를 통합하여 데이터 분석 기능을 추가합니다. 전반적으로 애플리케이션의 기능성과 안정성을 향상시키는 변경사항입니다.

Highlights

  • 협업툴 제안 기능 구현: 알림을 통해 협업툴 제안 승인/반려 페이지로 이동하고, 승인 시 팀룸 페이지에 즉시 반영되도록 구현되었습니다.
  • 온보딩 리다이렉트 문제 해결: 온보딩 완료 후 다시 온보딩 페이지로 리다이렉트되거나, 로그인 후 /home 경로에서 다른 페이지로 넘어가지 않던 문제가 수정되었습니다. JWT의 온보딩 상태를 활용하여 리다이렉트 로직이 개선되었습니다.
  • 알림 API 연동 및 백그라운드 알림: 알림 목록 조회, 읽음 처리 API가 연동되었으며, tanstack query를 통한 캐싱 처리와 백그라운드 상태에서도 알림을 받을 수 있도록 기능이 확장되었습니다.
  • 파일 구조 개선: 협업툴 및 규칙 관련 파일들이 setup 폴더에서 상위 폴더로 이동하여 timeselect 구조에 맞춰 재정리되었습니다.
  • GTM (Google Tag Manager) 도입: main.tsx에 GTM 스크립트가 추가되었고, GTM ID는 환경변수로 관리됩니다.
Changelog
  • Dockerfile
    • GTM ID 환경변수 VITE_GTM_ID를 빌드 인자로 추가하고 검증 로직을 포함했습니다.
    • 빌드 시점에 VITE_GTM_ID를 환경변수로 전달하도록 설정했습니다.
  • public/firebase-messaging-sw.template.js
    • 백그라운드 메시지 수신 시 열린 탭들에게 메시지를 전달하고 OS 알림을 표시하도록 로직을 업데이트했습니다.
  • src/App.tsx
    • 알림 페이지 (/notification), 협업툴 제안 페이지 (/teamroom/:id/tool/proposal), 협업툴 제안 결정 페이지 (/teamroom/:id/tool/proposal/:proposalId)에 대한 라우트를 추가했습니다.
    • 알림 페이지 라우트의 주석을 해제하여 활성화했습니다.
  • src/app/AuthGuard.tsx
    • JWT에서 온보딩 상태를 디코딩하여 온보딩이 완료되지 않은 사용자가 온보딩 페이지에 있을 경우 /home으로 리다이렉트하는 로직을 추가했습니다.
    • 세션 스토리지에 리다이렉트 URL을 저장할 때 온보딩 관련 페이지는 저장하지 않도록 수정했습니다.
    • FCM 포그라운드 및 백그라운드 메시지 처리를 위한 handlePayload 콜백 함수를 추가하고, 알림 클릭 시 협업툴 제안 페이지로 이동하는 기능을 구현했습니다.
    • 협업툴 승인 알림 수신 시 tanstack query를 사용하여 확정된 협업툴 목록을 다시 불러오도록 했습니다.
  • src/entities/notification/api/notification-api.ts
    • 알림 목록 조회 (getNotifications), 단일 알림 읽음 처리 (readNotification), 모든 알림 읽음 처리 (readAllNotifications)를 위한 API 함수를 추가했습니다.
  • src/entities/notification/api/notification-dto.ts
    • 다양한 알림 유형을 정의하는 NotificationType과 알림 응답 데이터 구조를 정의하는 GetNotificationsResponse 타입을 추가했습니다.
  • src/entities/notification/hooks/useNotification.ts
    • 알림 목록을 조회하고 캐싱하는 useNotifications 쿼리 훅을 추가했습니다.
    • 단일 알림을 읽음 처리하는 useReadNotification 뮤테이션 훅을 추가했습니다.
    • 모든 알림을 읽음 처리하는 useAllReadNotifications 뮤테이션 훅을 추가했습니다.
    • 알림 상태를 관리하는 useNotificationStore와 연동하여 읽지 않은 알림 수를 업데이트하도록 했습니다.
  • src/entities/notification/model/fcm-payload.ts
    • 알림 유형 NotificationType을 새로운 notification-dto에서 임포트하도록 변경했습니다.
  • src/entities/notification/model/notification-store.ts
    • 읽지 않은 알림 수를 관리하는 Zustand 스토어 useNotificationStore를 추가했습니다.
  • src/entities/rule/api/rule-api.ts
    • 파일 경로를 src/entities/setup/rule/api/rule-api.ts에서 src/entities/rule/api/rule-api.ts로 변경했습니다.
  • src/entities/rule/api/rule-dto.ts
    • 파일 경로를 src/entities/setup/rule/api/rule-dto.ts에서 src/entities/rule/api/rule-dto.ts로 변경했습니다.
    • RuleVoteMember 타입의 userName 필드를 name으로 변경했습니다.
  • src/entities/rule/api/rule-keys.ts
    • 파일 경로를 src/entities/setup/rule/api/rule-keys.ts에서 src/entities/rule/api/rule-keys.ts로 변경했습니다.
  • src/entities/rule/hooks/useRule.ts
    • 파일 경로를 src/entities/setup/rule/hooks/useRule.ts에서 src/entities/rule/hooks/useRule.ts로 변경했습니다.
  • src/entities/tool/api/tool-api.ts
    • 파일 경로를 src/entities/setup/tool/api/tool-api.ts에서 src/entities/tool/api/tool-api.ts로 변경했습니다.
    • 협업툴 제안 (proposalTools), 제안 상세 조회 (getToolProposalDetail), 제안 승인/반려 (proposalToolDecision)를 위한 API 함수를 추가했습니다.
  • src/entities/tool/api/tool-dto.ts
    • 파일 경로를 src/entities/setup/tool/api/tool-dto.ts에서 src/entities/tool/api/tool-dto.ts로 변경했습니다.
    • 협업툴 제안 요청 (ProposalToolsRequest) 및 제안 상세 정보 (GetProposalToolDetail) 타입을 추가했습니다.
  • src/entities/tool/api/tool-keys.ts
    • 파일 경로를 src/entities/setup/tool/api/tool-keys.ts에서 src/entities/tool/api/tool-keys.ts로 변경했습니다.
    • teamRoomId 및 categoryId의 타입을 string | number에서 number로 변경했습니다.
    • 협업툴 제안 상세 조회를 위한 쿼리 키 proposalDetail을 추가했습니다.
  • src/entities/tool/hooks/useTool.ts
    • 파일 경로를 src/entities/setup/tool/hooks/useTool.ts에서 src/entities/tool/hooks/useTool.ts로 변경했습니다.
    • useConfirmedTools, useToolVoteParticipation, useVoteCountByCategory, useSubmitAllToolVotes, useDeleteTeamTool 훅의 teamRoomId 및 categoryId 파라미터 타입을 number로 변경했습니다.
    • 협업툴 제안 상세 조회를 위한 useToolProposalDetail 쿼리 훅을 추가했습니다.
  • src/main.tsx
    • GTM 설치 유틸리티 함수 installGTM을 임포트하고, 환경변수 VITE_GTM_ID가 존재할 경우 GTM을 초기화하도록 했습니다.
  • src/pages/home/index.tsx
    • 리다이렉트 URL이 /home일 경우 리다이렉트를 수행하지 않도록 조건을 추가하여 무한 리다이렉트 루프를 방지했습니다.
  • src/pages/teamroom/[id]/rule/index.tsx
    • 규칙 설정 페이지 컴포넌트의 임포트 경로를 widgets/teamroom/setup/rule에서 widgets/teamroom/rule로 변경했습니다.
  • src/pages/teamroom/[id]/tool/index.tsx
    • 협업툴 설정 페이지 컴포넌트의 임포트 경로를 widgets/teamroom/setup/tool에서 widgets/teamroom/tool로 변경했습니다.
  • src/pages/teamroom/[id]/tool/proposal/[proposal-id]/index.tsx
    • 새로운 협업툴 제안 결정 페이지를 추가했습니다. 이 페이지는 제안 상세 정보를 표시하고 팀장이 제안을 승인하거나 거절할 수 있도록 합니다.
  • src/pages/teamroom/[id]/tool/proposal/index.tsx
    • 새로운 협업툴 제안 페이지를 추가했습니다. 이 페이지는 사용자가 팀장에게 협업툴을 제안할 수 있도록 합니다.
  • src/shared/api/auth/refresh-token.ts
    • 액세스 토큰 발급 시 jwt-decode를 사용하여 토큰에서 온보딩 상태를 추출하고, 온보딩이 진행 중인 경우 notifyAuthBlocked 이벤트를 발생시키도록 했습니다.
  • src/shared/api/auth/use-auth-bootstrap.ts
    • 리프레시 토큰이 없거나 만료되었을 때 현재 URL을 세션 스토리지에 저장하는 로직에서 온보딩 관련 페이지는 제외하도록 수정했습니다.
  • src/shared/lib/gtm-install.ts
    • Google Tag Manager 스크립트를 동적으로 삽입하는 installGTM 유틸리티 함수를 추가했습니다.
  • src/shared/ui/button/BottomButton.tsx
    • 버튼의 높이 스타일을 h-[55px]에서 min-h-[55px]로 변경하여 최소 높이를 보장하도록 했습니다.
  • src/shared/ui/header/NotificationIcon.tsx
    • 읽지 않은 알림 수를 표시하는 NotificationIcon 컴포넌트를 새로 추가했습니다.
  • src/shared/ui/toast/Toast.tsx
    • 토스트 메시지 클릭 시 onClick 핸들러를 실행하고 토스트를 제거하는 handleToastClick 함수를 추가했습니다.
  • src/shared/ui/toast/toast-store.ts
    • ToastItem 타입에 onClick 속성을 추가하여 토스트 클릭 시 실행될 콜백 함수를 정의할 수 있도록 했습니다.
  • src/vite-env.d.ts
    • GTM 데이터 레이어 이벤트를 위한 DataLayerEvent 타입과 Window 인터페이스에 dataLayer 속성을 추가했습니다.
  • src/widgets/home/HomeHeader.tsx
    • 기존의 알림 아이콘 링크를 새로 추가된 NotificationIcon 컴포넌트로 대체했습니다.
  • src/widgets/mypage/index.tsx
    • 알림 설정 메뉴 항목을 주석 처리하여 비활성화했습니다. (API 구현 후 활성화 예정)
  • src/widgets/notification/ui/NotificationItem.tsx
    • 알림 항목 컴포넌트의 index prop을 notificationId로 변경하고, description prop을 message로 변경했습니다.
    • disabled prop을 추가하여 알림 항목의 활성화/비활성화 상태를 제어할 수 있도록 했습니다.
  • src/widgets/notification/ui/NotificationList.tsx
    • 더미 데이터를 제거하고 useNotifications, useReadNotification, useAllReadNotifications 훅을 사용하여 실제 알림 데이터를 연동했습니다.
    • 알림 유형이 TOOL_SUGGESTION일 경우 협업툴 제안 페이지로 이동하도록 handleReadNotification 로직을 추가했습니다.
  • src/widgets/teamroom/main/dashboard/Tool/ToolContents.tsx
    • 협업툴 콘텐츠 컴포넌트에 teamRoomId와 isReader prop을 추가했습니다.
    • 협업툴 제안 기능을 위한 '요청하기' 버튼과 handleProposalTools 함수를 추가했습니다.
  • src/widgets/teamroom/main/dashboard/rule/RuleContents.tsx
    • 규칙 콘텐츠 컴포넌트의 hideIcon prop을 hideRightButton으로, onClickIcon prop을 onClickRightButton으로 변경했습니다.
  • src/widgets/teamroom/main/dashboard/ui/Dashboard.tsx
    • 규칙 및 협업툴 관련 훅의 임포트 경로를 업데이트하고, teamRoomId를 Number 타입으로 전달하도록 수정했습니다.
    • ToolContents 컴포넌트에 teamRoomId와 isReader prop을 전달하도록 했습니다.
  • src/widgets/teamroom/main/ui/ContentsHeader.tsx
    • 헤더 컴포넌트의 props 타입을 재정의하여 rule, tool, timepick 유형에 따라 다른 속성을 가질 수 있도록 했습니다.
    • 규칙 섹션의 편집 버튼과 협업툴 섹션의 '요청하기' 버튼 로직을 분리하여 구현했습니다.
  • src/widgets/teamroom/main/ui/TeamRoomBanner.tsx
    • 기존의 알림 아이콘 주석을 해제하고 NotificationIcon 컴포넌트로 대체했습니다.
  • src/widgets/teamroom/rule/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/rule/index.tsx에서 src/widgets/teamroom/rule/index.tsx로 변경했습니다.
  • src/widgets/teamroom/rule/ui/vote-waitng/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/rule/ui/vote-waitng/index.tsx에서 src/widgets/teamroom/rule/ui/vote-waitng/index.tsx로 변경했습니다.
    • 투표 참여자 목록에서 userName 필드를 name으로 변경했습니다.
  • src/widgets/teamroom/rule/ui/voting-rule/RuleVotingNotice.tsx
    • 파일 경로를 src/widgets/teamroom/setup/rule/ui/voting-rule/RuleVotingNotice.tsx에서 src/widgets/teamroom/rule/ui/voting-rule/RuleVotingNotice.tsx로 변경했습니다.
  • src/widgets/teamroom/rule/ui/voting-rule/VotingRule.tsx
    • 파일 경로를 src/widgets/teamroom/setup/rule/ui/voting-rule/VotingRule.tsx에서 src/widgets/teamroom/rule/ui/voting-rule/VotingRule.tsx로 변경했습니다.
  • src/widgets/teamroom/rule/ui/voting-rule/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/rule/ui/voting-rule/index.tsx에서 src/widgets/teamroom/rule/ui/voting-rule/index.tsx로 변경했습니다.
  • src/widgets/teamroom/tool/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/tool/index.tsx에서 src/widgets/teamroom/tool/index.tsx로 변경했습니다.
    • useToolVoteParticipation 훅에 id를 Number 타입으로 전달하도록 수정했습니다.
  • src/widgets/teamroom/tool/proposal/index.tsx
    • 새로운 협업툴 제안 페이지를 추가했습니다. 사용자가 특정 카테고리의 협업툴을 선택하여 팀장에게 제안할 수 있도록 합니다.
  • src/widgets/teamroom/tool/ui/vote-tool/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/tool/ui/vote-tool/index.tsx에서 src/widgets/teamroom/tool/ui/vote-tool/index.tsx로 변경했습니다.
    • useSubmitAllToolVotes 훅에 id를 Number 타입으로 전달하도록 수정했습니다.
  • src/widgets/teamroom/tool/ui/vote-tool/ui/ToolItems.tsx
    • 파일 경로를 src/widgets/teamroom/setup/tool/ui/vote-tool/ui/ToolItems.tsx에서 src/widgets/teamroom/tool/ui/vote-tool/ui/ToolItems.tsx로 변경했습니다.
    • disabledTools prop을 추가하여 이미 확정된 툴을 비활성화하고 시각적으로 구분하도록 했습니다.
  • src/widgets/teamroom/tool/ui/vote-waiting/index.tsx
    • 파일 경로를 src/widgets/teamroom/setup/tool/ui/vote-waiting/index.tsx에서 src/widgets/teamroom/tool/ui/vote-waiting/index.tsx로 변경했습니다.
    • useVoteCountByCategory 훅에 id를 Number 타입으로 전달하도록 수정했습니다.
  • src/widgets/teamroom/tool/ui/vote-waiting/model/mapVoteCountToUi.ts
    • 파일 경로를 src/widgets/teamroom/setup/tool/ui/vote-waiting/model/mapVoteCountToUi.ts에서 src/widgets/teamroom/tool/ui/vote-waiting/model/mapVoteCountToUi.ts로 변경했습니다.
  • src/widgets/teamroom/tool/ui/vote-waiting/ui/VoteCountList.tsx
    • 파일 경로를 src/widgets/teamroom/setup/tool/ui/vote-waiting/ui/VoteCountList.tsx에서 src/widgets/teamroom/tool/ui/vote-waiting/ui/VoteCountList.tsx로 변경했습니다.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/deploy.yml
Activity
  • 이 PR은 아직 생성된 지 얼마 되지 않아, 현재까지는 특별한 사람의 활동(댓글, 리뷰 등)은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

Copilot AI 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.

Pull request overview

팀룸 내 협업툴 제안 플로우(요청/승인·반려) 및 알림 API 연동(포그라운드/백그라운드 수신 + 뱃지/토스트) 을 추가하고, 온보딩/로그인 리다이렉트 이슈를 보완하며, GTM 주입을 도입한 변경입니다. 기존 setup 경로로 흩어져 있던 tool/rule 관련 위젯들의 위치/의존성을 teamroom 하위로 정리하는 작업도 포함됩니다.

Changes:

  • 협업툴 제안 페이지/승인·반려 페이지 추가 및 대시보드에서 “요청하기” 진입 제공
  • 알림 API 연결(목록/읽음 처리) + FCM 포그라운드/백그라운드 수신 처리 및 UI 연결
  • 온보딩/로그인 리다이렉트 로직 보완 + GTM 설치 스크립트 주입

Reviewed changes

Copilot reviewed 48 out of 53 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
src/widgets/teamroom/tool/ui/vote-waiting/ui/VoteCountList.tsx 득표 현황 리스트 UI 추가
src/widgets/teamroom/tool/ui/vote-waiting/model/mapVoteCountToUi.ts vote count DTO import 경로 변경
src/widgets/teamroom/tool/ui/vote-waiting/index.tsx 카테고리별 득표 현황 조회/탭 구성 업데이트
src/widgets/teamroom/tool/ui/vote-tool/ui/ToolItems.tsx 비활성(확정 툴) 처리 지원
src/widgets/teamroom/tool/ui/vote-tool/index.tsx 협업툴 투표 제출 훅 경로/시그니처 변경 반영
src/widgets/teamroom/tool/proposal/index.tsx 협업툴 “요청하기(제안)” 페이지 신규
src/widgets/teamroom/tool/index.tsx tool setup 진입점 훅 경로/파라미터 타입 변경 반영
src/widgets/teamroom/rule/ui/voting-rule/index.tsx rule hooks/컴포넌트 경로 정리
src/widgets/teamroom/rule/ui/voting-rule/VotingRule.tsx 규칙 투표 카드 UI 신규
src/widgets/teamroom/rule/ui/voting-rule/RuleVotingNotice.tsx 규칙 투표 시작 안내 화면 신규
src/widgets/teamroom/rule/ui/vote-waitng/index.tsx rule vote 참여자 DTO 필드명 변경 반영
src/widgets/teamroom/rule/index.tsx rule hooks 경로 변경
src/widgets/teamroom/main/ui/TeamRoomBanner.tsx 팀룸 상단에 알림 아이콘 연결 + alt 보완
src/widgets/teamroom/main/ui/ContentsHeader.tsx 우측 버튼(편집/요청하기) 지원하도록 props 재구성
src/widgets/teamroom/main/dashboard/ui/Dashboard.tsx tool/rule 훅 경로 변경 + ToolContents에 제안 진입 전달
src/widgets/teamroom/main/dashboard/rule/RuleContents.tsx ContentsHeader props 변경 반영
src/widgets/teamroom/main/dashboard/Tool/ToolContents.tsx “요청하기” 버튼으로 제안 페이지 라우팅 추가
src/widgets/notification/ui/NotificationList.tsx 알림 더미 제거, API 기반 목록/읽음 처리 연결
src/widgets/notification/ui/NotificationItem.tsx 알림 DTO 필드명/disabled 처리 반영
src/widgets/mypage/index.tsx 알림 설정 메뉴 임시 비활성 주석 처리
src/widgets/home/HomeHeader.tsx 홈 헤더에 알림 아이콘 연결
src/vite-env.d.ts window.dataLayer 타입 추가
src/shared/ui/toast/toast-store.ts toast 클릭 콜백(onClick) 지원
src/shared/ui/toast/Toast.tsx toast 클릭 시 onClick 실행 + 제거
src/shared/ui/header/NotificationIcon.tsx 알림 뱃지 아이콘 신규(카운트 store 연동)
src/shared/ui/button/BottomButton.tsx 버튼 높이 스타일 조정(min-height)
src/shared/lib/gtm-install.ts GTM 스크립트 설치 유틸 신규
src/shared/api/auth/use-auth-bootstrap.ts 온보딩 페이지 redirectAfterLogin 저장 제외
src/shared/api/auth/refresh-token.ts accessToken decode 후 온보딩 상태 이벤트 처리
src/pages/teamroom/[id]/tool/proposal/index.tsx proposal 페이지 라우트 엔트리 추가
src/pages/teamroom/[id]/tool/proposal/[proposal-id]/index.tsx proposal 승인/반려 페이지 라우트 엔트리 추가
src/pages/teamroom/[id]/tool/index.tsx ToolSetupPage export 경로 변경
src/pages/teamroom/[id]/rule/index.tsx RuleSetupPage export 경로 변경
src/pages/home/index.tsx /home redirectAfterLogin 예외 처리
src/main.tsx 앱 시작 시 GTM 설치 호출
src/entities/tool/hooks/useTool.ts tool 관련 훅들 경로/시그니처 정리 + proposal detail 훅 추가
src/entities/tool/api/tool-keys.ts tool queryKey를 number 기반으로 정리 + proposalDetail 추가
src/entities/tool/api/tool-dto.ts tool proposal 관련 DTO 추가
src/entities/tool/api/tool-api.ts tool proposal API(요청/상세/승인·반려) 추가
src/entities/rule/hooks/useRule.ts rule API import 경로 변경
src/entities/rule/api/rule-keys.ts rule queryKey 신규 추가
src/entities/rule/api/rule-dto.ts RuleVoteMember 필드명 변경(userName→name)
src/entities/rule/api/rule-api.ts rule dto import 경로 변경
src/entities/notification/model/notification-store.ts 알림 카운트 zustand store 신규
src/entities/notification/model/fcm-payload.ts NotificationType를 API dto로 통합
src/entities/notification/hooks/useNotification.ts 알림 조회/읽음 처리 react-query 훅 신규
src/entities/notification/api/notification-dto.ts 알림 DTO/타입 신규
src/entities/notification/api/notification-api.ts 알림 API(get/read/read-all) 신규
src/app/AuthGuard.tsx 온보딩 상태 리다이렉트 보완 + FCM bg/fg 수신 처리/토스트 클릭 이동
src/App.tsx /notification 라우트 활성화 + tool proposal 라우트 추가
public/firebase-messaging-sw.template.js bg 메시지 수신 시 열린 탭에 postMessage 브로드캐스트
Dockerfile VITE_GTM_ID build arg/env 추가
.github/workflows/deploy.yml VITE_GTM_ID build-arg 전달 추가
Comments suppressed due to low confidence (5)

src/entities/tool/hooks/useTool.ts:33

  • 여러 훅에서 enabled: !!teamRoomId / !!proposalId를 사용하고 있는데, NaN도 truthy라서 Number(params) 결과가 NaN이어도 쿼리가 실행됩니다. Number.isFinite(teamRoomId)(필요 시 > 0까지)처럼 숫자 유효성 기반으로 enabled를 계산하고, queryKey/queryFn도 유효할 때만 숫자를 사용하도록 조정해 주세요.
    src/widgets/teamroom/tool/ui/vote-waiting/index.tsx:24
  • useVoteCountByCategory(Number(id), ...)에서 id가 없으면 Number(id)가 NaN이 되고, 현재 훅의 enabled: !!teamRoomId 로직상 NaN도 truthy라 쿼리가 실행됩니다. 라우트 파라미터를 숫자로 파싱한 뒤 Number.isFinite(teamRoomId) 같은 조건으로 유효성 검증 후에만 쿼리를 켜 주세요.
    src/widgets/teamroom/tool/index.tsx:25
  • useToolVoteParticipation(Number(id), true)에서 id가 없으면 Number(id)가 NaN이 되고, 훅의 enabled: !!teamRoomId 조건 때문에 쿼리가 실행될 수 있습니다. id를 먼저 숫자로 파싱/검증해서 유효할 때만 쿼리를 수행하도록 처리해 주세요.
    src/entities/tool/api/tool-api.ts:64
  • proposalTools의 응답 타입을 ProposalToolsRequest로 지정하고 있는데, 이는 요청 body 타입이라 응답과 의미가 섞입니다. 실제 API 응답 스펙에 맞는 별도 response 타입(예: 빈 객체/생성된 proposalId 등)을 정의해서 generic에 사용해 주세요.
    src/widgets/teamroom/tool/ui/vote-tool/index.tsx:22
  • Number(id) ?? 0는 id가 undefined여도 NaN을 반환하므로(널리시가 아님) fallback이 동작하지 않습니다. 이 값이 그대로 mutation에 전달되면 /team-rooms/NaN/... 요청이 나갈 수 있으니, id를 먼저 검증/파싱해서 유효한 숫자일 때만 훅을 호출하거나 안전한 기본값/리다이렉트를 적용해 주세요.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/app/AuthGuard.tsx Resolved
Comment thread src/shared/lib/gtm-install.ts Resolved

@gemini-code-assist gemini-code-assist 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.

Code Review

전반적으로 협업툴 제안, 알림 기능 구현 및 온보딩 리다이렉트 문제 해결 등 많은 개선이 이루어진 좋은 PR입니다. 특히 react-query의 캐시 관리 및 optimistic update를 잘 활용하여 사용자 경험을 개선한 점이 인상적입니다. 코드 구조 개선을 위한 파일 위치 변경도 좋은 리팩토링입니다. 다만, 메모리 누수 가능성이 있는 부분과 사용자 경험을 저해할 수 있는 alert 사용 등 몇 가지 개선점을 발견하여 의견을 남깁니다.

Comment thread src/app/AuthGuard.tsx Resolved
@jaqwe2301
jaqwe2301 merged commit 86326be into develop Mar 5, 2026
6 checks passed
@jaqwe2301
jaqwe2301 deleted the feat/proposal-tool branch March 5, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug 기능 오류, 화면 깨짐, 예외 발생 등 예상치 못한 문제 ✨ feature 새로운 기능 추가, 요구사항 반영 🔧 refactor 코드 리팩터링, 구조 개선, 클린 코드 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants