Skip to content

Feat/explain4cut#172

Merged
dasosann merged 7 commits intomainfrom
feat/explain4cut
Feb 6, 2026
Merged

Feat/explain4cut#172
dasosann merged 7 commits intomainfrom
feat/explain4cut

Conversation

@dasosann
Copy link
Contributor

@dasosann dasosann commented Feb 6, 2026

요약

치즈네컷 AI 추가

구현 사항

  • 치즈네컷 생성 시 엔드포인트 변경
  • 치즈네컷 생성 후 polling으로 AI 설명 정보 COMPLETE될때까지 가져옴
  • 그전까지는 클릭해도 안뒤집힘
  • COMPLETE되면 그 이후로 뒤집어서 확인 가능

📸 스크린샷

Need Review

  • ~ 부분 이렇게 구현했어요, 피드백 부탁해요!

Reference

📜 리뷰 규칙

Reviewer는 아래 P5 Rule을 참고하여 리뷰를 진행합니다.
P5 Rule을 통해 Reviewer는 Reviewee에게 리뷰의 의도를 보다 정확히 전달할 수 있습니다.

  • P1: 꼭 반영해주세요 (Comment)
  • P2: 적극적으로 고려해주세요 (Comment)
  • P3: 웬만하면 반영해 주세요 (Comment)
  • P4: 반영해도 좋고 넘어가도 좋습니다 (Approve)
  • P5: 그냥 사소한 의견입니다 (Approve)

@vercel
Copy link

vercel bot commented Feb 6, 2026

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

Project Deployment Actions Updated (UTC)
fe Ready Ready Preview, Comment Feb 6, 2026 7:32am

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @dasosann, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 치즈네컷 사진에 AI 설명 기능을 도입합니다. 사용자는 사진 카드를 뒤집어 AI가 생성한 요약 설명을 볼 수 있습니다. AI 설명이 준비될 때까지 시스템은 지속적으로 상태를 폴링하며, 설명이 완료된 후에만 카드 뒤집기 기능이 활성화됩니다. 이는 사용자에게 사진에 대한 추가적인 맥락 정보를 제공하여 경험을 향상시킵니다.

Highlights

  • AI 설명 기능 추가: 치즈네컷 사진에 대한 AI 생성 설명을 볼 수 있는 기능이 추가되었습니다.
  • 폴링 메커니즘 구현: AI 설명이 생성될 때까지 주기적으로 서버를 폴링하여 최신 상태를 가져옵니다.
  • 카드 뒤집기 UI: AI 설명이 완료되면 4컷 사진 카드를 뒤집어 설명을 확인할 수 있는 인터랙티브 UI가 구현되었습니다.
  • 엔드포인트 변경 및 추가: AI 설명 조회 및 AI 기반 4컷 확정을 위한 새로운 API 엔드포인트가 추가 및 변경되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/feature/album/4cut/components/Capture4CutPortal.tsx
    • isFinalized prop이 추가되어 Container4Cut 컴포넌트로 전달됩니다.
  • src/feature/album/4cut/components/Container4Cut.tsx
    • isFinalized prop을 받아 최종 확정된 4컷 사진에 그림자 효과를 적용하는 로직이 추가되었습니다.
  • src/feature/album/4cut/components/Container4CutExplanation.tsx
    • AI 설명을 표시하는 새로운 컴포넌트가 추가되었습니다. use4CutAiSummary 훅을 사용하여 AI 요약 데이터를 가져오고 로딩 상태를 처리합니다.
  • src/feature/album/4cut/components/ScreenAlbum4Cut.tsx
    • AI 설명 표시 여부를 관리하는 showExplanation 상태가 추가되었습니다.
    • use4CutAiSummary 훅을 사용하여 AI 설명 완료 여부를 확인합니다.
    • 4컷 사진과 AI 설명을 앞뒷면으로 보여주는 3D 플립 카드 UI가 구현되었습니다.
    • AI 설명이 완료된 경우에만 카드를 뒤집을 수 있도록 handleFlipCard 로직이 추가되었습니다.
    • Capture4CutPortalisFinalized prop이 전달됩니다.
  • src/feature/album/4cut/hooks/use4CutAiSummary.ts
    • 새로운 커스텀 훅으로, 특정 앨범 ID에 대한 AI 요약 정보를 가져오고, AI 설명이 COMPLETED 상태가 될 때까지 30초마다 폴링합니다.
  • src/feature/album/4cut/hooks/use4CutFixed.ts
    • 4컷 사진 확정 시 호출되는 API 엔드포인트가 cheese4cut.finalize에서 cheese4cut.cheese4cutFixedAi로 변경되었습니다.
  • src/global/api/ep.ts
    • AI 요약 조회 (/v1/cheese4cut/{code}/ai-summary) 및 AI 기반 4컷 확정 (/v1/cheese4cut/{code}/fixed/ai)을 위한 새로운 API 엔드포인트가 추가되었습니다.
    • 관련 TypeScript 인터페이스 (Cheese4cutAiResponseSchema, CommonResponseCheese4cutAiResponseSchema) 및 ApiReturns 타입이 업데이트되었습니다.
    • PhotoListResponseSchemauploaderId 필드가 추가되고 canDelete 필드의 타입이 변경되었습니다.
