Skip to content

[FE] 관리자 페이지 피드백 확인하기 페이지#353

Merged
discipline24 merged 1 commit into
mainfrom
20260405_FE]352-기능추가fe-피드백-확인-페이지-추가
Apr 5, 2026

Hidden character warning

The head ref may contain hidden characters: "20260405_FE]352-\uae30\ub2a5\ucd94\uac00fe-\ud53c\ub4dc\ubc31-\ud655\uc778-\ud398\uc774\uc9c0-\ucd94\uac00"
Merged

[FE] 관리자 페이지 피드백 확인하기 페이지#353
discipline24 merged 1 commit into
mainfrom
20260405_FE]352-기능추가fe-피드백-확인-페이지-추가

Conversation

@sangkyu39
Copy link
Copy Markdown
Contributor

@sangkyu39 sangkyu39 commented Apr 5, 2026

관리자 페이지에 피드백 확인하기 페이지 추가

Summary by CodeRabbit

  • 새 기능
    • 관리자가 사용자로부터 수집된 피드백을 확인할 수 있는 새로운 페이지가 추가되었습니다.
    • 관리자 네비게이션 메뉴의 "피드백 확인하기" 항목을 통해 페이지에 접근할 수 있습니다.
    • 생성일 최신순으로 정렬되며 페이지네이션 기능이 포함된 피드백 목록을 조회할 수 있습니다.
    • 새로고침 버튼으로 피드백 목록을 갱신할 수 있으며, 다양한 기기에서 최적화된 레이아웃을 지원합니다.

Copilot AI review requested due to automatic review settings April 5, 2026 05:14
@sangkyu39 sangkyu39 requested a review from discipline24 as a code owner April 5, 2026 05:14
@sangkyu39 sangkyu39 linked an issue Apr 5, 2026 that may be closed by this pull request
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 5, 2026

개요

관리자가 사용자 피드백을 확인할 수 있는 새로운 페이지와 기능을 추가했습니다. /admin/feedbacks 경로에 라우팅을 등록하고, 페이지네이션을 지원하는 피드백 목록 컴포넌트 및 API 유틸리티를 구현하며, 사이드바에 네비게이션 항목을 추가했습니다.

변경사항

코호트 / 파일 요약
라우팅 및 페이지 추가
frontend/src/App.jsx, frontend/src/pages/AdminFeedback.jsx
새로운 /admin/feedbacks 관리자 라우트를 추가하고, AdminFeedback 페이지 컴포넌트를 구현하여 기본 레이아웃(헤더, 사이드바, 콘텐츠 영역)을 제공합니다.
피드백 목록 컴포넌트
frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
페이지네이션을 지원하는 피드백 목록 컴포넌트를 구현합니다. 페이지 크기 10으로 고정하고, 로딩/에러 상태를 처리하며, 이전/다음 버튼과 새로고침 기능을 제공합니다.
API 통합
frontend/src/utils/adminFeedbackApi.js
백엔드 /api/admin/feedbacks 엔드포인트를 호출하는 getAdminFeedbacks 함수를 추가합니다. 페이지와 크기 파라미터를 지원하며 생성일 기준 내림차순 정렬을 수행합니다.
스타일링
frontend/src/components/AdminFeedback/AdminFeedbackList.module.css, frontend/src/pages/AdminFeedback.module.css
반응형 레이아웃, 페이지네이션 버튼, 오류 상태, 로딩 인디케이터 등을 위한 CSS 모듈을 추가합니다. 모바일 breakpoint(768px)에서 레이아웃을 조정합니다.
네비게이션 업데이트
frontend/src/components/AdminHome/AdminSidebar.jsx
사이드바에 "피드백 확인하기" 메뉴 항목을 추가하여 /admin/feedbacks로 연결하고, MessageSquare 아이콘을 임포트합니다.

예상 코드 리뷰 난이도

🎯 3 (중간) | ⏱️ ~20분

관련 이슈

관련 PR

제안된 리뷰어

  • discipline24
  • gxuoo
  • DongEun02

체리 토끼의 축하시

🐰 피드백을 확인하는 길,
관리자의 손길이 닿으니,
페이지 위를 자유로이 넘나들며,
데이터는 춤을 춥니다! 💫

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 PR의 주요 변경사항을 명확하게 요약하고 있습니다. 관리자 페이지에 피드백 확인 페이지를 추가한 변경사항을 정확하게 설명합니다.

✏️ 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 20260405_FE]352-기능추가fe-피드백-확인-페이지-추가

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

관리자 영역에서 사용자 피드백 목록을 조회할 수 있는 신규 페이지를 추가하여, 운영자가 접수된 피드백을 페이지네이션/새로고침으로 확인할 수 있게 합니다.

