Skip to content

[Bug] 일정 등록/수정/삭제 관련 버그#147

Merged
seseoju merged 3 commits intodevelopfrom
feature/140
Feb 26, 2026
Merged

[Bug] 일정 등록/수정/삭제 관련 버그#147
seseoju merged 3 commits intodevelopfrom
feature/140

Conversation

@seseoju
Copy link
Member

@seseoju seseoju commented Feb 26, 2026

🛠️ 변경 사항

실제로 어떤 작업을 했는지 구체적으로 작성해주세요.

  • UI 수정 (Design)
  • 기능 추가 (Feature)
  • 버그 수정 (Bug)
  • 리팩토링 (Refactor)
  • 성능 개선 (Performance)
  • 테스트 추가 (Chore)
  • 기타:

세부 변경 내용

  • 일정 수정 폼의 상세 데이터 비동기 요청이 늦어질 경우, 값이 누락되는 간헐적 현상을 해결합니다. useEffect를 활용해
  • 일정 삭제시 pop 처리했습니다. replace시 initialAcitivity 번쩍임 이슈를 종종 봐서 조만간 해결해야 할거같네요,,
  • 일정 등록/수정시 에러 코드 SCHEDULE_INTERVAL_TOO_CLOSE에 따라 토스트 에러를 처리했습니다.

🔍 관련 이슈

관련 이슈를 링크해주세요. ex) close #23, related #23


📸 스크린샷 / GIF (선택)

UI 변경이 있다면 첨부해주세요.

Before After

⚠️ 주의 사항 / 리뷰 포인트

리뷰어가 특히 봐줬으면 하는 부분이나 고민했던 지점을 작성해주세요.


🔄 연관 작업

후속 작업이나 연관된 PR이 있다면 링크해주세요.

@seseoju seseoju requested a review from yummjin February 26, 2026 08:41
@seseoju seseoju self-assigned this Feb 26, 2026
@seseoju seseoju added the 🐞 Bug 발생한 버그에 대한 대응입니다. label Feb 26, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @seseoju, 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은 일정 등록, 수정, 삭제 기능과 관련된 여러 버그를 해결하고 사용자 경험을 개선합니다. 특히, 일정 수정 시 데이터 로딩 타이밍 문제로 발생하던 간헐적인 값 누락 현상을 수정하고, 일정 삭제 후 내비게이션 방식을 더 자연스럽게 변경합니다. 또한, 일정 생성 및 업데이트 시 특정 비즈니스 로직 에러(SCHEDULE_INTERVAL_TOO_CLOSE)에 대한 명확한 사용자 피드백을 제공합니다.

Highlights

  • 일정 수정 폼 데이터 누락 버그 해결: 일정 수정 폼에서 상세 데이터 비동기 요청 지연으로 인한 값 누락 버그를 useEffectuseRef를 활용하여 해결했습니다.
  • 일정 삭제 내비게이션 개선: 일정 삭제 시 replace 대신 pop을 사용하여 내비게이션 처리 방식을 변경하여 더 자연스러운 사용자 경험을 제공합니다.
  • 일정 등록/수정 에러 처리 추가: 일정 등록 및 수정 시 SCHEDULE_INTERVAL_TOO_CLOSE 에러 코드에 대한 특정 토스트 메시지 처리를 추가했습니다.

🧠 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
  • apps/web/src/pages/schedule/ui/ScheduleCreatePage.tsx
    • ApiErrortoastError를 임포트했습니다.
    • 일정 생성 뮤테이션의 onError 콜백에 SCHEDULE_INTERVAL_TOO_CLOSE 에러 코드에 대한 특정 토스트 메시지와 일반 에러 메시지를 추가했습니다.
  • apps/web/src/pages/schedule/ui/ScheduleDetailPage.tsx
    • useFlow 훅에서 replace 함수 임포트를 제거했습니다.
    • 일정 삭제 성공 시 replace('SchedulePage', {}) 대신 pop('SchedulePage')을 호출하도록 변경했습니다.
    • 쿼리 무효화 후 replace 호출을 제거했습니다.
  • apps/web/src/pages/schedule/ui/ScheduleEditPage.tsx
    • useRef를 임포트했습니다.
    • ApiErrortoastError를 임포트했습니다.
    • useRef와 추가 useEffect 훅을 사용하여 detailData가 유효하고 scheduleId가 일치할 때 setFormValues가 한 번만 호출되도록 하여 간헐적인 데이터 누락 문제를 해결했습니다.
    • 일정 업데이트 뮤테이션의 onError 콜백에 SCHEDULE_INTERVAL_TOO_CLOSE 에러 코드에 대한 특정 토스트 메시지와 일반 에러 메시지를 추가했습니다.