Activity
  • dasosann님이 새로운 AI 설명 기능을 추가하는 작업을 진행했습니다.
  • dasosann님이 4컷 사진 생성 시 엔드포인트 변경 및 AI 설명 폴링 로직을 구현했습니다.
  • dasosann님이 AI 설명 완료 전까지는 카드 뒤집기 기능을 비활성화하고, 완료 후에는 활성화되도록 구현했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

치즈네컷 AI 설명 기능을 추가하는 PR 잘 보았습니다. 전반적으로 코드가 잘 작성되었지만, 몇 가지 개선점을 제안합니다. 인라인 스타일을 CSS 클래스로 분리하여 유지보수성을 높이고, 설명 컴포넌트의 레이아웃 문제를 수정하는 것이 좋겠습니다. 또한, polling 간격에 사용된 매직 넘버를 상수로 추출하여 가독성을 향상시키는 것을 권장합니다.


return (
<div
className='bg-element-letter relative overflow-hidden font-medium'
Copy link
Contributor

Choose a reason for hiding this comment

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

high

자식 요소의 높이 문제로 인한 레이아웃 깨짐을 방지하기 위해, 이 컨테이너를 flexbox 컨테이너로 만드는 것을 제안합니다. flex flex-col을 추가해주세요.

Suggested change
className='bg-element-letter relative overflow-hidden font-medium'
className='bg-element-letter relative flex flex-col overflow-hidden font-medium'

</div>

{/* Body: 텍스트 설명 */}
<div className='flex h-full flex-col justify-center p-4'>
Copy link
Contributor

Choose a reason for hiding this comment

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

high

h-full 클래스는 부모 높이만큼을 차지하게 만들어 헤더와 내용이 겹칠 수 있습니다. flex-grow를 사용하여 남은 공간을 모두 차지하도록 변경하면 이 문제를 해결할 수 있습니다.

Suggested change
<div className='flex h-full flex-col justify-center p-4'>
<div className='flex flex-grow flex-col justify-center p-4'>

Comment on lines +69 to +74
style={{
fontSize: scaledFontSize,
...(isFinalized && {
boxShadow: '0px 0px 25px 5px rgba(0, 0, 0, 0.08)',
}),
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

인라인 스타일 대신 Tailwind CSS 클래스를 사용하여 조건부 스타일을 적용하는 것이 유지보수 측면에서 더 좋습니다. boxShadow를 별도의 클래스로 정의하고 isFinalized 값에 따라 동적으로 클래스를 적용하는 것을 고려해보세요. 예를 들어, clsx와 같은 유틸리티를 사용할 수 있습니다.

Comment on lines +38 to +41
...(isFinalized && {
boxShadow: '0px 0px 25px 5px rgba(0, 0, 0, 0.08)',
}),
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

인라인 스타일 대신 Tailwind CSS 클래스를 사용하여 조건부 스타일을 적용하는 것이 유지보수 측면에서 더 좋습니다. boxShadow를 별도의 클래스로 정의하고 isFinalized 값에 따라 동적으로 클래스를 적용하는 것을 고려해보세요.

Comment on lines +217 to +267
<div
style={{
transformStyle: 'preserve-3d',
transition: 'transform 0.6s',
transform: showExplanation
? 'rotateY(180deg)'
: 'rotateY(0deg)',
}}
>
{/* 앞면 - 4컷 사진 */}
<div
style={{
backfaceVisibility: 'hidden',
WebkitBackfaceVisibility: 'hidden',
}}
>
<Container4Cut
albumId={albumId}
eventName={data?.title}
eventDate={
data?.eventDate ? data.eventDate.replace(/-/g, '.') : ''
}
scale={isFinalized ? 1.5 : 1}
isFinalized={isFinalized}
/>
</div>
{/* 뒷면 - 설명 */}
{isFinalized && (
<div
style={{
position: 'absolute',
top: 0,
left: 0,
backfaceVisibility: 'hidden',
WebkitBackfaceVisibility: 'hidden',
transform: 'rotateY(180deg)',
}}
>
<Container4CutExplanation
albumId={albumId}
eventName={data?.title}
eventDate={
data?.eventDate ? data.eventDate.replace(/-/g, '.') : ''
}
scale={1.5}
isFinalized={isFinalized}
onClose={handleFlipCard}
/>
</div>
)}
</div>
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

플립 애니메이션을 위한 스타일이 인라인으로 작성되어 있어 코드가 길고 복잡해 보입니다. Tailwind CSS의 JIT 모드를 활용하여 tailwind.config.js에 커스텀 스타일을 추가하거나, 별도의 CSS 클래스로 분리하여 코드 가독성과 유지보수성을 높이는 것을 권장합니다.

return false;
}
// 아니면 30초마다 polling
return 30000;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

30000이라는 매직 넘버 대신, 파일 상단에 const POLLING_INTERVAL_MS = 30000;과 같이 의미 있는 이름의 상수로 정의하여 사용하면 가독성과 유지보수성을 높일 수 있습니다.

Suggested change
return 30000;
return 30000; // POLLING_INTERVAL_MS

delete iscompleted in AiSummary

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@dasosann dasosann merged commit 07cfbe8 into main Feb 6, 2026
3 of 4 checks passed
@dasosann dasosann deleted the feat/explain4cut branch February 6, 2026 07:31
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.

1 participant