fix: 단노트 길이 일관성 유지 시 롱노트가 threshold만큼 짧게 표시되는 버그#79
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
개요
단노트 길이 일관성 유지를 켠 상태에서 롱노트의 표시 길이가 단노트 구분 시간(threshold)만큼 짧아지는 버그 수정 (#78)
delayed mode는 단/롱노트 구분을 위해 keydown 직후 바로 노트를 만들지 않고 threshold만큼 기다렸다가 생성하는데 (
startTime = downTime + threshold), 종료 계산은 그 늦춰진startTime부터 keyup까지만 표시 길이로 쓰고 있는 중그래서
targetEndTime이 사실상releaseTime이 돼버려서, 시작만 늦어지고 끝은 안 늦어져 표시 길이가 실제 입력보다 threshold만큼 잘렸습니다.원인 분석과 해결 방안까지 정리해 주신 @engp114 님의 이슈 제보 기반
변경 내용
프론트엔드
scheduleNoteFinalization()에서 delayed mode일 때 표시 길이를 실제 입력 유지 시간(releaseTime - downTime) 기준으로 계산targetEndTime = releaseTime + threshold시작과 종료가 동일하게 지연돼 노트 전체가 시간 이동되고, 표시 길이 = 실제 입력 길이로 일치forceMinLength)와 일관성 유지 OFF 경로는 기존 동작 그대로테스트
tsc --noEmit/ eslint / prettier 통과