feat: 스프린트 선택 필터 추가 및 SprintSelector공통화 - #81
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 34 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: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthrough진행률 차트 페이지가 URL의 Changes진행률 차트 스프린트 필터
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Browser
participant WorkspaceProgressChartPage
participant ProgressChartPage
participant ProgressChartView
participant SprintSelector
Browser->>WorkspaceProgressChartPage: ?sprint=id 요청
WorkspaceProgressChartPage->>ProgressChartPage: selectedSprintId 전달
ProgressChartPage->>ProgressChartView: selectedSprintId 전달
ProgressChartView->>SprintSelector: 스프린트 목록과 현재 선택 ID 전달
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/entities/side-project/sprint/ui/SprintSelector.tsx (1)
21-33: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win선택된 탭에 대한 웹 접근성(a11y) 속성 추가
스크린 리더 등의 보조 기기 사용자가 현재 선택된 스프린트를 명확히 인지할 수 있도록, 활성화된 링크에
aria-current="true"속성을 추가하는 것을 권장합니다.💡 제안하는 접근성 개선
<Link key={sprint.id} href={`?sprint=${sprint.id}`} scroll={false} + aria-current={isActive ? 'true' : undefined} className={cn(🤖 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/entities/side-project/sprint/ui/SprintSelector.tsx` around lines 21 - 33, Update the active sprint Link in SprintSelector to expose its selected state to assistive technologies by adding aria-current="true" only when isActive, while leaving inactive links without the attribute.
🤖 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/views/side-project/progress-chart/ui/ProgressChartView.tsx`:
- Around line 41-46: Extract the duplicated selected-sprint resolution into a
shared sprint-entity selector, such as resolveSelectedSprint(sprints,
selectedSprintId), preserving the selected-ID lookup and the
in-progress-then-latest fallback. Replace the inline logic in
src/views/side-project/progress-chart/ui/ProgressChartView.tsx lines 41-46 and
src/views/side-project/sprint-board/ui/SprintBoardView.tsx lines 51-55 with the
shared function call, while retaining undefined during loading.
---
Outside diff comments:
In `@src/entities/side-project/sprint/ui/SprintSelector.tsx`:
- Around line 21-33: Update the active sprint Link in SprintSelector to expose
its selected state to assistive technologies by adding aria-current="true" only
when isActive, while leaving inactive links without the attribute.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: b018a735-cba2-4ab7-b666-44f63e48cded
📒 Files selected for processing (6)
src/app/workspaces/[workspaceId]/progress-chart/page.tsxsrc/entities/side-project/sprint/index.tssrc/entities/side-project/sprint/ui/SprintSelector.tsxsrc/views/progress-chart/ui/ProgressChartPage.tsxsrc/views/side-project/progress-chart/ui/ProgressChartView.tsxsrc/views/side-project/sprint-board/ui/SprintBoardView.tsx
| // 선택값이 없거나 유효하지 않으면 데이터에서 현재 스프린트를 판정(진행 중 우선 → 없으면 최신). | ||
| // 로딩 중이면 undefined. | ||
| const sprint = sprintsQuery.data | ||
| ? (sprintsQuery.data.find((item) => item.id === selectedSprintId) ?? | ||
| resolveCurrentSprint(sprintsQuery.data)) | ||
| : undefined; |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
스프린트 판정 로직의 공통화 (DRY 원칙)
URL에서 전달받은 selectedSprintId로 스프린트를 찾고, 유효하지 않으면 현재 진행 중이거나 최신인 스프린트로 폴백하는 로직이 두 컴포넌트 간에 완전히 중복되어 있습니다. 향후 판정 로직 변경 시 유지보수를 원활하게 하기 위해, 해당 로직을 sprint 엔티티 내의 selector 함수(예: resolveSelectedSprint(sprints, selectedSprintId))로 분리하여 사용하는 것을 권장합니다.
src/views/side-project/progress-chart/ui/ProgressChartView.tsx#L41-L46: 중복된 판정 로직을 공통 함수 호출로 교체하세요.src/views/side-project/sprint-board/ui/SprintBoardView.tsx#L51-L55: 중복된 판정 로직을 동일한 공통 함수 호출로 교체하세요.
📍 Affects 2 files
src/views/side-project/progress-chart/ui/ProgressChartView.tsx#L41-L46(this comment)src/views/side-project/sprint-board/ui/SprintBoardView.tsx#L51-L55
🤖 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/views/side-project/progress-chart/ui/ProgressChartView.tsx` around lines
41 - 46, Extract the duplicated selected-sprint resolution into a shared
sprint-entity selector, such as resolveSelectedSprint(sprints,
selectedSprintId), preserving the selected-ID lookup and the
in-progress-then-latest fallback. Replace the inline logic in
src/views/side-project/progress-chart/ui/ProgressChartView.tsx lines 41-46 and
src/views/side-project/sprint-board/ui/SprintBoardView.tsx lines 51-55 with the
shared function call, while retaining undefined during loading.
Pull Request
작업 내용
SprintSelector, URL?sprint=id패턴)를 재사용SprintSelector를entities/side-project/sprint로 승격해 두 뷰가 공유하도록 공통화작업 결과
?sprint=id)에 반영되어 새로고침·공유 시에도 유지됨변경 사항
Added
src/entities/side-project/sprint/ui/SprintSelector.tsx— 스프린트 선택기(엔티티 계층으로 승격, named export)?sprint=idsearchParam 처리 추가Changed
src/entities/side-project/sprint/index.ts—SprintSelectorexport 추가src/app/workspaces/[workspaceId]/progress-chart/page.tsx—searchParams에서selectedSprintId추출·전달src/views/progress-chart/ui/ProgressChartPage.tsx—selectedSprintIdprop 스레딩(사이드 프로젝트 분기)src/views/side-project/progress-chart/ui/ProgressChartView.tsx— 선택 스프린트 판정(find ?? resolveCurrentSprint) +SprintSelector렌더src/views/side-project/sprint-board/ui/SprintBoardView.tsx— 승격된SprintSelectorimport 경로 변경Fixed
실행화면
테스트
tsc --noEmit) / 린트(eslint) 통과리뷰 체크리스트
feature/*->develop, 배포 시develop또는release/*->main)Type/#issue-number/description형식을 따릅니다.console.log, 주석, 임시 코드를 제거했습니다.리뷰 요청사항
관련 이슈
Closes #79
Summary by CodeRabbit