`@effect/ui-native` (Effect-TS/ui): `kit/VirtualList` `list` part widens `R` to `any`, poisoning enclosing components
Maintainer thường phản hồi trong vòng 1 ngày
@effect-bot đang làm issue này rồi.
Từ ngày 29/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
partially generated with help of my ai friend - neon 4.4
Hi effect team,
I was trying out this package and wanted to report some bugs encountered while porting a library to effect native
What version of Effect is running?
effect:4.1.7@effect/ui&@effect/ui-native:Effect-TS/uimainat77391ee50ae3d3175d670facbf675e9a819ba6a6react-native:0.88.1typescript:5.9.3(strict: true,exactOptionalPropertyTypes: true)
What steps can reproduce the bug?
- Clone the minimal reproduction repository:
git clone https://github.com/cliffordfajardo/effectui-native-error-reproductions.git cd effectui-native-error-reproductions pnpm install pnpm vitest run 11-virtuallist-part-leaks-any-requirements - Render
VirtualListinside anyNative.componentand inspectComponent.Requirements<typeof VirtualList>andComponent.Requirements<typeof WithVirtualList>(see11-virtuallist-part-leaks-any-requirements/repro.test.ts).
What is the expected behavior?
VirtualList's list part should preserve R = never (View.Part<"scroll", [], never>), so Component.Requirements<typeof VirtualList> is never and any parent component rendering VirtualList preserves its exact service requirements R.
What do you see instead?
In dist/kit/VirtualList.d.ts:153,158, list is inferred as View.Part<"scroll", [], any> and VirtualList itself has R = any:
list: View.Part<"scroll", [], any>;
...
}, any, never, never, never, never, never>;
This happens in packages/ui-native/src/kit/VirtualList.ts:678-744, where withSpacers returns ReadonlyArray<View.Node<any, any>> and .forward(...) returns { ...built, children: withSpacers(built.children, owner) }, widening the forwarded node's R to any.
As a result, any component that renders VirtualList:
- Has its
Component.Requirementssilently poisoned toany(erasing missing Effect service requirement checks). - Fails strict entrypoint typechecks (e.g.,
Effect.runPromise/NativeApp.mountunderexactOptionalPropertyTypes: true) unless callers manually castVirtualList(...)back toR = never.
Additional information
Preserving built's type (e.g., typing withSpacers generically over <Msg, R> or casting the returned children back to typeof built.children) prevents any from leaking into list and VirtualList's R parameter.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.7k
- Fork
- 808
- Merge trung bình
- 21 giờ 22 phút
- Pull request đã merge (30 ngày)
- 486
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Effect-TS/effect
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): Controlled `input` rejected-edit restore never calls `host.commit()`Có thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11096 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`@effect/ui-native` (Effect-TS/ui): `internal/focus.ts` `trackKeyboard` ignores `keyboardWillChangeFrame` / `keyboardDidChangeFrame` dismissalCó thể đã có người làm @effect-bot đã nhận hôm nay. Đang mở
Effect-TS/effect#11095 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Effect-TS/effect
Issue tương tự
-
check:failed streams:edit
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iptv-org/iptv#60585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Critical path skips a child span that ends exactly when the next one startsCó thể đã có người làm @Piyush4801 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jaegertracing/jaeger-ui#4865 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
anthropics/claude-code#112972 ·
-
Type: Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày