-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 타이머 상태 관리 동기화 구조 정리 #280
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
jjangminii
merged 12 commits into
develop
from
refactor/web/279-unify-timer-query-invalidation
Sep 13, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4c8a04f
refactor(web): 타이머 쿼리 무효화 로직 통일 (#279)
jjangminii c43cbed
refactor(web): 타이머 overtime 상태를 zustand 스토어로 전환
jjangminii 89f3408
refactor(web): 타이머 진행률 계산을 공통 훅으로 추출
jjangminii d8d468d
fix(web): 타이머 진행 중 액션에도 통계 쿼리 무효화 (#279)
jjangminii ed45072
refactor(web): use-timer-progress를 utils로 이동하고 getTimerProgress로 개명 (…
jjangminii b2967e2
refactor(web): getTimerProgress로 개명한 파일과 호출부 반영 (#279)
jjangminii e732db0
refactor(web): overtime storage 파싱을 unknown 후 타입가드로 좁히도록 수정 (#279)
jjangminii 84b8185
refactor(web): use-focus-session도 invalidateTimerFinish 공유 (#279)
jjangminii 848ce9e
docs(web): 타이머 무효화 헬퍼에 JSDoc 추가 (#279)
jjangminii f21ad3a
refactor(web): 타이머 진행 무효화에 옵션 추가하고 개별 훅의 중복 로직 통일 (#279)
jjangminii 24b94cf
Merge branch 'develop' of https://github.com/Team-Timo/Timo-client in…
jjangminii 850b92e
fix(web): 투두 완료 처리 PATCH 이후 재검증 누락 레이스 컨디션 수정 (#279)
jjangminii 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
Oops, something went wrong.
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.
혹시 기존 onSuccess의 invalidate는 invalidateTimerFinish에서 동일한 쿼리들을 무효화하고 있어서 중복이라고 판단해 삭제하신 걸까요?
삭제하게 되면 현재 구조에서 PATCH 요청보다 invalidateTimerFinish가 먼저 실행되기 때문에 완료 상태가 서버에 반영되기 전에 GET 응답이 돌아올 수 있을 것 같아요. 이후에 PATCH가 정상적으로 완료되더라도 성공 이후에 다시 무효화하는 로직이 없기 때문에, 화면에는 서버와 다르게 미완료로 남아보일 가능성이 있다고 생각했어요. 지금은 서버 응답이 빨라서 눈으로 보기에 문제가 없어 보여서 이 정도 케이스는 고려하지 않아도 되는지 궁금합니다!
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.
이번 이슈에서 중복 코드와 구조 정리에 초점을 맞추다 보니 놓친 부분이 있었네요.
changeTodoStatus의 무효화 로직을 focus/TimerPanel과 동일한 구조로 mutation 정의 시점의 onSuccess로 옮겨서 어떤 호출부에서 호출하든 PATCH가 실제로 성공한 뒤에 항상 재검증되도록 수정했습니다. home/today 양쪽 모두 동일하게 적용했습니다-!