[Feature/#225] 사이드바 새 워크스페이스 클릭 시 생성 모달 오픈 - #226
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 Walkthrough개요사이드바의 새 워크스페이스 버튼이 쿼리 파라미터( 변경 사항쿼리 파라미터 기반 모달 자동 오픈
시퀀스 다이어그램sequenceDiagram
participant User
participant WorkspaceSwitcher
participant Router
participant WorkspacePage
participant Modal
User->>WorkspaceSwitcher: 새 워크스페이스 클릭
WorkspaceSwitcher->>Router: /workspace?create=1으로 이동
Router->>WorkspacePage: 라우트 로드
WorkspacePage->>WorkspacePage: useSearchParams로 쿼리 파라미터 확인
WorkspacePage->>WorkspacePage: create=1 감지
WorkspacePage->>Modal: onOpenCreate() 호출
Modal->>Modal: 생성 모달 열기
WorkspacePage->>Router: setSearchParams({}, {replace: true})로 파라미터 제거
코드 리뷰 난이도🎯 2 (Simple) | ⏱️ ~10 분 관련 PR
제안 검토자
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
📚 Storybook 배포 완료
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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/pages/workspace/Workspace.tsx`:
- Around line 108-113: The useEffect calls onOpenCreate but doesn't include it
in the dependency array; wrap the onOpenCreate handler in useCallback (so its
identity is stable) and then add onOpenCreate to the useEffect dependency array
alongside searchParams and setSearchParams; update the function where
onOpenCreate is defined to use React.useCallback and then modify the useEffect
signature to: useEffect(..., [searchParams, setSearchParams, onOpenCreate]).
🪄 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: CHILL
Plan: Pro
Run ID: 1170f884-9963-49c8-93ec-e6e8a4291059
📒 Files selected for processing (2)
src/components/sidebar/WorkspaceSwitcher.tsxsrc/pages/workspace/Workspace.tsx
🚨 관련 이슈
close #225
✨ 변경사항
✏️ 작업 내용
새 워크스페이스클릭 시/workspace?create=1로 이동하도록 변경Workspace페이지에서useSearchParams로create=1감지 후 기존onOpenCreate()호출 → 생성 모달 자동 오픈😅 미완성 작업
N/A
📢 논의 사항 및 참고 사항
N/A
Summary by CodeRabbit
릴리스 노트