Skip to content

Feat: 전체 문서 조회 api 변경 - #222

Merged
chosim-dvlpr merged 9 commits into
develop/v3.5.1from
feature/#221
Aug 23, 2026
Merged

chosim-dvlpr merged 9 commits into
develop/v3.5.1from
feature/#221

Conversation

@chosim-dvlpr

@chosim-dvlpr chosim-dvlpr commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

issue

구현 사항

getAllDocumentsServer에 allDocumentsParams(pageSize 10000)를 넘겨 전체 문서를 본문(contents)까지 포함해 한 번에 불러오면, 문서 수가 많을수록 응답 payload가 커져 Next.js가 파싱에 실패하는 문제가 있었습니다.

이를 해결하기 위해 백엔드에 제목 목록 전용 엔드포인트 GET /document/titles(title, uuid, documentType, generateTime 반환)가 추가되었고, 이 엔드포인트에 대응하도록 했습니다.

🫡 참고사항

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request replaces the heavy 'getAllDocumentsServer' API call, which fetched all documents including their full content, with a lightweight 'getDocumentTitlesServer' API call targeting the '/document/titles' endpoint. This optimization prevents potential Next.js payload parsing failures by only retrieving necessary metadata ('DocumentTitle'). The changes include updating the documentation, types, API routes, admin pages, static parameter generation, and cache revalidation logic. There are no review comments, and I have no additional feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@chosim-dvlpr chosim-dvlpr changed the title feat: 문서 목록 조회를 /document/titles 경량 엔드포인트로 전환 Feat: 전체 문서 조회 api 변경 Jul 18, 2026

@ShinjungOh ShinjungOh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

리뷰가 늦어 죄송합니다😭
거의 반년 넘게 있었던 문제인데 드디어 해결돼서 개운하네요!!!

추가로 put-document 라우트에 getDocumentTitles 태그 무효화도 추가 부탁드립니다!
어드민에서 최근 편집일도 갱신되게 하려면 문서 수정시에도 태그 무효화가 필요할 것 같아요.

이미 컨벤션 문서까지 잘 업데이트 해주셨는데 리뷰 반영하시면서 바뀌는게 있으면 문서도 업데이트 같이 부탁드려요!!🚀🚀

};
```

### 목록 조회는 경량 엔드포인트 사용

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

컨벤션 문서 업데이트 좋아요~~!

Comment thread client/src/apis/client/document.ts Outdated
Comment on lines +42 to +51
export type DocumentTitle = TitleAndUUID & {
generateTime: string;
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

TitleAndUUID와 DocumentTitle 타입의 위치를 type/Document.type.ts로 옮기면 어떨까요?
서버 쪽과 클라이언트 쪽 모두에서 쓰이니 특정 레이어에 종속된 타입이 아니라 공통 타입 파일에 선언하면 좋겠어요~!

Comment on lines 11 to +12
const response: ApiResponseType<TitleAndUUID[]> = {
data: documents.map(({title, uuid, documentType}) => ({title, uuid, documentType})),
data: documents,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

응답 타입을 const response: ApiResponseType<DocumentTitle[]> = {로 바꾸는게 더 명확해질 것 같아요.

@jinhokim98 jinhokim98 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

확인이 너무 늦었습니다... approve 해둘게요

서버와 클라이언트 양쪽에서 사용하는 타입이므로 apis/client/document.ts가 아닌
type/Document.type.ts에 선언합니다. 제목 목록 BFF 응답 타입도 실제 응답에 맞춰
DocumentTitle[]로 명확히 했습니다.
문서 수정도 generateTime을 갱신하므로, 태그를 무효화하지 않으면 관리자 문서
목록의 최근 편집일이 이전 값으로 남습니다.
@chosim-dvlpr
chosim-dvlpr requested a review from ShinjungOh August 9, 2026 08:32
@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 109338da-9fd8-48b4-935b-c6abba259421

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@chosim-dvlpr
chosim-dvlpr merged commit 27e1ba2 into develop/v3.5.1 Aug 23, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from In Review to Done in crew-wiki-7-FE Aug 23, 2026
@chosim-dvlpr
chosim-dvlpr deleted the feature/#221 branch August 23, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants