Skip to content

[feat] 어드민 검수 요청 페이지 개선#686

Merged
seaniiio merged 4 commits into
developfrom
feature/#685
Jun 18, 2026
Merged

[feat] 어드민 검수 요청 페이지 개선#686
seaniiio merged 4 commits into
developfrom
feature/#685

Conversation

@seaniiio

@seaniiio seaniiio commented Jun 18, 2026

Copy link
Copy Markdown
Member

Issues

✔️ Check-list

  • : Label을 지정해 주세요.
  • : Merge할 브랜치를 확인해 주세요.

🗒️ Work Description

  • 나에게 온 검수 요청만 확인할 수 있는 탭 추가
image
  • 전체 pending 콘텐츠 목록에서 담당자 확인할 수 있게 수정
image
  • 알림창에 나에게 온 검수 요청 수를 띄우도록 수정
image
  • 위의 개선사항에 의해 추가된 API
    • /api/v1/admin/content-pendings/my-list: 나에게 온 검수 요청 확인 API
    • /api/v1/admin/content-pendings/my-count: 나에게 온 검수 요청 수 확인 API

📷 Screenshot

📚 Reference

Summary by CodeRabbit

새로운 기능

  • 검수 대기 목록에 탭 기능 추가: "내 검수 요청"과 "전체 검수 요청"으로 필터링 가능
  • 각 검수 항목의 담당자(검증자) 정보 표시 기능 추가
  • 관리자 알림 배지가 개인에게 할당된 검수 항목만 기준으로 표시되도록 개선
  • 알림 드롭다운 헤더 및 빈 상태 메시지 개선

@seaniiio seaniiio self-assigned this Jun 18, 2026
@github-actions github-actions Bot requested a review from eunseongu June 18, 2026 06:16
@seaniiio seaniiio added 🤙🏽 메이 우아한 테크코스 7기 백엔드 메이 💻 BackEnd 백엔드얌 📝 feat labels Jun 18, 2026
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

ContentPendingRepository에 검증자 계정 기준의 조회/카운트 쿼리 메서드를 추가하고, 서비스·컨트롤러 레이어를 통해 /my-list·/my-count API를 신규 제공한다. PendingListResponsevalidatorNickname 필드를 추가하며, 홈 알림 드롭다운과 검수 대기 목록 화면을 담당자 필터링 및 탭 UI로 개선한다.

Changes

담당자 기준 검수 요청 필터링 및 UI 개선

Layer / File(s) Summary
Repository 쿼리 및 응답 DTO 확장
backend/turip-app/src/main/java/turip/content/repository/ContentPendingRepository.java, backend/turip-admin/src/main/java/turip/controller/dto/response/PendingListResponse.java
ContentPendingRepository에 상태+검증자 계정 기준 countByStatusAndValidatorAccount, findAllByStatusAndValidatorAccountOrderByIdDesc 메서드를 추가하고, PendingListResponse 레코드에 validatorNickname 필드 및 null 분기 팩토리 로직을 추가했다.
서비스 및 컨트롤러 API 추가
backend/turip-admin/src/main/java/turip/service/AdminContentPendingService.java, backend/turip-admin/src/main/java/turip/controller/AdminPendingContentController.java
AdminContentPendingServicefindByValidatorAccount, countMyPending 메서드를 추가하고, AdminPendingContentController/my-list, /my-count GET 엔드포인트를 노출했다.
홈 알림 드롭다운 UI 변경
backend/turip-admin/src/main/resources/templates/admin/home.html
알림 드롭다운 헤더 문구, 목록 로딩 API(my-list), 빈 상태 메시지를 변경하고, 배지 갱신 로직을 my-count API 기반으로 수정했다.
검수 대기 목록 탭 UI 및 담당자 컬럼 추가
backend/turip-admin/src/main/resources/templates/admin/pending-list.html
내 검수 요청/전체 검수 요청 탭 UI 및 수집자/담당자 컬럼을 추가하고, switchTab·loadPendingList 로직을 탭별 API 엔드포인트 분기 및 validatorNickname 유무에 따른 미배정 배지 표시로 구현했다.
서비스 및 API 통합 테스트 추가
backend/turip-admin/src/test/java/turip/service/AdminContentPendingServiceTest.java, backend/turip-admin/src/test/java/turip/controller/AdminPendingContentApiTest.java
FindByValidatorAccount, FindMyPendingTest, CountMyPendingTest 테스트 클래스를 추가해 200/빈 데이터/비관리자 403 케이스를 검증한다.

