Repository navigation
fix(extractor): preserve conditional-spread precedence in styled objects - #776
Merged
Merged
Conversation
Refs #682 #695 #689 #693 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #682 #695 #689 #693 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Contributor
Changepacks@devup-ui/wasm@1.0.83 → 1.0.84 - bindings/devup-ui-wasm/package.jsonPatch
@devup-ui/bun-plugin@1.0.22 → 1.0.23 - packages/bun-plugin/package.jsonPatch
@devup-ui/components@0.1.60 → 0.1.61 - packages/components/package.jsonPatch
@devup-ui/eslint-plugin@1.0.22 → 1.0.23 - packages/eslint-plugin/package.jsonPatch
@devup-ui/next-plugin@1.0.90 → 1.0.91 - packages/next-plugin/package.jsonPatch
@devup-ui/plugin-utils@1.0.17 → 1.0.18 - packages/plugin-utils/package.jsonPatch
@devup-ui/rsbuild-plugin@1.0.67 → 1.0.68 - packages/rsbuild-plugin/package.jsonPatch
@devup-ui/vite-plugin@1.0.73 → 1.0.74 - packages/vite-plugin/package.jsonPatch
@devup-ui/webpack-plugin@1.0.71 → 1.0.72 - packages/webpack-plugin/package.jsonPatch
|
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
owjs3901
marked this pull request as ready for review
October 13, 2026 02:52
This was referenced Oct 14, 2026
owjs3901
added a commit
that referenced
this pull request
Oct 14, 2026
Refs #688 #707 #776 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This was referenced Oct 14, 2026
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.
Refs #682, #695, #689, #693 (2026-10-11 사용자 결정 Q2, Q6).
main의11790bef에서 독립적으로 수정하며, 다른 PR의 선행 병합은 필요하지 않습니다.요약
styleOrder가 없는 하나의styled()스타일 객체에서 조건부 스프레드 뒤에 작성한 명시 속성이 먼저 작성한 값을 덮어쓰도록 수정합니다. 객체 키의 대체는 JavaScript처럼 얕게 처리하며, CSS 클래스 문자열 순서나 전역 스타일시트 순서를 바꾸는 방식으로 해결하지 않습니다.styled-components/Emotion 마이그레이션 문서에는 런타임에만 알 수 있는 클래스명을 반환하는 styled 콜백이 허용되지 않고, 알려진 클래스나 규칙 객체 사이의 조건 선택은 지원된다는 짧은 안내를 추가합니다. 변경팩은
Patch입니다.동작
기존에는 명시한
orange클래스와 조건부 스프레드의 클래스가 함께 남아 CSS 정렬 결과에 따라 앞서 작성한 값이 이겼습니다. 수정 후에는cond의 두 결과 모두 나중에 명시한orange가 이깁니다. 반대로 명시 속성 뒤에 스프레드가 있으면, 선택된 스프레드가 그 키를 가진 경우에만 뒤의 값이 이기고 키가 없으면 앞의 값이 유지됩니다.소유권 확인: PR #756 (
fix/js-semantics,f2fc4517)을 개인 임시 디렉터리에git archive로 내보내 새 WASM을 빌드한 뒤, 정확한 W38m 소스(711바이트, SHA25611ce25b30f6bf23d339975ddb7b1812093dce4c16d931524f53b94486c8d85bf)를 검증했습니다.main과 #756 모두 single CSS / per-file CSS에서 두 요소의 계산 색이rgb(255, 0, 0)이므로 #756의 이미 해결된 변경과 겹치지 않습니다.수정 전 정확한 W38m 출력에서 선택한 클래스는
f i l a c d g c d j이고, 루트 CSS는.i{color:orange}.f{color:purple}.d{color:red}순서입니다. 클래스 토큰 순서가 아닌 실제 Chromium 계산 스타일로 빨간색 우선순위를 확인했습니다.수정 후 같은 W38m 소스의 실제 선택 클래스는 두 요소 모두
g j a c e h이며, 루트 선언은.g{color:orange}만 남습니다. 나머지 실제 CSS는.j:hover{color:blue}.a:focus{color:green}.b:focus{color:navy}.f:active{color:orange}.e:active{color:yellow}.h:disabled{color:gray}.i:disabled{color:pink}.d:visited{color:black}.c:visited{color:silver}입니다. single CSS와 per-file CSS 모두 계산 색은rgb(255, 165, 0), hover는rgb(0, 0, 255)입니다.첫 최종 검토에서 추가로 발견한 세 경계도 함께 회귀 검증했습니다: 기존에 읽을 수 있던 정적 템플릿 키, 부호가 있는 숫자·문자열·템플릿의 shorthand 배율 보존, 합성 클래스의 원래 식별자와 생성 바인딩의 충돌 방지. 렌더 시
p: +2는8px,m: -2는-8px이며, 원래 합성한 클래스도 두 조건 결과 모두 유지됩니다.새로 생기는 오류
없습니다. 다음은 새 오류가 아니라 기존에 의도적으로 거부하던 콜백의 위치가 포함된 진단이며, 문서에만 명시합니다.
남는 한계
main과 #756에서 styled 객체의 효과가 선언 시점이 아니라 렌더마다 반복되는 현상은 별도 생성 코드 원인입니다. 이번 변경은 그 평가 시점을 옮기지 않으며, 정확한 W38m의 기존 효과 순서 및 횟수를 보존합니다:built,get,before,spread,between,spread,after,get,before,spread,between,spread,after.검증
cargo fmt --all, Rust 1.99clippy --workspace --all-targets -- -D warnings, 전체 직렬 Rust 테스트, fresh WASM 및 루트 빌드 통과.bun test: 5,498개 통과, 0개 실패, 함수·라인 커버리지 모두 100%.bun lint: 0개 오류, 기존 경고 2개만 남습니다.CARGO_BUILD_JOBS=2, 컴파일러/브라우저 lane은 하나씩 실행합니다.38332568689에서는 W51 새 테스트의 rstest 속성 순서 때문에 전역 맵 잠금이 첫 case에만 적용되어 기존 테마 스냅샷 ID가 섞였습니다. 스냅샷이나 단언은 바꾸지 않고 W51 소유 5개 테스트 묶음의serial속성을 마지막case뒤로 이동했습니다(aac3626e). 전체 정상 병렬 Rust 테스트와 Rust 1.99 clippy, 정상 훅이 통과했습니다.38337751915는aac3626e1922c3722fa10edb32659225b4434d50에서 전체 성공했습니다. publish, benchmark, landing-next-e2e, vinext-rsc-css-e2e가 모두 통과했으며, Next 및 RSC CSS의 두 CSS 모드 E2E도 성공했습니다.--fail-under 100). Bun: 5,498개 통과, 0개 실패, 함수·라인 모두 100%. 정상 커밋 훅의 lint, tarpaulin 분석·전체 Rust 테스트, Bun 테스트도 모두 통과했습니다. 일반 Windows 포맷 LLVM의 98.00%는 승인된 정책에 따라 로컬 임계값이 아니며, 실제 Linux 100% 게이트를 통과한 뒤 ready로 전환합니다.