feat: 내 워크스페이스 페이지 구현 (#8) - #10
Conversation
- get_my_workspaces RPC 반환 형태에 맞춘 entities/workspace (타입/purpose 메타/Mock) - workspace-list 위젯: 카드 리스트 + 빈 상태 - views/workspaces 조립 및 /workspaces 라우트 추가 - shared/lib/date 상대 시간 포맷 유틸 - purpose(team_project/side_project/store/custom) 기반 프론트 표시 매핑, progress는 done/task 계산
- gap/p*/m*/space 계열 -[Npx] 임의값을 0.25 프리셋으로 강제하는 check 스크립트 - npm run check 체인에 lint:tw 포함 (eslint로 안 잡히던 규칙을 CI에서 차단)
- 좁은 화면(~320px)에서 완료 수가 긴 카드의 메타 행이 넘치지 않도록 flex-wrap 적용
- bg-[length:200%_auto] → bg-size-[200%_auto] (Tailwind v4 유틸리티, 시각 동등)
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughMock 데이터 기반 "내 워크스페이스" 페이지가 추가되었다(엔티티 타입/API, 목적 메타데이터, 상대 시간 유틸, WorkspaceCard/List/EmptyWorkspaces 위젯, 뷰/라우트). Tailwind spacing 검사 스크립트( Changes내 워크스페이스 페이지 구현
Tailwind 검사 및 Hero 스타일 수정
근무표 관련 파일 포맷 정리
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant AppPage as src/app/workspaces/page.tsx
participant WorkspacesPage
participant getMyWorkspaces
participant WorkspaceList
participant WorkspaceCard
AppPage->>WorkspacesPage: default render
WorkspacesPage->>getMyWorkspaces: 워크스페이스 목록 조회
getMyWorkspaces-->>WorkspacesPage: WorkspaceSummary[] 반환
WorkspacesPage->>WorkspaceList: workspaces 전달
alt 목록이 비어있음
WorkspaceList->>WorkspaceList: EmptyWorkspaces 렌더링
else 목록 존재
WorkspaceList->>WorkspaceCard: 각 workspace 전달
end
Possibly related PRs
Suggested reviewers: Poem토끼가 새 워크스페이스 문을 열고, 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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 `@package.json`:
- Around line 10-14: The README script table is out of sync with the
package.json `check` script: `check` now runs `lint:tw` in addition to `lint`,
`typecheck`, and `format:check`. Update the README entry for `npm run check` to
reflect the full current behavior, and make sure the description near the script
table stays consistent with the `check` definition in package.json.
In `@scripts/check-tailwind-spacing.mjs`:
- Around line 34-40: The spacing matcher in check-tailwind-spacing.mjs is too
broad and can flag example class text inside comments as real violations.
Tighten the scan around PATTERN and the line-processing logic so it ignores
comment content first—either strip // and /* */ comments before testing or limit
checks to actual string/class contexts—while preserving detection for real
Tailwind spacing classes.
- Around line 35-40: The RegExp in check-tailwind-spacing.mjs uses a nested
quantifier in the variant-prefix part, which can trigger catastrophic
backtracking on long alpha/hyphen strings. Update the PATTERN definition so the
prefix matching in the regex no longer uses the repeated nested group in the
RegExp construction, and keep the same matching behavior using a single
non-nested repetition in the variant-prefix portion.
In `@src/widgets/workspace-list/ui/WorkspaceCard.tsx`:
- Around line 14-15: WorkspaceCard의 purpose 매핑에서 WORKSPACE_PURPOSE_META[purpose]
결과가 없을 때 meta.icon을 바로 접근하면 런타임 예외가 발생하므로, meta를 WorkspaceCard에서 안전하게 검사하고 기본값
폴백을 추가하세요. WORKSPACE_PURPOSE_META와 PurposeIcon을 사용하는 흐름에서 purpose가 매핑에 없으면 대체
아이콘/메타를 사용하거나 렌더링을 건너뛰도록 처리해, supabase.rpc('get_my_workspaces')로 데이터 소스가 바뀌어도
undefined 접근이 일어나지 않게 수정하세요.
🪄 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: d25e8091-c3b8-4409-987b-887213bb8776
⛔ Files ignored due to path filters (1)
public/workspaces/empty-workspace.pngis excluded by!**/*.png,!public/**
📒 Files selected for processing (15)
package.jsonscripts/check-tailwind-spacing.mjssrc/app/workspaces/page.tsxsrc/entities/workspace/api/get-my-workspaces.tssrc/entities/workspace/config/purpose.tssrc/entities/workspace/index.tssrc/entities/workspace/model/types.tssrc/shared/lib/date.tssrc/views/workspaces/index.tssrc/views/workspaces/ui/WorkspacesPage.tsxsrc/widgets/landing/landing-hero/ui/HeroSection.tsxsrc/widgets/workspace-list/index.tssrc/widgets/workspace-list/ui/EmptyWorkspaces.tsxsrc/widgets/workspace-list/ui/WorkspaceCard.tsxsrc/widgets/workspace-list/ui/WorkspaceList.tsx
- 게이트 스크립트: 스캔 전 주석 제거로 주석 내 예시 클래스 오탐 방지
- 게이트 정규식 variant prefix를 유한 반복({0,10})으로 바운딩해 ReDoS 방지
- WorkspaceCard: purpose 미매핑 시 custom으로 폴백
- README 스크립트 표에 lint:tw 반영
- entities/workspace index 충돌 해결: develop(Workspace/mockWorkspace)와 목록 기능(WorkspaceSummary/getMyWorkspaces) 통합 - WorkspacePurpose를 develop 값(team-project/side-project/store-operation)으로 통일하고 중복 타입 제거 - purpose 미매핑 시 중립 폴백(FALLBACK_PURPOSE_META) 적용 - develop work-schedule 파일 prettier 포맷 정리
Pull Request
작업 내용
/workspaces) 구현작업 결과
/workspaces접속 시 Mock 워크스페이스 3종(팀 프로젝트·사이드 프로젝트·매장 운영) 카드 렌더링변경 사항
Added
entities/workspace—WorkspaceSummary타입(get_my_workspacesRPC 반환 shape),purpose표시 메타,getMyWorkspaces()Mockwidgets/workspace-list—WorkspaceCard/EmptyWorkspaces/WorkspaceListviews/workspaces+src/app/workspaces/page.tsx(/workspaces라우트)shared/lib/date— 상대 시간 포맷 유틸scripts/check-tailwind-spacing.mjs+npm run lint:tw(spacing-[Npx]→ 0.25 프리셋 강제,check체인에 포함)Changed
bg-[length:200%_auto]→bg-size-[200%_auto](Tailwind v4 유틸리티, 시각 동등)Fixed
flex-wrap처리실행화면
테스트
리뷰 체크리스트
feature/*->develop, 배포 시develop또는release/*->main)Type/#issue-number/description형식을 따릅니다.console.log, 주석, 임시 코드를 제거했습니다.npm run check통과)리뷰 요청사항
get_my_workspacesRPC 반환 형태(snake_case, progress 계산, updated_at)에 맞춰 두어 추후supabase.rpc(...)로 교체 시 매핑이 없도록 했습니다. ERD와 어긋나는 부분 있는지 봐주세요.workspaces.updated_at기준으로 잡았습니다 (get_my_workspaces에 없던 필드 → RPC가 updated_at도 반환하는 방향).check포함)이 팀에 맞는지 의견 부탁드립니다.관련 이슈
Closes #8
Summary by CodeRabbit
New Features
Bug Fixes
Documentation