-
Notifications
You must be signed in to change notification settings - Fork 0
[FIX] 오늘/집중 탭 변경 후 통계 캐시 갱신 #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
타이머 중지 성공 직후에도 통계를 무효화해야 합니다.
현재
invalidateStatistics()가changeTodoStatus.onSuccess내부에만 있어,stopTimer는 성공했지만 후속 투두 완료 상태 변경이 실패하면 통계 캐시가 갱신되지 않습니다.stopTimer.onSuccess에서 즉시 한 번 호출하고, 투두 상태 변경 성공 후에도 현재 호출을 유지해 두 mutation의 성공 결과를 모두 반영하세요.포커스 훅의
stopTimer성공 처리처럼 타이머 mutation 성공 지점에 직접 배치하는 방식이 안전합니다. TanStack Query도 mutation 성공 시 관련 query를 invalidate하는 패턴을 안내합니다. (tanstack.com)🤖 Prompt for AI Agents