feat: 워크스페이스 생성 페이지 구현 (#13) - #20
Merged
Merged
Conversation
- 워크스페이스 생성 폼에 사용할 dialog / input / textarea / label 추가
- /workspaces/new 템플릿 선택 화면 + 클릭 시 생성 Dialog - 생성 Dialog: 선택 템플릿 요약·포함 기능 + 이름(필수)/설명 폼, react-hook-form + zod 검증 - entities/workspace: 템플릿 상세 config, create_workspace Mock (ERD RPC 형태) - 이름 입력 자동 포커스, X·ESC 닫기, 생성 후 목록으로 이동
📝 WalkthroughWalkthrough워크스페이스 생성용 템플릿 메타데이터, 생성 다이얼로그, 공용 UI 프리미티브, 그리고 Changes워크스페이스 생성 기능
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CreateWorkspacePage
participant TemplateSelectCard
participant CreateWorkspaceDialog
participant createWorkspace
User->>CreateWorkspacePage: /workspaces/new 접속
CreateWorkspacePage->>TemplateSelectCard: 템플릿 카드 렌더링
User->>TemplateSelectCard: 목적 선택
TemplateSelectCard->>CreateWorkspacePage: onSelect(purpose)
CreateWorkspacePage->>CreateWorkspaceDialog: purpose, open 전달
User->>CreateWorkspaceDialog: 이름/설명 입력 후 제출
CreateWorkspaceDialog->>createWorkspace: createWorkspace(input)
createWorkspace-->>CreateWorkspaceDialog: { id }
CreateWorkspaceDialog->>User: /workspaces로 라우팅
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/features/create-workspace/ui/CreateWorkspaceDialog.tsx`:
- Around line 73-151: The CreateWorkspaceDialog can render an empty
DialogContent when purpose data is missing because the current `meta && detail
&& PurposeIcon` check falls through to `null` while `open` is still true. Update
`CreateWorkspaceDialog` to guard earlier by preventing the dialog from opening
when `purpose` is null, or add a defensive early return before rendering the
dialog content so the empty overlay never appears. Use the existing
`CreateWorkspaceDialog` component and its `purpose`, `meta`, `detail`, and
`PurposeIcon` checks to locate the fix.
- Around line 52-57: `CreateWorkspaceDialog`의 `onSubmit`에서 `createWorkspace` 실패
시 예외가 처리되지 않아 `isSubmitting`이 영구적으로 true로 남는 문제가 있습니다. `onSubmit`을
try/catch/finally 구조로 감싸서 `createWorkspace` 호출 실패를 잡고, 실패 시 사용자에게 알림을 표시한 뒤
`setIsSubmitting(false)`가 항상 실행되도록 하세요. 성공 경로에서도 `router.push('/workspaces')`와
무관하게 `finally`에서 상태를 복구하도록 수정하면 됩니다.
In `@src/views/create-workspace/ui/TemplateSelectCard.tsx`:
- Around line 19-36: In TemplateSelectCard, the button content uses an h3
heading inside a <button>, which should be replaced with a non-heading element.
Update the title markup in the TemplateSelectCard component so the element
inside the button becomes a span (or div) while keeping the existing text styles
and structure unchanged.
🪄 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: e02f7e37-39e2-47d4-ba92-6c01c7b47bc9
📒 Files selected for processing (14)
src/app/workspaces/new/page.tsxsrc/entities/workspace/api/create-workspace.tssrc/entities/workspace/config/template.tssrc/entities/workspace/index.tssrc/features/create-workspace/index.tssrc/features/create-workspace/model/schema.tssrc/features/create-workspace/ui/CreateWorkspaceDialog.tsxsrc/shared/ui/dialog.tsxsrc/shared/ui/input.tsxsrc/shared/ui/label.tsxsrc/shared/ui/textarea.tsxsrc/views/create-workspace/index.tssrc/views/create-workspace/ui/CreateWorkspacePage.tsxsrc/views/create-workspace/ui/TemplateSelectCard.tsx
- 생성 실패 시 isSubmitting 리셋 및 에러 처리(try/catch) 추가 - purpose 없을 때 Dialog가 열리지 않도록 상위에서 가드 - 선택 카드 제목을 button 내부에서 유효하지 않은 h3 → span으로 교체
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
작업 내용
/workspaces/new워크스페이스 생성 페이지 구현 (템플릿 선택 → 생성 Dialog, 한 라우트)create_workspace로 생성 후 목록으로 이동작업 결과
/workspaces/new에서 팀 프로젝트 / 사이드 프로젝트 / 매장 운영 3종 템플릿 카드 표시/workspaces이동변경 사항
Added
entities/workspace— 템플릿 상세 config(WORKSPACE_TEMPLATE_DETAIL) +createWorkspaceMock(ERDcreate_workspaceRPC 형태)features/create-workspace— 생성 Dialog(react-hook-form+zod검증)views/create-workspace+src/app/workspaces/new/page.tsx(/workspaces/new라우트)dialog/input/textarea/label컴포넌트Changed
entities/workspacepublic API에 템플릿 config·생성 API export 추가Fixed
실행화면
테스트
리뷰 체크리스트
feature/*->develop, 배포 시develop또는release/*->main)Type/#issue-number/description형식을 따릅니다.console.log, 주석, 임시 코드를 제거했습니다.npm run check통과)리뷰 요청사항
create_workspace구조가 추후supabase.rpc('create_workspace')교체에 무리 없는지 확인 부탁드립니다.WORKSPACE_TEMPLATE_DETAIL)를entities/workspace에 두고 purpose(team-project...)로 매핑했습니다. develop의WorkspacePurpose(하이픈)와 정합.관련 이슈
Closes #13
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes