Skip to content

fix : 문제리스트 prev 버튼 next버튼 페이지 단위로 넘어가게 수정#96

Merged
leetaewon123 merged 1 commit intodevfrom
fix/problems
Aug 29, 2025
Merged

fix : 문제리스트 prev 버튼 next버튼 페이지 단위로 넘어가게 수정#96
leetaewon123 merged 1 commit intodevfrom
fix/problems

Conversation

@leetaewon123
Copy link
Copy Markdown
Collaborator

@leetaewon123 leetaewon123 commented Aug 29, 2025

🔎 작업 사항

  • 문제 리스트 prev버튼 next 버튼 기능 수정
  • 카테고리 코드 수정

➕ 관련 이슈

Summary by CodeRabbit

  • 신기능
    • 문제 목록의 카테고리가 코드값 대신 사람이 읽기 쉬운 라벨로 표시되어 가독성이 향상되었습니다. 더 많은 카테고리 옵션을 제공해 필터링/탐색이 편리해졌습니다.
    • 페이지네이션이 1페이지 단위 이동에서 묶음(15페이지) 단위 이동으로 개선되었습니다. 이전/다음 버튼이 해당 묶음의 시작/끝으로 점프하여 긴 목록을 더 빠르게 탐색할 수 있습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

글로벌 상수 categoryCodeOptions로 카테고리 매핑을 중앙화하고, 문제 목록 페이지에서 선택된 카테고리를 라벨로 표시하도록 수정했습니다. 테이블의 페이지 네비게이션은 단일 스텝에서 그룹(페이지 묶음) 단위 이동으로 변경되었으며, 경계 클램핑 로직과 디버그 로그가 추가되었습니다.

Changes

Cohort / File(s) Summary
카테고리 옵션 중앙화 및 UI 표시 수정
src/app/(auth)/(navigationsBarLayout)/problems/page.tsx
- 글로벌 categoryCodeOptions 도입 및 컴포넌트 내 로컬 옵션 제거
- 선택값을 사람 읽기용 라벨로 매핑 표시
- 카테고리 Select가 글로벌 옵션 사용
페이지네이션 그룹 이동 로직 도입
src/app/(auth)/(navigationsBarLayout)/problems/ui/Table.tsx
- Next/Prev 핸들러를 PAGE_LIMIT(15) 기준 그룹 이동으로 변경
- 경계 클램핑 추가 및 이전 그룹 말단으로 점프 로직 적용
- console.log(totalPages) 추가
- 퍼블릭 API 변경 없음

Sequence Diagram(s)

sequenceDiagram
  actor User as User
  participant Table as Table (UI)
  participant State as Pagination State

  rect rgb(240,248,255)
  note over Table,State: 기존 흐름 (단일 스텝 이동)
  User->>Table: Click Next
  Table->>State: currentPage = currentPage + 1 (if < totalPages)
  User->>Table: Click Prev
  Table->>State: currentPage = currentPage - 1 (if > 1)
  end

  rect rgb(245,255,240)
  note over Table,State: 변경된 흐름 (그룹 이동, 경계 클램핑)
  User->>Table: Click Next
  Table->>State: if currentPage + PAGE_LIMIT > totalPages<br/>then currentPage = totalPages - 1<br/>else currentPage += PAGE_LIMIT
  User->>Table: Click Prev
  Table->>State: if currentPage - PAGE_LIMIT < 1<br/>then currentPage = 1<br/>else currentPage = currentPage - (currentPage % PAGE_LIMIT or PAGE_LIMIT)
  Table-->>User: (optional) console.log(totalPages)
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

refactoring

Poem

풀밭 위 토끼, 귀 쫑긋 페이지 넘겨 보며,
스텝 말고 점프! 15칸씩 폴짝폴짝—오호라!
카테고리 라벨도 말랑말랑 예쁘게 보여주니,
로그 한 줄 깡충 떠서 길 안내도 척척.
오늘도 깔끔한 코드굴, 당근 한 입 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 72482f7 and d003737.

📒 Files selected for processing (2)
  • src/app/(auth)/(navigationsBarLayout)/problems/page.tsx (2 hunks)
  • src/app/(auth)/(navigationsBarLayout)/problems/ui/Table.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/problems

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@leetaewon123 leetaewon123 merged commit de4343e into dev Aug 29, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant