Skip to content

Refactor(client): 리마인드 api 업데이트#251

Merged
jjangminii merged 1 commit intodevelopfrom
refactor/#250/remind-api
Feb 5, 2026
Merged

Refactor(client): 리마인드 api 업데이트#251
jjangminii merged 1 commit intodevelopfrom
refactor/#250/remind-api

Conversation

@jjangminii
Copy link
Collaborator

@jjangminii jjangminii commented Feb 4, 2026

📌 Related Issues

관련된 Issue를 태그해주세요. (e.g. - close #25)

📄 Tasks

  • 리마인드 api 업데이트

⭐ PR Point (To Reviewer)

같은 토큰으로 로컬과 프로드 환경에서 테스트해봤습니다.
북마크에서 읽음이어도 리마인드에 새로 뜨면 안읽음으로 뜨는거 확인했습니다.

📷 Screenshot

로컬 테스트(변경 o)
image

프로드 테스트(변경 x)
image

Summary by CodeRabbit

Release Notes

  • Refactor
    • 개선된 API 호출 방식으로 리마인더 기능의 안정성을 향상시켰습니다.
    • 페이지네이션 로직을 최적화하여 콘텐츠 로딩 성능을 개선했습니다.

@jjangminii jjangminii linked an issue Feb 4, 2026 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Feb 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pinback-client-client Ready Ready Preview, Comment Feb 4, 2026 9:15am
pinback-client-landing Ready Ready Preview, Comment Feb 4, 2026 9:15am

@jjangminii jjangminii self-assigned this Feb 4, 2026
@github-actions github-actions bot added the refactor 코드 리팩토링 label Feb 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Walkthrough

리마인드 API를 v1 인라인 쿼리 문자열 방식에서 v2 파라미터 객체 방식으로 마이그레이션하고, 페이지네이션 종료 조건을 배열 길이 확인에서 hasNext 플래그 확인으로 변경했습니다.

Changes

Cohort / File(s) Summary
리마인드 API 엔드포인트
apps/client/src/pages/remind/apis/axios.ts
GET 요청을 v1 스타일의 인라인 쿼리 문자열에서 v2 엔드포인트로 변경. /api/v2/articles/remind 호출 시 now, read-status, page, size를 params 객체로 전달하도록 수정.
페이지네이션 로직
apps/client/src/pages/remind/apis/queries.ts
getNextPageParam의 종료 조건을 lastPage.articles.length === 0 확인에서 !lastPage.hasNext 플래그 확인으로 변경하여 더 명확한 페이지네이션 제어 구현.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #82: 동일한 리마인드 API 코드 경로(axios.ts의 getRemindArticles, queries.ts의 페이지네이션 로직)를 수정하며, v2 파라미터 방식 요청 및 다음 페이지 로직 변경과 관련이 있습니다.

Suggested labels

api

Suggested reviewers

  • jllee000
  • constantly-dev

Poem

🐰 리마인드 API를 업그레이드해,
v2의 깔끔한 파라미터로 바꿨네!
hasNext 플래그가 페이징을 이끌고,
더 나은 흐름으로 날아가는 데이터들,
토끼도 미소짓는 깔끔한 변경이야! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 리마인드 API 업데이트라는 주요 변경 사항을 정확하게 반영하고 있으며, 변경 사항의 핵심을 명확하게 전달합니다.
Description check ✅ Passed PR 설명은 필수 섹션(관련 이슈, 작업 내용, 리뷰어 주의사항, 스크린샷)을 모두 포함하고 있으며 템플릿 구조를 충실히 따르고 있습니다.
Linked Issues check ✅ Passed PR은 #250(리마인드 API 변경)과 관련되어 있으며, axios GET 호출을 v2 엔드포인트로 변경하고 페이지네이션 로직을 hasNext 플래그로 업데이트하는 코드 변경을 통해 해당 목표를 달성하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경 사항이 #250의 리마인드 API 리팩토링 목표와 관련이 있으며, 범위를 벗어난 변경 사항은 없습니다. 다른 이슈인 #25(Progress 컴포넌트)와는 무관합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/#250/remind-api

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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.

@github-actions
Copy link

github-actions bot commented Feb 4, 2026

✅ Storybook chromatic 배포 확인:
🐿️ storybook

Copy link

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/client/src/pages/remind/apis/queries.ts (1)

10-15: ⚠️ Potential issue | 🟠 Major

lastPage 응답 타입 정의 필요

ArticleListResponse 인터페이스에는 hasNext 속성이 정의되어 있지 않으나, 코드에서 lastPage.hasNext에 접근하고 있습니다. 또한 getRemindArticles 함수에 반환 타입 주석이 없어 타입 안전성이 보장되지 않습니다.

실제 API 응답에는 hasNext 필드가 포함되어 있으므로, 타입 정의를 수정하여 API 응답 구조와 일치시키거나 명시적인 반환 타입을 추가해야 합니다.

💡 타입 정의 예시
// apps/client/src/pages/remind/types/api.ts
export interface ArticleListResponse {
  readArticleCount: number;
  unreadArticleCount: number;
  articles: ArticleWithCategory[];
  hasNext: boolean;  // 추가 필요
}

// apps/client/src/pages/remind/apis/axios.ts
export const getRemindArticles = async (
  nowDate: string,
  readStatus: boolean,
  page: number,
  size: number
): Promise<ArticleListResponse> => {  // 반환 타입 명시
  // ...
};

Copy link
Member

@constantly-dev constantly-dev left a comment

Choose a reason for hiding this comment

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

굿입니다~ 👍

혹시 해당 API 변동 이유가 뭐였나요??

@jjangminii jjangminii merged commit 4272200 into develop Feb 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 리마인드 api 변경

2 participants