fix: 슬라이드 제목 fallback/편집 동작 정리 (#315)#317
Conversation
Summary of ChangesHello @PeraSite, 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! 이 Pull Request는 슬라이드 제목 처리 로직을 표준화하고, 사용자 경험을 개선하며, 데이터 일관성과 애플리케이션의 반응성을 향상시키는 데 중점을 둡니다. 제목이 없는 슬라이드에 대한 일관된 대체 텍스트 제공, 제목 편집 UI의 직관성 강화, 그리고 데이터 변경 시 즉각적인 피드백과 오류 복구 메커니즘을 도입하여 전반적인 시스템 견고성을 높였습니다. Highlights
Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
전반적으로 훌륭한 수정입니다. 슬라이드 제목이 null일 수 있는 경우를 처리하기 위해 타입 정의를 업데이트하고, getSlideTitle 유틸리티를 도입하여 fallback 로직을 중앙에서 관리하도록 한 점이 인상적입니다. 이를 통해 코드베이스 전반에 걸쳐 일관성을 크게 향상시켰습니다. 또한 useUpdateSlide 훅에 낙관적 업데이트(optimistic update)와 롤백 로직을 추가하여 사용자 경험을 개선한 점도 좋습니다. 회귀를 방지하기 위한 테스트 케이스 추가도 잘 이루어졌습니다. 몇 가지 사소한 개선 제안을 남겼으니 확인 부탁드립니다.
# Conflicts: # src/components/slide/script/ScriptBulkEditModal.tsx # src/hooks/UseSlideSelectors.test.tsx # src/hooks/queries/useSlides.test.tsx # src/pages/feedback/useFeedbackVideo.ts
📌 관련 이슈
✨ 변경 내용
title: string | null) API DTO/공유 타입/셀렉터에서title미설정 케이스를 안전하게 처리했습니다.getSlideTitle공통 유틸을 추가하고, Slide/Feedback/Insight/ScriptBulkEdit 등 슬라이드 이름 렌더링 지점을 전부 동일 규칙으로 통일했습니다.title이 있으면 해당 title 표시title이 없으면슬라이드 N표시title이 없을 때 input은 비어있게 유지useUpdateSlide에 optimistic update + rollback을 추가해 제목 변경 시 캐시 반영 지연을 줄이고 실패 시 이전 값으로 복구되도록 했습니다.src/hooks/queries/useSlides.test.tsxsrc/utils/slideTitle.test.tssrc/components/slide/script/ScriptBulkEditModal.test.tsxsrc/components/insight/RecentCommentsSection.test.tsx💡 참고 사항
npm run type-checknpm run test -- src/hooks/queries/useSlides.test.tsx src/utils/slideTitle.test.ts src/components/insight/RecentCommentsSection.test.tsx src/components/slide/script/ScriptBulkEditModal.test.tsxnpx -y react-doctor@latest . --verbose --diff(96/100, 기존 경고 10건)