Changes:

  • 관리자 피드백 목록 조회 API 유틸(getAdminFeedbacks) 추가
  • /admin/feedbacks 라우팅 및 사이드바 메뉴 항목 추가
  • 관리자 피드백 목록 UI(페이지/리스트 컴포넌트 및 CSS) 신규 구현

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/utils/adminFeedbackApi.js 관리자 피드백 페이지네이션 조회 API 래퍼 추가
frontend/src/pages/AdminFeedback.module.css 관리자 피드백 페이지 레이아웃 스타일 추가
frontend/src/pages/AdminFeedback.jsx 관리자 피드백 페이지(헤더/사이드바/리스트) 구성 추가
frontend/src/components/AdminHome/AdminSidebar.jsx 관리자 사이드바에 “피드백 확인하기” 메뉴 추가
frontend/src/components/AdminFeedback/AdminFeedbackList.module.css 피드백 리스트/페이지네이션/로딩 상태 UI 스타일 추가
frontend/src/components/AdminFeedback/AdminFeedbackList.jsx 피드백 목록 조회, 상태 처리(로딩/에러), 페이지네이션 UI 구현
frontend/src/App.jsx /admin/feedbacks 라우트 등록

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
Comment thread frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
Comment thread frontend/src/App.jsx
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
frontend/src/utils/adminFeedbackApi.js (1)

3-13: 페이지/사이즈 파라미터를 방어적으로 보정해두면 더 안전합니다.

Line 11~12는 toInt 결과를 그대로 사용해서 page < 0 또는 size <= 0 값이 그대로 전송될 수 있습니다. 유틸 레벨에서 한 번 보정해두면 호출처가 늘어나도 안전합니다.

제안 diff
 export const getAdminFeedbacks = async ({ page = 0, size = 10 } = {}) => {
+  const safePage = Math.max(0, toInt(page, 0));
+  const safeSize = Math.max(1, toInt(size, 10));
   const response = await api.get('/api/admin/feedbacks', {
     params: {
-      page: toInt(page, 0),
-      size: toInt(size, 10),
+      page: safePage,
+      size: safeSize,
       sort: 'createdDate,desc',
     },
   });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@frontend/src/utils/adminFeedbackApi.js` around lines 3 - 13,
getAdminFeedbacks currently passes the raw toInt results for page and size which
allows negative or zero sizes to be sent; clamp and sanitize the values inside
getAdminFeedbacks (use toInt(page,0) and toInt(size,10) then enforce page =
Math.max(0, page) and size = Math.max(1, size) and optionally cap size to a
sensible max) so the params sent by getAdminFeedbacks are always non-negative
page and positive size; update the params object in getAdminFeedbacks to use
these sanitized variables and keep using the helper toInt for parsing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@frontend/src/components/AdminFeedback/AdminFeedbackList.jsx`:
- Around line 43-46: In the catch block that currently calls setFeedbacks([])
and setError(...), also reset the component's pagination/metadata state so the
UI labels don't show stale values — e.g. call the relevant setters such as
setPage(1) and setTotalCount(0) (or reset any state variables like totalCount,
currentPage, pageSize) alongside setFeedbacks and setError so the top count/page
labels reflect the empty/error state; update the catch block in
AdminFeedbackList.jsx where setFeedbacks and setError are called.
- Around line 31-53: The fetchFeedbacks useCallback currently lists page in its
dependency array causing a new function reference whenever page changes and
triggering the useEffect that calls fetchFeedbacks(0), which resets pagination;
fix this by removing page from the dependency array of useCallback for
fetchFeedbacks and change its parameter default from (nextPage = page) to
(nextPage = 0) so it no longer closes over page, keeping the rest of the logic
(calls to getAdminFeedbacks, PAGE_SIZE, setFeedbacks, setPage, setTotalPages,
setTotalElements, setError, setIsLoading) unchanged and leaving the useEffect(()
=> { fetchFeedbacks(0) }, [fetchFeedbacks]) as-is.

---

Nitpick comments:
In `@frontend/src/utils/adminFeedbackApi.js`:
- Around line 3-13: getAdminFeedbacks currently passes the raw toInt results for
page and size which allows negative or zero sizes to be sent; clamp and sanitize
the values inside getAdminFeedbacks (use toInt(page,0) and toInt(size,10) then
enforce page = Math.max(0, page) and size = Math.max(1, size) and optionally cap
size to a sensible max) so the params sent by getAdminFeedbacks are always
non-negative page and positive size; update the params object in
getAdminFeedbacks to use these sanitized variables and keep using the helper
toInt for parsing.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 15a04de7-c790-4e55-948d-b5c743fb260c

📥 Commits

Reviewing files that changed from the base of the PR and between 2bbca4c and 72bcc3c.

📒 Files selected for processing (7)
  • frontend/src/App.jsx
  • frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
  • frontend/src/components/AdminFeedback/AdminFeedbackList.module.css
  • frontend/src/components/AdminHome/AdminSidebar.jsx
  • frontend/src/pages/AdminFeedback.jsx
  • frontend/src/pages/AdminFeedback.module.css
  • frontend/src/utils/adminFeedbackApi.js

Comment thread frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
Comment thread frontend/src/components/AdminFeedback/AdminFeedbackList.jsx
Copy link
Copy Markdown
Contributor

@discipline24 discipline24 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~

@discipline24 discipline24 merged commit 5b142de into main Apr 5, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚙️ [기능추가][FE] 피드백 확인 페이지 추가

3 participants