fix: 배치 편집 시 노트 테두리 색이 항상 초록색이 되는 버그#75
Merged
Merged
Conversation
solidOnly 컬러피커가 rgba(...) 문자열을 반환하는데 배치 편집 저장 경로가 정규화 없이 noteBorderColor에 그대로 저장했다. 오버레이의 parseColor가 이를 hex로 착각해 substring하면서 "rgba"의 "ba"(=186)가 초록 채널로 고정돼, 어떤 색을 골라도 초록 테두리로 렌더됐다. NaN이 된 R/B 채널의 GPU 처리 차이로 Windows에서만 발현되고 Mac에서는 재현되지 않았다. - 공용 toRgbHexColor 유틸 추가: rgb/rgba/hex를 알파 버리고 #RRGGBB로 정규화 - 배치 저장 경로에서 noteBorderColor를 저장 전 정규화 - 단일 편집의 로컬 toHexColor를 공용 유틸로 통일 - parseColor가 어떤 입력이든 정규화해 NaN 방어 - 백엔드 normalize_state에서 기존에 저장된 rgba noteBorderColor를 #RRGGBB로 복구 (key/stat/graph), 변환 대상이 있으면 디스크에 영속 이슈 #73
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.
개요
노트 테두리 색을 여러 키 다중 선택으로 변경하면 어떤 색을 골라도 항상 초록색으로 표시되는 버그 수정
solidOnly컬러피커는rgba(...)문자열을 반환하는데, 배치 편집 저장 경로가 이를 정규화 없이noteBorderColor에 그대로 저장하고 있는 중오버레이의
parseColor가 그 값을 hex로 착각해 substring하면서"rgba"의ba(=186)가 초록 채널로 고정돼, 입력 색과 무관하게 초록 테두리로 렌더됐고단일 편집은
toHexColor로 정규화돼 정상이었고, R/B 채널이 NaN이 되는데 이 NaN의 GPU 처리 차이로 Windows에서만 발현되네여 그저 신도우 ㅋㅋ (개발 환경 macOS에서 재현 안 됨)변경 내용
프론트엔드
toRgbHexColor유틸 추가 —rgb()/rgba()/3·4·6·8자리 hex를 알파 버리고#RRGGBB로 정규화noteBorderColor를 저장 전 정규화toHexColor를 공용 유틸로 통일parseColor가 어떤 입력이든 정규화하도록 변경 (NaN 방어 + 잘못된 값 fallback)백엔드
normalize_state에서 기존에rgba(...)로 저장된noteBorderColor를#RRGGBB로 복구 (key/stat/graph)needs_persist로 디스크에도 영속테스트
toRgbHexColor단위 테스트 (rgb/rgba/3·4·6·8자리 hex/잘못된 입력)rgba_to_hexRust 테스트rgba(255, 0, 167, 1)→#FF00A7)