Skip to content

feat: 워크스페이스 purpose별 navigation 분기 구현 (#15) - #16

Merged
seongjinss555 merged 1 commit into
developfrom
feat/#15/workspace-purpose-navigation
Jul 7, 2026
Merged

feat: 워크스페이스 purpose별 navigation 분기 구현 (#15)#16
seongjinss555 merged 1 commit into
developfrom
feat/#15/workspace-purpose-navigation

Conversation

@seongjinss555

@seongjinss555 seongjinss555 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Pull Request

작업 내용

  • 워크스페이스 purpose에 따라 사이드바/헤더 navigation 항목이 달라지도록 구성
  • store-operation, team-project, side-project navigation을 purpose 기준으로 매핑
  • WorkspaceShell에서 현재 workspace purpose를 기준으로 navigation 선택

작업 결과

  • 매장 운영 워크스페이스는 매장 운영 메뉴를 표시합니다.
  • 팀 프로젝트/사이드 프로젝트 워크스페이스도 각 purpose에 맞는 메뉴를 연결할 수 있는 구조가 됩니다.
  • WorkspaceSidebar, WorkspaceHeader가 특정 도메인 상수에 직접 의존하지 않고 props로 받은 navigationItems를 사용합니다.

변경 사항

Added

  • getWorkspaceNavigation 유틸 추가
  • purpose별 navigation map 추가

Changed

  • WorkspacePurpose 타입 분리 및 workspace public API export
  • WorkspaceShell에서 workspace purpose 기준 navigation 선택
  • WorkspaceSidebar, WorkspaceHeadernavigationItems props 기반으로 렌더링하도록 변경

Fixed

  • 사이드바/헤더가 매장 운영 navigation에만 고정되어 있던 구조 개선

실행화면

  • 로컬 확인 경로: http://localhost:3000/workspaces/test/work-schedule
  • 현재 mock workspace purpose가 store-operation이라 매장 운영 메뉴가 표시됩니다.

테스트

  • 로컬 실행 확인
  • 주요 시나리오 확인
  • 영향 범위 확인
  • npm run lint
  • npm run typecheck
  • npm run build

리뷰 체크리스트

  • PR base branch가 올바릅니다. (feature/* -> develop, 배포 시 develop 또는 release/* -> main)
  • 브랜치명이 Type/#issue-number/description 형식을 따릅니다.
  • 커밋 메시지가 컨벤션을 따릅니다.
  • 불필요한 console.log, 주석, 임시 코드를 제거했습니다.
  • 타입 에러와 린트 에러를 확인했습니다.
  • CodeRabbit 1차 리뷰를 확인했습니다.
  • CodeRabbit 리뷰 반영 후 Discord에 공유했습니다.
  • 최소 1명 이상의 approve 후 merge합니다.

리뷰 요청사항

  • purpose별 navigation config 위치와 FSD 계층이 적절한지 확인 부탁드립니다.
  • 추후 Supabase workspace 조회로 mockWorkspace를 교체하기 쉬운 구조인지 확인 부탁드립니다.
  • 전반적인 흐름
    → /workspaces/[workspaceId]/...
    → workspaceId로 workspace 조회
    → workspace.purpose 확인
    → purpose에 맞는 navigation config 선택
    → WorkspaceSidebar / WorkspaceHeader에 전달

관련 이슈

Closes #15
Refs #2

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

WorkspacePurpose 타입이 별도로 분리되어 entities 계층에서 export되었습니다. purpose별 navigation 항목 배열과 매핑, 그리고 이를 조회하는 getWorkspaceNavigation 유틸이 추가되었습니다. WorkspaceShell이 workspace와 navigationItems를 계산해 WorkspaceSidebar/WorkspaceHeader에 props로 전달하도록 변경되었으며, 두 컴포넌트는 고정 상수 대신 전달받은 props를 사용합니다.

Changes

워크스페이스 purpose별 navigation 분기

Layer / File(s) Summary
WorkspacePurpose 타입 정의 및 export
src/entities/workspace/model/workspace.types.ts, src/entities/workspace/index.ts
Workspace.purpose의 인라인 문자열 유니온을 WorkspacePurpose 타입 별칭으로 분리하고 entities 공개 API에서 함께 재-export합니다.
purpose별 navigation 매핑 및 조회 유틸
src/widgets/workspace-shell/model/workspace-navigation.ts, src/widgets/workspace-shell/lib/get-workspace-navigation.ts
sideProjectNavigationItems, teamProjectNavigationItems를 추가하고 workspaceNavigationByPurpose 매핑(satisfies Record<WorkspacePurpose, WorkspaceNavigationItem[]>)을 구성하며, purpose를 받아 해당 navigation을 반환하는 getWorkspaceNavigation 함수를 추가합니다.
WorkspaceShell/Sidebar/Header에 navigationItems 주입
src/widgets/workspace-shell/ui/WorkspaceShell.tsx, src/widgets/workspace-shell/ui/WorkspaceSidebar.tsx, src/widgets/workspace-shell/ui/WorkspaceHeader.tsx
WorkspaceShellmockWorkspacegetWorkspaceNavigation으로 workspace/navigationItems를 계산해 하위 컴포넌트에 전달하며, WorkspaceSidebarWorkspaceHeader는 고정 상수(mockWorkspace, storeOperationNavigationItems) 의존을 제거하고 props로 받은 값을 사용합니다. 알림 배지 및 토글 버튼의 클래스 토큰 순서도 함께 조정되었습니다.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant WorkspaceShell
  participant getWorkspaceNavigation
  participant workspaceNavigationByPurpose
  participant WorkspaceSidebar
  participant WorkspaceHeader

  WorkspaceShell->>WorkspaceShell: mockWorkspace로 workspace 생성
  WorkspaceShell->>getWorkspaceNavigation: workspace.purpose 전달
  getWorkspaceNavigation->>workspaceNavigationByPurpose: purpose 키 조회
  workspaceNavigationByPurpose-->>getWorkspaceNavigation: navigationItems 배열
  getWorkspaceNavigation-->>WorkspaceShell: navigationItems 반환
  WorkspaceShell->>WorkspaceSidebar: workspace, navigationItems 전달
  WorkspaceShell->>WorkspaceHeader: navigationItems 전달
  WorkspaceHeader->>WorkspaceHeader: getCurrentPageTitle(pathname, navigationItems)
Loading

Suggested reviewers: 0011810, JiWoongE, Kwon812

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed #15의 purpose별 navigation 분기, public export, 유틸 추가, Shell/Sidebar/Header 반영 요구를 모두 충족합니다.
Out of Scope Changes check ✅ Passed 요구사항과 무관한 변경은 보이지 않으며, className 순서 조정도 동작상 의미 있는 범위를 벗어나지 않습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed 제목이 워크스페이스 purpose별 navigation 분기 구현이라는 핵심 변경을 정확히 요약합니다.
Description check ✅ Passed 템플릿의 주요 섹션과 필수 정보가 모두 포함되어 있어 작업 내용, 결과, 테스트, 이슈를 충분히 설명합니다.
✨ 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 feat/#15/workspace-purpose-navigation

Comment @coderabbitai help to get the list of available commands.

@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: 4

🤖 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/widgets/workspace-shell/model/workspace-navigation.ts`:
- Around line 58-62: The current workspaceNavigationByPurpose mapping is fine
for widget-local use, but if sprint-board or notices need their own navigation
metadata, relocate this purpose-to-items map out of workspace-shell/model into a
shared workspace layer such as entities/workspace and keep the lookup in the
workspaceNavigationByPurpose symbol or a dedicated lib helper so page-specific
consumers can access it without depending on widget internals.
- Around line 45-56: The TODO above teamProjectNavigationItems is stale because
workspaceNavigationByPurpose already routes the 'team-project' purpose to this
navigation list. Update the comment to match the current implementation or
remove it entirely, and make sure the intent is clear in
workspaceNavigationByPurpose and teamProjectNavigationItems so future readers do
not think the sidebar hookup is still pending.
- Around line 34-56: The navigation definitions in workspace-navigation.ts
duplicate most items between sideProjectNavigationItems and
teamProjectNavigationItems, so extract the shared entries into a common base and
build each list by composing or extending it. Keep the unique differences
localized in the two arrays: the sprint-board label change, the notices item in
teamProjectNavigationItems, and any purpose-specific ordering or overrides. Use
the existing WorkspaceNavigationItem arrays and their item labels/hrefs/icons to
locate and refactor the shared navigation setup.

In `@src/widgets/workspace-shell/ui/WorkspaceShell.tsx`:
- Around line 17-18: The workspace lookup in WorkspaceShell should be wrapped
behind a dedicated accessor instead of reading mockWorkspace directly. Introduce
a thin getWorkspace(workspaceId) function and use it in WorkspaceShell when
deriving workspace and navigationItems, so the current mock implementation can
later be replaced with Supabase lookup without changing this component’s logic.
🪄 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: 3ee6acd8-00c3-4364-abb3-7fa67e913ac4

📥 Commits

Reviewing files that changed from the base of the PR and between 221e94f and 7c2ad60.

📒 Files selected for processing (7)
  • src/entities/workspace/index.ts
  • src/entities/workspace/model/workspace.types.ts
  • src/widgets/workspace-shell/lib/get-workspace-navigation.ts
  • src/widgets/workspace-shell/model/workspace-navigation.ts
  • src/widgets/workspace-shell/ui/WorkspaceHeader.tsx
  • src/widgets/workspace-shell/ui/WorkspaceShell.tsx
  • src/widgets/workspace-shell/ui/WorkspaceSidebar.tsx

Comment on lines +34 to +56
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];

// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

sideProjectNavigationItemsteamProjectNavigationItems의 항목 중복.

두 배열은 대시보드/캘린더/회의록/자료실/채팅/진행률 차트/설정 7개 항목이 동일하고, 스프린트보드↔프로젝트관리 라벨 및 공지 유무만 다릅니다. 공통 항목을 추출하면 향후 두 배열이 따로 갱신되며 어긋나는 것을 방지할 수 있습니다.

♻️ 공통 항목 추출 예시
+const commonProjectNavigationItems: WorkspaceNavigationItem[] = [
+  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  { label: '캘린더', href: 'calendar', icon: Calendar },
+  { label: '회의록', href: 'meeting-notes', icon: FileText },
+  { label: '자료실', href: 'files', icon: FileBox },
+  { label: '채팅', href: 'chat', icon: MessageSquare },
+  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
+  { label: '설정', href: 'settings', icon: Settings },
+];
+
 export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
-  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  commonProjectNavigationItems[0],
   { label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
-  { label: '캘린더', href: 'calendar', icon: Calendar },
-  { label: '회의록', href: 'meeting-notes', icon: FileText },
-  { label: '자료실', href: 'files', icon: FileBox },
-  { label: '채팅', href: 'chat', icon: MessageSquare },
-  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
-  { label: '설정', href: 'settings', icon: Settings },
+  ...commonProjectNavigationItems.slice(1),
 ];

 export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
-  { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
+  commonProjectNavigationItems[0],
   { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
-  { label: '캘린더', href: 'calendar', icon: Calendar },
+  commonProjectNavigationItems[1],
   { label: '공지', href: 'notices', icon: Bell },
-  { label: '회의록', href: 'meeting-notes', icon: FileText },
-  { label: '자료실', href: 'files', icon: FileBox },
-  { label: '채팅', href: 'chat', icon: MessageSquare },
-  { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
-  { label: '설정', href: 'settings', icon: Settings },
+  ...commonProjectNavigationItems.slice(2),
 ];
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
const commonProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
commonProjectNavigationItems[0],
{ label: '스프린트 보드', href: 'sprint-board', icon: Rocket },
...commonProjectNavigationItems.slice(1),
];
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
commonProjectNavigationItems[0],
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
commonProjectNavigationItems[1],
{ label: '공지', href: 'notices', icon: Bell },
...commonProjectNavigationItems.slice(2),
];
🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 34 -
56, The navigation definitions in workspace-navigation.ts duplicate most items
between sideProjectNavigationItems and teamProjectNavigationItems, so extract
the shared entries into a common base and build each list by composing or
extending it. Keep the unique differences localized in the two arrays: the
sprint-board label change, the notices item in teamProjectNavigationItems, and
any purpose-specific ordering or overrides. Use the existing
WorkspaceNavigationItem arrays and their item labels/hrefs/icons to locate and
refactor the shared navigation setup.

Comment on lines 45 to +56
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

TODO 주석이 이미 구현된 내용과 모순됩니다.

teamProjectNavigationItems 위의 TODO는 "팀 프로젝트 도메인을 만들 때 별도 purpose 전용 사이드바로 연결"하라고 되어 있지만, 바로 아래 workspaceNavigationByPurpose(라인 58-62)에서 이미 'team-project' purpose에 연결이 완료되어 있습니다. 이 상태로 두면 향후 팀원이 "아직 연결 안 됨"으로 오해할 수 있습니다.

📝 제안
-// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
+// team-project purpose 전용 navigation. 세부 페이지(예: 프로젝트 관리) 도메인이 추가되면 href/아이콘을 갱신하세요.
 export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// TODO: 팀 프로젝트 도메인을 만들 때 아래 메뉴를 별도 purpose 전용 사이드바로 연결합니다.
// export const sideProjectNavigationItems: WorkspaceNavigationItem[] = [
// { label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
// { label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
// { label: '캘린더', href: 'calendar', icon: Calendar },
// { label: '공지', href: 'notices', icon: Bell },
// { label: '회의록', href: 'meeting-notes', icon: FileText },
// { label: '자료실', href: 'files', icon: FileBox },
// { label: '채팅', href: 'chat', icon: MessageSquare },
// { label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
// { label: '설정', href: 'settings', icon: Settings },
// ];
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
// team-project purpose 전용 navigation. 세부 페이지(예: 프로젝트 관리) 도메인이 추가되면 href/아이콘을 갱신하세요.
export const teamProjectNavigationItems: WorkspaceNavigationItem[] = [
{ label: '대시보드', href: 'dashboard', icon: LayoutDashboard },
{ label: '프로젝트 관리', href: 'sprint-board', icon: Rocket },
{ label: '캘린더', href: 'calendar', icon: Calendar },
{ label: '공지', href: 'notices', icon: Bell },
{ label: '회의록', href: 'meeting-notes', icon: FileText },
{ label: '자료실', href: 'files', icon: FileBox },
{ label: '채팅', href: 'chat', icon: MessageSquare },
{ label: '진행률 차트', href: 'progress-chart', icon: BarChart3 },
{ label: '설정', href: 'settings', icon: Settings },
];
🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 45 -
56, The TODO above teamProjectNavigationItems is stale because
workspaceNavigationByPurpose already routes the 'team-project' purpose to this
navigation list. Update the comment to match the current implementation or
remove it entirely, and make sure the intent is clear in
workspaceNavigationByPurpose and teamProjectNavigationItems so future readers do
not think the sidebar hookup is still pending.

Comment on lines +58 to +62
export const workspaceNavigationByPurpose = {
'store-operation': storeOperationNavigationItems,
'team-project': teamProjectNavigationItems,
'side-project': sideProjectNavigationItems,
} satisfies Record<WorkspacePurpose, WorkspaceNavigationItem[]>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial

navigation 설정 위치는 현재로선 적절해 보입니다.

model(데이터)과 lib(조회 유틸)를 workspace-shell 위젯 하위로 분리한 구조는 현재 이 데이터가 해당 위젯에서만 소비된다는 점에서 타당합니다. satisfies Record<WorkspacePurpose, WorkspaceNavigationItem[]>로 purpose 누락을 컴파일 타임에 방지한 점도 좋습니다. 다만 향후 세부 페이지(예: sprint-board, notices)가 각자 자신의 navigation 메타데이터를 알아야 하는 시점이 오면, 이 매핑을 entities/workspace 등 더 상위 레이어로 승격하는 것을 고려하세요.

🤖 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/widgets/workspace-shell/model/workspace-navigation.ts` around lines 58 -
62, The current workspaceNavigationByPurpose mapping is fine for widget-local
use, but if sprint-board or notices need their own navigation metadata, relocate
this purpose-to-items map out of workspace-shell/model into a shared workspace
layer such as entities/workspace and keep the lookup in the
workspaceNavigationByPurpose symbol or a dedicated lib helper so page-specific
consumers can access it without depending on widget internals.

Comment on lines +17 to +18
const workspace = mockWorkspace; // 나중에는 workspaceId로 Supabase 조회
const navigationItems = getWorkspaceNavigation(workspace.purpose);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

향후 Supabase 교체를 대비해 workspace 조회를 함수로 캡슐화하는 것을 고려하세요.

현재 mockWorkspace를 컴포넌트 본문에서 직접 참조하고 있습니다. PR 목표상 이후 workspaceId로 Supabase 조회를 붙일 예정이므로, 지금 getWorkspace(workspaceId) 같은 얇은 함수(현재는 mock을 반환)로 감싸두면 실제 조회 로직 교체 시 이 파일의 변경 범위가 최소화됩니다.

♻️ 제안
-  const workspace = mockWorkspace; // 나중에는 workspaceId로 Supabase 조회
+  const workspace = getWorkspace(workspaceId); // 현재는 mock, 추후 Supabase 조회로 교체
// 예: src/entities/workspace/model/get-workspace.ts
export function getWorkspace(workspaceId: string): Workspace {
  // TODO: Supabase 조회로 교체
  return mockWorkspace;
}
🤖 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/widgets/workspace-shell/ui/WorkspaceShell.tsx` around lines 17 - 18, The
workspace lookup in WorkspaceShell should be wrapped behind a dedicated accessor
instead of reading mockWorkspace directly. Introduce a thin
getWorkspace(workspaceId) function and use it in WorkspaceShell when deriving
workspace and navigationItems, so the current mock implementation can later be
replaced with Supabase lookup without changing this component’s logic.

@Kwon812 Kwon812 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.

고생하셨습니다~

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 워크스페이스 purpose별 navigation 분기 구현

2 participants