Skip to content

[FIX] 인수인계서 관리 화면의 팀장/팀 하드코딩 제거 #680 - #681

Merged
zana0422-creator merged 1 commit into
developfrom
fix/team-handover-hardcoding#680
Aug 23, 2026
Merged

zana0422-creator merged 1 commit into
developfrom
fix/team-handover-hardcoding#680

Conversation

@hyun030514

Copy link
Copy Markdown
Contributor

📋 PR 타입

  • fix — 버그 수정
  • refactor — 리팩토링

🗂 작업 영역

  • 업무 — 보드 · 액션 · 프로젝트 · 인수인계

🙋 관련 역할

  • LEADER (팀장)

📝 작업 내용

#678에서 범위를 뺐던 team-handover/server.ts의 마지막 하드코딩을 고친다.

  • FIXED_LEADER_ID = 2·FIXED_LEADER_NAME = "김서준"·FIXED_TEAM_NAME = "개발팀" 상수 제거.
  • listTeamHandovers(teamName, leaderId)·getTeamHandoverDetail(handoverId, teamName)로 시그니처 변경 — getMyActionBoard와 같은 패턴(mock 분기는 값 없으면 즉시 throw).
  • 호출부 4곳이 전부 getViewer()가 준 실제 값을 실어 보내도록 스레딩:
    • /team/handover 목록 페이지 → listTeamHandovers(viewer.teamName, viewer.id)
    • /team/handover/:handoverId 상세 페이지 → getTeamHandoverDetail(id, viewer.teamName)
    • completeTeamHandoverAction/rejectTeamHandoverAction → getViewer()를 (기존엔 !isMock 분기 안에서만 불렀는데) 맨 위에서 한 번만 불러 teamName을 getTeamHandoverDetail에 넘기고, mock 중간승인 액터 스탬프도 FIXED_LEADER_NAME 대신 viewer.name을 쓴다.
  • 부수적으로 발견: 지우려던 상수 위 주석이 "세션이 없어 getViewer()는 항상 OWNER를 반환한다"고 돼 있었는데, 실제로는 viewer.ts가 2026-08-13에 /team/* 경로를 LEADER로 매핑하도록 채워지면서 이미 사실이 아니었다(/team/handover는 정확히 김서준을 돌려주고 있었다). 코드는 우연히 맞물려 있었지만 주석이 stale했다 — 이번에 정리했다.

바뀌지 않은 것: 실연동(!isMock) 분기의 canApproveMid(viewer, {teamId}) 팀 스코프 검사는 그대로다. 이번 변경은 mock 분기가 스코프를 잡는 방식(상수 → 파라미터)만 건드린다.


✅ 작업 체크리스트

기본

  • 브랜치 명명 규칙 준수 (fix/team-handover-hardcoding#680, base develop)
  • 커밋 컨벤션 준수 (type: 제목 #{이슈번호})
  • 아래 Closes # 에 이슈 번호 기입
  • 불필요한 console · 주석 처리된 코드 제거
  • 민감 정보 없음 (토큰 · 키 · .env)

Z 필수

  • 🔐 권한 2축 검사 — 실연동 canApproveMid 팀 스코프 검사는 그대로 유지, mock 분기의 소유권 판정 기준만 실제 로그인 사람으로 교정
  • 🧬 zod — 해당 없음
  • 🕵️ 정직성 — mock 분기는 값 없이는 조용히 빈 목록을 만들지 않고 바로 던지게 함
  • 🎨 디자인 토큰 — 해당 없음(UI 변경 없음)

품질


🔗 연관 이슈

Closes #680


📸 스크린샷 (선택)

Before After

💬 리뷰 포인트

  • completeTeamHandoverAction/rejectTeamHandoverAction에서 getViewer()를 무조건 맨 위로 옮긴 게 실연동 분기 동작에 영향 없는지(기존엔 !isMock 안에서만 불렀음) 재확인 부탁
  • 주석 정정(stale했던 "getViewer()는 항상 OWNER" 부분)이 다른 문서·주석과 안 어긋나는지

📝 추가 메모

  • 확인법: npx tsc --noEmit / npx eslint <변경 파일 5개> --max-warnings=0 / npx jest --silent(전체 155 스위트·1631건) / npx next build 전부 통과
  • 가벼운 적대적 리뷰(독립 리뷰어 2명 — 정합성/WORKFLOW.md 정책일치)로 사전 검증, findings 0건
  • 브라우저로 /team/handover 목록·상세 직접 렌더 확인 — 김서준(팀장)으로 정상 로드, 이하윤의 휴직 인수인계서 1건 정상 표시

@coderabbitai

coderabbitai Bot commented Aug 21, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 59 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 29a809c7-1fe8-4262-a3fe-ffd5f73fb63d

📥 Commits

Reviewing files that changed from the base of the PR and between b1ed34a and e8bb26b.

📒 Files selected for processing (5)
  • src/app/(shell)/(authority)/team/handover/[handoverId]/page.tsx
  • src/app/(shell)/(authority)/team/handover/page.tsx
  • src/features/team-handover/actions.real.test.ts
  • src/features/team-handover/actions.ts
  • src/features/team-handover/server.ts

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.

@hyun030514 hyun030514 added this to Z Aug 21, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Z Aug 21, 2026

@zana0422-creator zana0422-creator left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인했습니다

@zana0422-creator
zana0422-creator merged commit 77f95f9 into develop Aug 23, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Z Aug 23, 2026
@hyun030514

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FIX] 인수인계서 관리 화면의 팀장/팀 하드코딩 제거

2 participants