[Feature/#292] DISCONNECTED 계정 재연동 및 해제 UI 정리 - #299
Conversation
📝 WalkthroughWalkthroughDISCONNECTED 상태의 기존 플랫폼 계정을 재연동하는 API와 페이지 흐름이 추가되었습니다. Changes플랫폼 계정 재연동
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PlatformIntegrationsPage
participant reconnectPlatformAccount
participant PlatformAPI
participant QueryCache
PlatformIntegrationsPage->>reconnectPlatformAccount: 재연동 요청
reconnectPlatformAccount->>PlatformAPI: PATCH reconnect 엔드포인트 호출
PlatformAPI-->>reconnectPlatformAccount: 완료 응답
reconnectPlatformAccount-->>PlatformIntegrationsPage: Promise<void>
PlatformIntegrationsPage->>QueryCache: 연결 목록 무효화
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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
🧹 Nitpick comments (1)
src/pages/integration/PlatformIntegrationsPage.tsx (1)
125-153: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
naverItem중복 조회를item으로 통합할 수 있습니다.
provider === "NAVER"일 때item이 이미 NAVER 항목이므로, 두 번째platformConnections.find호출은 불필요합니다. 동일한 객체를 다시 조회하고 있습니다.♻️ 제안: 중복 조회 제거
const item = platformConnections.find((p) => p.provider === provider); if (item?.status === "disconnected" && item.platformAccountId != null) { if (reconnectMutation.isPending) return; reconnectMutation.mutate({ orgId, accountId: item.platformAccountId, }); return; } - if (provider === "NAVER") { - const naverItem = platformConnections.find((p) => p.provider === "NAVER"); - - if (naverItem?.platformAccountId != null) { - setNaverModalMode("reconnect"); - setNaverCustomerId(naverItem.externalAccountId); - setIsNaverModalOpen(true); - return; - } + if (provider === "NAVER" && item?.platformAccountId != null) { + setNaverModalMode("reconnect"); + setNaverCustomerId(item.externalAccountId); + setIsNaverModalOpen(true); + return; } await startNewConnect(provider);🤖 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/pages/integration/PlatformIntegrationsPage.tsx` around lines 125 - 153, Remove the redundant platformConnections.find call inside handleConnect’s NAVER branch and reuse the existing item variable, preserving the current platformAccountId check and reconnect modal behavior.
🤖 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/integration/PlatformIntegrationsPage.tsx`:
- Around line 79-96: Pass reconnectMutation.isPending to PlatformIntegrationCard
through its loading-state prop, matching the existing
disconnectMutation.isPending-to-modal pattern. Ensure the reconnect action’s
“연동하기” button displays loading feedback and remains consistent with the existing
duplicate-call guard.
---
Nitpick comments:
In `@src/pages/integration/PlatformIntegrationsPage.tsx`:
- Around line 125-153: Remove the redundant platformConnections.find call inside
handleConnect’s NAVER branch and reuse the existing item variable, preserving
the current platformAccountId check and reconnect modal behavior.
🪄 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: 9f0d2f0a-f7ab-43b3-848d-8fdded244ce6
📒 Files selected for processing (6)
src/api/integration/platformAccounts.tssrc/components/integration/PlatformDisconnectModal.tsxsrc/components/integration/PlatformIntegrationCard.tsxsrc/pages/integration/PlatformIntegrationsPage.tsxsrc/types/integration/platformConnection.tssrc/utils/integration/mapPlatformAccounts.ts
🚨 관련 이슈
close #292
✨ 변경사항
✏️ 작업 내용
재연동 API
DISCONNECTED반영/api/platform/{orgId}/accounts/{accountId}/reconnect추가·연동연동 플로우
DISCONNECTED) 계정에서 「연동하기」 → OAuth/키 입력 없이 reconnect로 기존 계정 복구startNewConnect)안내 UI
카드 표시
미연동,연동 해제구분 (색상 동일)😅 미완성 작업
N/A
📢 논의 사항 및 참고 사항
Summary by CodeRabbit
새로운 기능
개선 사항
—표시).