Repository navigation
fix(extractor): filter every transient prop from styled rest spreads - #774
Merged
Merged
Conversation
Refs #689, #682 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #689, #682 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/react@1.0.44 → 1.0.45 - packages/react/package.jsonPatch
@devup-ui/reset-css@1.0.31 → 1.0.32 - packages/reset-css/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 12, 2026 12:23
Refs #689 #695 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #682 #695 #688 #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Refs #682 #695 #688 #689 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This was referenced Oct 18, 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 #689, #682 (W50: transient props). #711 위에 쌓은 PR이며, #711이 먼저 병합된 뒤 이 PR을 병합해야 합니다. 기준 커밋은
9e4d28abcf769705644818aba5d6bc943b2c6ff3입니다. CI의publish.yml실행을 위해 base는main입니다.요약
styled-components 5.1의 transient props 규칙대로, 이름이
$로 시작하는 모든 props를 렌더링 대상에 전달하지 않습니다. 소스에서 읽거나 열거하지 않은 이름, 호출자가 런타임 spread로 넘긴 이름, attrs가 만든 이름에도 적용됩니다. 태그와 컴포넌트,as로 바뀐 대상 모두 같은 규칙을 따릅니다.생성된 styled 컴포넌트의 rest spread에만 짧은 인라인 필터를 넣습니다. 추가 import나 스타일링 런타임은 없고, rest spread가 없는 경로에는 필터가 생기지 않습니다. 스타일 함수와 attrs는 필터 전 props를 계속 읽으므로
$tone같은 값은 기존 CSS 변수에 정상 반영됩니다. #711의 read props, theme, 빌드 시shouldForwardProp, 기본 태그 정책은 변경하지 않았습니다.migration 문서에 transient props 지원을 명시하고, coordinator가 승인한 같은 페이지의 두 오래된
.withConfig()설명도 고칩니다.shouldForwardProp는 빌드 시 평가하고,displayName/componentId등 다른 설정 메타데이터는 무시한다는 #711 동작으로 맞춥니다.동작
실제 WASM 프로브 입력:
변경 전 실제 생성 코드:
변경 후 실제 생성 코드:
기존 CSS import와
.a{padding:8px}는 그대로입니다. 이 프로브의 생성 코드 크기는 236 → 302 bytes(+66), Bun minify 후 252 → 314 bytes(+62)입니다. rest spread를 전달하는 컴포넌트마다 이 정도 코드와 props 복사/필터 비용이 추가되며, 사용자가 승인한 비용입니다. 스타일 계산을 런타임으로 옮기지는 않습니다.React 서버 렌더링에서 변경 전에는
$,$id,$other,$forced,$fromAttrs가 대상에 도달해 Invalid attribute/unknown-prop 경고가 발생했고, 컴포넌트 대상은$키를 실제 받았습니다. React가 잘못된 속성을 최종 HTML에서 자체 제거하는 것만으로는 지원을 증명할 수 없으므로, 경고가 전혀 없다는 것과 컴포넌트가 받은 키도 함께 검사합니다. 일반id,title,data-*는 유지합니다.새로 생기는 오류
없습니다. #711의 기존 빌드 오류 및 지원 범위를 바꾸지 않습니다.
남는 한계
$없는 임의의 이름(invented등)에 대한 전체 유효 속성 검증은 이 작업에 포함하지 않습니다. #711처럼 기존 rest 전달 및 빌드 시 확인 가능한 forwarding 정책을 유지합니다..attrs()와.withConfig()를 선언하지 않습니다. 이 PR에서 타입을 확장하지 않고, 런타임 렌더링 회귀 테스트는 suppression/cast 없는.test.jsx로 작성했습니다. 별도 #738의 정확한 head0dcb7174172cb3382bc4a65c5c5f4c5bfeb39e2c는StyledTemplate.attrs/withConfig를 이미 선언하고 public/compat export도 이를 사용합니다.console.error = mock()으로 바꾼 뒤 복구하지 않는 테스트 격리 문제가 발견되었습니다(packages/vite-plugin/src/__tests__/plugin.test.ts:227,packages/webpack-plugin/src/__tests__/plugin.test.ts:174). 이 PR에서는 기존 테스트를 바꾸지 않고 새 SSR 관찰을 한 foreground Bun child에 격리합니다. 경고 문자열을 필터링하거나 assertion을 완화하지 않습니다.검증
$키가 실제 전달됨), React 서버 렌더링 5/5 실패(실제 경고 또는 컴포넌트 전달 키).cargo fmt --all,cargo +1.99 clippy --workspace --all-targets -- -D warnings,cargo test --workspace: 통과(총 2,458 unit/doc tests, 0 실패).bun test5,503 통과/0 실패/100% coverage. 실제 SSR fixture 직접 실행도 exit 0이며 모든 시나리오의 warnings가 빈 배열, 태그의 id/title/data-*와 CSS 변수 값이 유지되고 컴포넌트/as 대상에$키가 없음을 확인했습니다. 최종 hook/CI 결과는 아래 진행 상태로 갱신합니다.bun lint: 기존 경고 2개 외 새 오류/경고 없음.test_styled_extension_composes_base의 Ext/ObjExt/Twice/FromRuntime/FromChanging/Ordered(6),test_styled_with_component_and_as의 Aside(1),test_styled_prop_forwarding의 tone / $c+tone+theme / x+y+theme / $c / level+theme spread(5).변경된 snapshot 58개 (libs/extractor/src/snapshots/)
진행 상태
CI 38246397965는 정확한 head
b77cc5d17c1a221babe73f3b0c4573dae8a1bc25에서 success입니다. coordinator의 green 통보 뒤 publish job114801213376로그를 직접 확인했습니다.100.00% coverage, 10543/10543 lines covered. 새styled_transient.rs도15/15입니다.5503 pass,0 fail, functions/lines coverage 모두 100%.publish(lint, coverage, Bun, 패키지 entry/tarball 검증, landing e2e),benchmark,landing-next-e2e,vinext-rsc-css-e2e. Bun preload race 회귀도 8/8 통과했습니다.이 결과 확인 후 ready로 전환합니다. #711 위의 stack 및 #711 먼저 병합 조건은 그대로 유지하며, 이 PR을 병합/승인/닫지 않습니다.
2026-10-15 갱신: 갱신된 #711 497aba0 (main 76b1a15 포함)을 병합했습니다. 충돌 파일 styled-components/page.mdx, extract_style_from_styled.rs, extractor/mod.rs, lib.rs, extractor__tests__styled_components_of_any_base.snap, extractor__tests__styled_components_theme_resolves_to_css_variables.snap은 부모 캡처·타깃·필터·문서 동작과 자식 transient 필터를 JSX/TS 모두 보존; 두 스냅샷은 재생성 후 any_base의 실제/eager 타깃·CSS와 theme의 스타일/원래 props 읽기 불변 및 전달용 복사본의 transient 필터만 확인; 캡처별 중첩 IIFE는 단일 IIFE의 순차 const와 (0, initializer)로 바꿔 기본 스택·익명 class/function 이름·guard·단일 평가 순서를 유지하고 RED/GREEN 회귀 및 Oracle APPROVE 확인 방식으로 해결했으며 부모 PR의 동작을 함께 보존했습니다. 새로 생기는 오류 없음.
2026-10-16 갱신: 확정 main a6ecc125를 포함한 갱신된 #711 de94d66d를 병합했습니다. 충돌 파일 없음(자동 병합), 두 부모 7afb427/de94d66d를 확인했으며 부모의 합성·attrs·타깃·props 읽기와 자식 transient 필터 및 기본 스택의 평탄한 단일 평가 바인더를 모두 유지했습니다. 새로 생기는 오류 없음.
기본 스택/CARGO_BUILD_JOBS=2/전체 트리 6 GiB 한도에서 fmt, Rust 1.99 all-target Clippy(-D warnings), 정상 workspace 테스트 4,116개/실패 0개가 통과했습니다. 새 스냅샷 후보 및 수동 스냅샷 변경은 없습니다. fresh WASM/root build 후 lint(기존 React 마이그레이션 경고 9개/오류 0개), Bun 5,914개/실패 0개/함수·라인 커버리지 100%가 통과했습니다. LSP는 기존 미설치/daemon timeout으로 검증 불가이며 clean으로 주장하지 않습니다.
실제 공개 WASM/React SSR에서 부모 시나리오 11개와 transient·attrs·native retarget·custom as·조건별 캡처 순서의 JSX/TS 조합 8개가 모두 통과했습니다.
$키가 렌더 대상에 전달되지 않고 attrs는 원래$tone을 읽으며 ordinary props/ref 값/children/호출자 class와 승리 CSS가 유지되고 렌더별 조건은 한 번만 실행됨을 확인했습니다. #774는 #711의 자식이며 #722 형제는 병합하지 않았으므로 forwardRef 지원을 새로 주장하지 않습니다. SSR은 DOM ref 부착을 검증하지 않습니다. 현재 head 0b13225d의 Linux CI는 별도로 확인하여 아래 덧붙입니다.실제 WASM/공개 API 검증 출력:
2026-10-16 CI 확인: head 0b13225d5f0511c57d621c7314ebfdae851bde8f의 run 38855620475은 모든 job 및 Codecov가 통과했습니다. publish job 116826297860 실제 로그에서 Linux Rust 100.00% coverage, 13134/13134 lines covered, Bun 5914개/실패 0개/전체 커버리지 100%를 확인했습니다. 확정 main a6ecc12 포함 및 현재 merge 상태는 최신 PR audit로 재확인했습니다.
2026-10-18 main 동기화 (W60k)
main
a26bb57928a04091e229d0972048eee39f09eb53을 실제 두 부모 병합042ed9f6021330eca914a3741538f5bac47b4fc9으로 반영했습니다.lib.rs,styled_source_tests/compatibility.rs충돌은 main의forwardRef/ref 전달과 이 PR의$접두사 전달 필터를 모두 유지했습니다. 자동 병합된 렌더 경로의 두 의도를 확인했고, 실행 테스트 16개는 단언·입력·깊이를 유지한 채forwardRef.render(props, ref)관찰 어댑터로 맞췄습니다.스냅샷 58개는 실제 테스트로 재생성한 뒤 전부 검사했습니다. main 출력에
$전달 필터 100곳을 더한 정확한 결과이며, 다른 출력 변경은 없습니다. 새로 생기는 오류: 이번 동기화로 추가되는 오류 없음. 남는 한계: 기존 설명 유지, 새 동작 한계 없음; LSP는 시간 초과/미설치로 검증 불가입니다.최신 공유 Rust stable 1.99.1, 기본 스택, jobs=2에서 fmt/Clippy/전체 Rust 4,874 통과·0 실패, Bun 6,037 통과·0 실패 및 함수/라인 100%, lint 0 오류·기존 20 경고입니다. 전체 훅은 12 GiB 제한에서 654.495초·최대 3.431 GiB로 통과했고, 훅 뒤 WASM/루트 재빌드 및 실제 공개 API/SSR 34개도 다시 통과했습니다. 실제 예:
<section id="base" title="kept" data-tone="gold" as="nav" class="c b caller">child</section>; 알 수 없는$키는 전달되지 않고 attrs 입력·ref·조건 평가 1회는 유지됩니다. 로컬 Windows Rust 97.87%는 Linux 100% 증거가 아니며, 새 head CI는 push 직후 아직 생성 대기 중입니다. 원격 Linux 100%와 전체 job 결과는 이어서 확인합니다.2026-10-18 추가 main 동기화 (W60k-r2)
사용자 병합 후 새 main
4baa1d7458e14aba30c5fa0c005b1011310fc365(#782/#751/#786/#773)을 실제 두 부모 병합603c82a253c9c451455d04af1d26c9f712795ec7으로 반영했습니다. 유일한 충돌libs/extractor/src/lib.rs의 테스트 모듈 삽입 위치는 기존styled_transient_tests와 main의exact_literal_coercion을 둘 다 그대로 유지했습니다. 프로덕션 코드는 자동 병합되었고, 기존 단언·입력·깊이·스냅샷을 줄이거나 바꾸지 않았습니다. 이번 추가 병합의 스냅샷 재생성은 0개입니다.새로 생기는 오류: 충돌 해결 자체의 추가 오류는 없습니다. main #773의 imported native
css()에 대한 비상수·순환·누락 정의의 위치 포함 오류는 main과 동일하게 유지됩니다. 남는 한계: 기존 설명 유지, 새 동작 한계 없음; LSP 시간 초과/미설치로 검증 불가입니다.최신 공유 stable 1.99.1/기본 스택/jobs=2에서 fmt/Clippy/Rust 5,154 통과·0 실패·0 무시, Bun 6,324 통과·0 실패·함수/라인 100%, lint 0 오류·기존 20 경고입니다. 전체 훅은 12 GiB 제한에서 1,023.719초·최대 3.419 GiB로 통과했고, 훅 뒤 새 WASM/루트 빌드와 실제 공개 API/SSR 34개도 다시 통과했습니다. 로컬 Windows Rust 97.93%는 Linux 100% 증거가 아닙니다. 이전 head
042ed9f6의 CI39123346351은 Linux 100%(13,571/13,571), Bun 100%, 5개 검증 job 및 Codecov까지 통과했지만, 이 새 head의 검증으로 재사용하지 않습니다. 새 head CI는 push 직후 생성 대기였으며 실제 결과를 이어서 확인합니다.2026-10-18 최종 확인: 새 head
603c82a253c9c451455d04af1d26c9f712795ec7의 CI39128538303전체 성공입니다. Linux Rust 100.00%(13,941/13,941), Bun 6,324 통과·0 실패·함수/라인 100%, preload 회귀 9 통과·0 실패, publish/benchmark/landing-next-e2e/vinext-rsc-css-e2e/react-18 및 Codecov patch 모두 통과했습니다. 배포·release는 PR 실행의 정상 skip이며, 현재MERGEABLE/CLEAN, main4baa1d74포함을 확인했습니다. 이전 head 결과나 외부 장애 예외를 재사용하지 않았습니다.