UAT 네비게이션 링크 라우팅 적용 - #171
Conversation
|
@coderabbitai approve |
Greptile Summary
Confidence Score: 4/5핵심 라우팅 기능은 올바르게 구현되었으며, P2 수준의 코드 정리 항목만 남아 있어 병합에 큰 문제는 없습니다. P2 이슈만 존재(미사용 변수, 고아 임포트, 경로 매칭 방식)하며 런타임 기능을 깨는 결함은 없습니다. P2만 있을 경우 4/5가 상한입니다. frontend/src/components/DashboardLayout.tsx — 미사용 임포트 및 변수 정리 필요 Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[사이드바 메뉴 클릭] --> B[NavLink 컴포넌트]
B --> C[usePathname 호출]
C --> D{pathname === href?}
D -- 일치 --> E[active 스타일 + aria-current=page]
D -- 불일치 --> F[기본 스타일]
E --> G[Next.js Link 렌더링]
F --> G
G --> H[페이지 이동]
H --> I[루트 - 받은 메일]
H --> J[ai-hub - AI Hub]
H --> K[prompt-studio - Prompt Studio]
H --> L[settings - 워크스페이스 설정]
Reviews (1): Last reviewed commit: "fix(frontend): implement actual Next.js ..." | Re-trigger Greptile |
✅ Actions performedComments resolved and changes approved. |
|
Note
|
| Layer / File(s) | Summary |
|---|---|
Route-aware navigation imports frontend/src/components/DashboardLayout.tsx |
Link and usePathname imports are added from Next.js to enable route-aware link rendering and pathname detection in the layout. |
NavLink component refactoring frontend/src/components/DashboardLayout.tsx |
NavLink component now accepts an optional href prop (defaulting to #main-content) and computes active state by comparing the current pathname from usePathname() against the provided href; the element switches from a plain anchor to a next/link wrapper. |
Navigation data and layout integration frontend/src/components/DashboardLayout.tsx |
mailNavItems dataset is redefined with new workspace and AI-related navigation entries; DashboardLayout calls usePathname() and simplifies the sidebar nav section to a single block that maps over mailNavItems and passes href to each NavLink for route-aware active state computation. |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🐰 Links now follow the path we roam,
No active props to find our home—
Next.js guides where we should go,
Workspace sections steal the show! ✨
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | 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 |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately describes the main change: implementing UAT navigation link routing in the dashboard layout, replacing dummy anchors with Next.js Link components for proper page routing. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
fix/dashboard-links-uat-20260511
Comment @coderabbitai help to get the list of available commands and usage tips.
|
PR governance metadata gate is not ready for
|
목표
사용자 인수 테스트(UAT) 과정에서 왼쪽 사이드바의 메뉴 버튼들이 실제 기능 페이지(
/settings,/ai-hub,/prompt-studio)로 라우팅되지 않고#main-content앵커로만 이동하는 결함을 해결합니다.변경 사항
DashboardLayout.tsx내의 더미 앵커 태그(<a>)를 Next.js의<Link>컴포넌트로 교체했습니다./ai-hub,/prompt-studio,/settings실제 페이지 경로들을 매핑하여 클릭 시 정상적으로 동작하도록 구성했습니다.active)를usePathname을 사용해 동적으로 하이라이팅되도록 수정했습니다.Summary by CodeRabbit
New Features
Improvements