Skip to content

feat : csm pagination view#937

Merged
chae-dahee merged 11 commits into
githru:core/CSMDictfrom
chae-dahee:feature/#912_csm-pagination-view
Oct 8, 2025
Merged

feat : csm pagination view#937
chae-dahee merged 11 commits into
githru:core/CSMDictfrom
chae-dahee:feature/#912_csm-pagination-view

Conversation

@chae-dahee

@chae-dahee chae-dahee commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Related issue

#912

Result

  • 구현된 페이지네이션 API를 view, vscode 프론트에 구현했습니다.
  • 페이징마다 매번 새로운 commitRaws, commitDict, stemDict를 재구축하는 로직을 → 캐싱을 사용해서 이미 구축된 stem을 기반으로 buildPaginatedCSMDict 함수를 사용하도록 했습니다.
  • 브랜치 변경, 새로고침 버튼은 캐싱을 사용하지 않도록 합니다.

Work list

  1. analyze-engine
  • AnalyzeGitResult 반복되는 타입 추출
  • commitRaws, commitDict, stemDict 초기 + 캐싱 처리
  1. vscode
  • ClusterNodesResult 반복되는 타입 추출
  • engine 캐싱 로직
  • fetchAnalyzedData, refresh 일때의 캐시 사용 처리 분기
  1. view
  • constant perpage, import 개선
  • params payload 의 페이징 적용
  • 더보기 버튼 처리 → 추후 무한 스크롤로 개선 예정

✅ 핵심 로직 변경 파일

Discussion

2025-10-077 28 23-ezgif com-video-to-gif-converter

시나리오
0 : 첫 로드
1 : load more 버튼
2 : branch select 변경 → 새로운 브랜치리스트 이동은 데이터를 재생성하지만, 방문했던 브랜치를 다시 방문하면(develop) 캐싱 사용
3 : refresh 버튼 → 언제든 캐싱을 사용하지 않고, 데이터 재생성

@chae-dahee chae-dahee added this to the v0.8.2 milestone Oct 7, 2025
@chae-dahee chae-dahee self-assigned this Oct 7, 2025
@chae-dahee
chae-dahee requested review from a team as code owners October 7, 2025 08:48
@nxnaxx

nxnaxx commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

LGTM!! 고생하셨습니다ㅎㅎ
화면 시나리오가 있어서 흐름을 한 번에 파악할 수 있어서 좋았습니다😄

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.

불필요한 주석, 콘솔 제거랑 코드 정리가 잘 되어있어서 가독성이 훨씬 좋아졌어요!

Comment thread packages/vscode/src/extension.ts Outdated
});
): Promise<ClusterNodesResult> => {
// Cache engine
if (!engine || engine.getBaseBranchName() !== baseBranchName) {

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.

캐싱 로직 좋습니다👍🏻

@ytaek ytaek 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.

와우 멋집니다!!

engine, view, vscode 모두를 잘 이해할 수 있어야 작업이 가능한 PR인데
이제 전체 구조를 완전 꿰뚫고 계시겠군요 😸

추가로, 성능 측정도 한번 해보면 좋겠습니다.
as-is, to-be 를 비교해서
전체적으로는 얼마나 빨라졌는지, csm 돌리는 부분은 얼마나 빨라졌는지를 확인할 수 있으면 좋겠습니당!!

} else {
// Non-paginated CSM
const csmDict = buildCSMDict(commitDict, stemDict, this.baseBranchName, pullRequests);
const csmDict = buildCSMDict(this.commitDict, this.stemDict, this.baseBranchName, this.pullRequests);

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.

pagedCSM 이 보편화되서 잘 정착(??)되면
이제 이 method들은 삭제해도 될 것 같군요 : )

@chae-dahee 님, 이 부분 이슈로 남겨주시면 감사하겠습니다!
아마 단기간에 없애지는 않을것 같지만, 좀 지켜보고 릴리즈 몇 번 후 안정화되면
역사의 뒤안길로 보내버리던지 해야겠네요 😈

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

넵! #944 이슈 남겼습니다 👍

| "updateTheme"; No newline at end of file
| "updateTheme";

export type RefreshDataRequestPayload = {

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.

👍

command,
payload: analyzedData,
};
if (command === "refresh") {

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.

command가 늘어났네요!
switch 로 바꿔서 가독성을 올려도 좋고,
command pattern? 같은 패턴들을 써서 따로 분리해도 좋을 것 같습니다!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

넵! 리팩토링 단계에서 작업해보겠습니다

@chae-dahee
chae-dahee merged commit 2a76eac into githru:core/CSMDict Oct 8, 2025
@chae-dahee

chae-dahee commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

추가로, 성능 측정도 한번 해보면 좋겠습니다.
as-is, to-be 를 비교해서
전체적으로는 얼마나 빨라졌는지, csm 돌리는 부분은 얼마나 빨라졌는지를 확인할 수 있으면 좋겠습니당!!

지금까지 작업한 코드의 성능 분석을 이슈 문서로 기록해보겠습니다!

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.

3 participants