Activity
  • 이 PR에 대한 활동은 아직 없습니다.
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

일정 등록/수정/삭제 관련 버그를 수정한 PR이네요. 전반적으로 핵심적인 버그들이 잘 해결되었습니다. 특히 일정 수정 폼의 데이터 초기화 로직 개선과 삭제 후 내비게이션 처리 방식 변경은 좋은 개선입니다. 다만, 코드의 유지보수성과 아키텍처 일관성을 높이기 위한 제안이 있습니다. 일정 생성 및 수정 페이지에 추가된 에러 처리 로직이 중복되고 있으며, 이는 FSD 아키텍처 원칙에 따라 features 레이어로 옮기는 것이 더 적합합니다. 관련하여 두 파일에 각각 리뷰 코멘트를 남겼으니 확인 부탁드립니다.

Comment on lines +72 to +81
onError: (error) => {
if (
error instanceof ApiError &&
error.code === 'SCHEDULE_INTERVAL_TOO_CLOSE'
) {
toastError('이전 일정과 시작 시간이 너무 가깝습니다');
return;
}
toastError('일정 수정에 실패했습니다.');
},
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

이 에러 처리 로직은 ScheduleCreatePage.tsx에 있는 로직과 거의 동일하여 중복되고 있습니다.\n\n스타일 가이드의 FSD 아키텍처 규칙(1.2 레이어 책임)에 따라, API 에러 코드를 직접 다루는 비즈니스 로직은 pages가 아닌 features 레이어에서 처리하는 것이 좋습니다.\n\n이러한 중복과 아키텍처 위반을 해결하기 위해, useMutation 로직을 features 레이어의 커스텀 훅으로 추출하는 것을 제안합니다. 예를 들어, features/schedule-edit에 다음과 같은 훅을 만들 수 있습니다.\n\ntypescript\n// features/schedule-edit/hooks/useUpdateSchedule.ts\nimport { useMutation, useQueryClient } from '@tanstack/react-query';\nimport { scheduleQueries } from '@/shared/queries';\nimport { toastError } from '@/shared/ui/toast';\nimport { ApiError } from '@/shared/api/apiHandler';\n\nexport const useUpdateSchedule = (onSuccessCallback: () => void) => {\n const queryClient = useQueryClient();\n\n return useMutation({\n ...scheduleQueries.updateScheduleMutation,\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: scheduleQueries.all });\n onSuccessCallback();\n },\n onError: (error) => {\n if (\n error instanceof ApiError &&\n error.code === 'SCHEDULE_INTERVAL_TOO_CLOSE'\n ) {\n toastError('이전 일정과 시작 시간이 너무 가깝습니다');\n return;\n }\n toastError('일정 수정에 실패했습니다.');\n },\n });\n};\n\n\n이렇게 하면 페이지 컴포넌트는 UI 로직에 더 집중할 수 있게 됩니다.\n\ntypescript\n// ScheduleEditPage.tsx\nconst { pop } = useFlow();\nconst { mutate: updateSchedule } = useUpdateSchedule(() => pop());\n\nconst handleSubmit = (e: React.FormEvent) => {\n // ...\n updateSchedule({ crewId, scheduleId, payload });\n};\n

References
  1. FSD 아키텍처 규칙(1.2 레이어 책임)에 따라, 비즈니스 로직은 pages가 아닌 features 레이어에서 처리해야 합니다. API 에러 코드를 직접 다루는 것은 비즈니스 로직에 해당합니다. (link)

@github-actions
Copy link

@seseoju seseoju merged commit 05114ae into develop Feb 26, 2026
2 checks passed
@seseoju seseoju deleted the feature/140 branch February 26, 2026 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 Bug 발생한 버그에 대한 대응입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 일정 수정시 런 종류 선택버튼 활성화

1 participant