추정 코드 리뷰 노력

🎯 3 (Moderate) | ⏱️ ~20 minutes

제안 레이블

🏝️ 하루, 💻 BackEnd, 📝 feat

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main feature: improving the admin inspection request page by adding tabs and assignee visibility.
Description check ✅ Passed The PR description includes all required template sections with clear work descriptions, screenshots, and the closed issue reference #685.
Linked Issues check ✅ Passed All three objectives from issue #685 are fully addressed: assignee visibility added, user-specific notifications implemented, and all-requests tab created.
Out of Scope Changes check ✅ Passed All changes are directly related to the three main objectives outlined in issue #685; no out-of-scope modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#685

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
backend/turip-admin/src/test/java/turip/controller/AdminPendingContentApiTest.java (1)

560-566: ⚡ Quick win

my-list 성공 케이스에서 validatorNickname 응답 검증을 추가해 주세요.

이번 변경의 핵심 계약(담당자 가시성)인데 현재 성공 테스트가 해당 필드를 확인하지 않아 회귀를 놓칠 수 있습니다.

검증 라인 추가 예시
                     .body("[0].videoTitle", is("테스트 비디오"))
                     .body("[0].channelName", is("테스트 채널"))
                     .body("[0].collectorNickname", notNullValue())
+                    .body("[0].validatorNickname", notNullValue())
                     .body("[0].createdAt", notNullValue());
🤖 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
`@backend/turip-admin/src/test/java/turip/controller/AdminPendingContentApiTest.java`
around lines 560 - 566, The test assertions for the my-list success case are
missing validation for the validatorNickname field, which is a critical contract
of this change. Add a body assertion for [0].validatorNickname using
notNullValue() matcher in the AdminPendingContentApiTest test method, following
the same pattern as the existing field validations like collectorNickname and
createdAt to ensure regression testing covers this important field.
backend/turip-admin/src/test/java/turip/service/AdminContentPendingServiceTest.java (1)

381-425: ⚡ Quick win

countMyPending() 서비스 단위 테스트도 함께 추가해 주세요.

신규 서비스 메서드가 추가됐는데, 현재 이 파일에는 findByValidatorAccount()만 검증되어 있어 status + validator 인자 전달 회귀를 바로 잡기 어렵습니다. 간단한 단위 테스트 1개를 추가하면 안정성이 올라갑니다.

테스트 추가 예시
+    `@DisplayName`("countMyPending() 테스트")
+    `@Nested`
+    class CountMyPending {
+
+        `@DisplayName`("validator 기준 PENDING 개수를 조회할 수 있다")
+        `@Test`
+        void countMyPending1() {
+            // given
+            given(contentPendingRepository.countByStatusAndValidatorAccount(
+                    ContentPendingStatus.PENDING, validatorAccount
+            )).willReturn(2L);
+
+            // when
+            long count = adminContentPendingService.countMyPending(validatorAccount);
+
+            // then
+            assertAll(
+                    () -> assertThat(count).isEqualTo(2L),
+                    () -> verify(contentPendingRepository).countByStatusAndValidatorAccount(
+                            ContentPendingStatus.PENDING, validatorAccount)
+            );
+        }
+    }
🤖 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
`@backend/turip-admin/src/test/java/turip/service/AdminContentPendingServiceTest.java`
around lines 381 - 425, Add a new unit test for the countMyPending() service
method in this test file. Create a new nested test class similar to the existing
FindByValidatorAccount class, and add a test method that verifies
countMyPending() correctly returns the count of pending contents for a given
validator account. Mock the repository method call to return an expected count,
then assert that the service method returns the correct value and that the
repository was called with the proper ContentPendingStatus.PENDING and validator
account arguments.
backend/turip-app/src/main/java/turip/content/repository/ContentPendingRepository.java (1)

