feat: 슈퍼관리자 콘솔 백엔드 연동 및 알림 확인 버그 수정 - #66
Conversation
…all spaces Add force update/delete for spaces and full CRUD for problems that bypass per-space ADMIN ownership checks, scoped to SUPER_ADMIN only.
…firm Remove the mock interceptor for /api/super-admin/spaces and /problems so the console hits the real API, paginate through all results, and drop the now-stale demo-data banners. Add the notification bell to the space problem-bank page, surface confirm failures as a toast instead of only logging them, and filter already-confirmed notifications out of the list so confirmed items don't reappear.
|
Warning Review limit reached
Next review available in: 52 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough슈퍼 관리자용 공간·문제 강제 관리 API와 전체 문제 페이지 조회를 추가했습니다. 프론트엔드는 실제 관리 API와 페이지 순회 조회를 사용합니다. 공간 화면에는 SSE 기반 미확인 알림 조회, 표시, 확인 기능을 추가했습니다. Changes슈퍼 관리자 공간·문제 관리
알림 수신 및 표시
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant SpacePage
participant NotificationAPI
participant NotificationSSE
SpacePage->>NotificationAPI: 미확인 알림 초기 조회
NotificationAPI-->>SpacePage: 알림 목록 반환
NotificationSSE-->>SpacePage: 신규 알림 전달
SpacePage->>NotificationAPI: 알림 확인 요청
NotificationAPI-->>SpacePage: 확인 결과 반환
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
momogo-api/src/main/java/com/momogo/api/superadmin/SuperAdminController.java (1)
65-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSUPER_ADMIN API 통합 테스트를 추가하세요.
이 PR은 권한이 높은 수정·삭제 API와 페이지 응답 API를 추가하지만 자동화 테스트를 추가하지 않았습니다. 권한 설정,
404예외 변환,204응답, 페이지 응답 형식이 수동 검증에만 의존합니다.
MockMvc통합 테스트를 우선 사용하세요.SUPER_ADMIN의 성공 요청, 일반 사용자의403, 존재하지 않는 ID의404,Page의content및last필드를 검증하세요.컨트롤러 슬라이스 테스트는 빠릅니다. 통합 테스트는 서비스 위임과 삭제 정리 동작까지 검증할 수 있습니다. 이 변경에서는 통합 테스트가 더 적합합니다.
🤖 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 `@momogo-api/src/main/java/com/momogo/api/superadmin/SuperAdminController.java` around lines 65 - 124, SuperAdminController의 forceUpdateSpace, forceDeleteSpace, getAllProblems, forceUpdateProblem, forceDeleteProblem에 대한 MockMvc 통합 테스트를 추가하세요. SUPER_ADMIN 성공 요청과 일반 사용자의 403을 검증하고, 존재하지 않는 ID는 404로 변환되는지 확인하세요. 삭제 API의 204 응답과 문제 목록 Page 응답의 content 및 last 필드도 검증하며, 서비스 위임과 삭제 정리 동작까지 통합 테스트 범위에 포함하세요.
🤖 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 `@momogo-frontend/src/pages/SpacePage.tsx`:
- Around line 283-306: Update the notification-loading flow in the two useEffect
blocks so connectNotificationSse is established before requesting
/api/notifications, and only apply the GET results after the SSE connection has
opened and supplied its eventId. Extend connectNotificationSse’s callback
contract to expose the response eventId from the Connect or custom event, then
use that cursor when reconciling the fetched notification list so notifications
arriving between connection and GET are not lost.
---
Nitpick comments:
In
`@momogo-api/src/main/java/com/momogo/api/superadmin/SuperAdminController.java`:
- Around line 65-124: SuperAdminController의 forceUpdateSpace, forceDeleteSpace,
getAllProblems, forceUpdateProblem, forceDeleteProblem에 대한 MockMvc 통합 테스트를
추가하세요. SUPER_ADMIN 성공 요청과 일반 사용자의 403을 검증하고, 존재하지 않는 ID는 404로 변환되는지 확인하세요. 삭제
API의 204 응답과 문제 목록 Page 응답의 content 및 last 필드도 검증하며, 서비스 위임과 삭제 정리 동작까지 통합 테스트
범위에 포함하세요.
🪄 Autofix
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 Plus
Run ID: 8a774187-248f-4e81-a7c4-eb837b396393
📒 Files selected for processing (9)
momogo-api/src/main/java/com/momogo/api/superadmin/SuperAdminController.javamomogo-core/src/main/java/com/momogo/core/domain/problem/repository/ProblemRepository.javamomogo-core/src/main/java/com/momogo/core/domain/problem/service/ProblemService.javamomogo-core/src/main/java/com/momogo/core/domain/problem/service/ProblemServiceImpl.javamomogo-core/src/main/java/com/momogo/core/domain/space/service/SpaceService.javamomogo-core/src/main/java/com/momogo/core/domain/space/service/SpaceServiceImpl.javamomogo-frontend/src/pages/DashboardPage.tsxmomogo-frontend/src/pages/SpacePage.tsxmomogo-frontend/src/services/api.ts
💤 Files with no reviewable changes (1)
- momogo-frontend/src/services/api.ts
Connect the SSE stream first and only fetch GET /api/notifications after the server's connect event is received, so notifications created between the list fetch and the SSE connection are no longer lost. connectNotificationSse now exposes the connect event's id via an onConnect callback.
작업 내용
슈퍼관리자 제어 콘솔의 "전체 공간 관리"/"전체 문제 제어" 화면을 실제 백엔드 API와 연동하고, 알림 "확인" 버튼이 동작하지 않던 문제를 수정했습니다.
변경 사항
체크리스트
참고 사항
compileJava통과, 로컬 기동(컨텍스트 로딩) 확인tsc --noEmit타입체크 통과관련 이슈
Summary by CodeRabbit
새 기능
개선