23-30: 상태+담당자 조건 조회에 맞춘 복합 인덱스를 운영 환경에서 검토해 주세요.

/my-list, /my-countstatus + validator_account 조건을 반복 사용하므로, 데이터가 커지면 count/list 모두 스캔 비용이 커질 수 있습니다. content_pending(status, validator_account_id, id) 계열 인덱스를 두면 응답 지연을 줄이기 좋습니다.

🤖 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
`@backend/turip-app/src/main/java/turip/content/repository/ContentPendingRepository.java`
around lines 23 - 30, The methods countByStatusAndValidatorAccount and
findAllByStatusAndValidatorAccountOrderByIdDesc perform repeated queries using
the status and validator_account combination as filter conditions. Create a
composite database index on the content_pending table with columns (status,
validator_account_id, id) to optimize query performance and reduce scan costs.
This index should be added to the database migration or schema definition for
the production environment to improve response times for the /my-list and
/my-count endpoints.
🤖 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.

Nitpick comments:
In
`@backend/turip-admin/src/test/java/turip/controller/AdminPendingContentApiTest.java`:
- Around line 560-566: The test assertions for the my-list success case are
missing validation for the validatorNickname field, which is a critical contract
of this change. Add a body assertion for [0].validatorNickname using
notNullValue() matcher in the AdminPendingContentApiTest test method, following
the same pattern as the existing field validations like collectorNickname and
createdAt to ensure regression testing covers this important field.

In
`@backend/turip-admin/src/test/java/turip/service/AdminContentPendingServiceTest.java`:
- Around line 381-425: Add a new unit test for the countMyPending() service
method in this test file. Create a new nested test class similar to the existing
FindByValidatorAccount class, and add a test method that verifies
countMyPending() correctly returns the count of pending contents for a given
validator account. Mock the repository method call to return an expected count,
then assert that the service method returns the correct value and that the
repository was called with the proper ContentPendingStatus.PENDING and validator
account arguments.

In
`@backend/turip-app/src/main/java/turip/content/repository/ContentPendingRepository.java`:
- Around line 23-30: The methods countByStatusAndValidatorAccount and
findAllByStatusAndValidatorAccountOrderByIdDesc perform repeated queries using
the status and validator_account combination as filter conditions. Create a
composite database index on the content_pending table with columns (status,
validator_account_id, id) to optimize query performance and reduce scan costs.
This index should be added to the database migration or schema definition for
the production environment to improve response times for the /my-list and
/my-count endpoints.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 782ac865-d0a0-4847-b0a4-032352467e88

📥 Commits

Reviewing files that changed from the base of the PR and between 42c2de3 and e42e188.

📒 Files selected for processing (8)
  • backend/turip-admin/src/main/java/turip/controller/AdminPendingContentController.java
  • backend/turip-admin/src/main/java/turip/controller/dto/response/PendingListResponse.java
  • backend/turip-admin/src/main/java/turip/service/AdminContentPendingService.java
  • backend/turip-admin/src/main/resources/templates/admin/home.html
  • backend/turip-admin/src/main/resources/templates/admin/pending-list.html
  • backend/turip-admin/src/test/java/turip/controller/AdminPendingContentApiTest.java
  • backend/turip-admin/src/test/java/turip/service/AdminContentPendingServiceTest.java
  • backend/turip-app/src/main/java/turip/content/repository/ContentPendingRepository.java

@seaniiio seaniiio merged commit 8b5a5bc into develop Jun 18, 2026
5 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 18, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 BackEnd 백엔드얌 📝 feat 🤙🏽 메이 우아한 테크코스 7기 백엔드 메이

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[feat] 어드민 검수 요청 페이지 개선

1 participant