`@effect/ui-native` (Effect-TS/ui): Controlled `input` rejected-edit restore never calls `host.commit()`
I maintainer di solito rispondono entro 1 giorno
@effect-bot ci sta già lavorando.
Dal 29/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.1
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 10-controlled-input-restore-misses-commit - Mount a controlled
inputwithvalue = "12"and commit. - Dispatch a native
topChangeevent ({ text: "12a", eventCount: 1 }) whose edit is rejected by the model (so no component re-render occurs), wait for thesetTimeout(..., 0)restore inNativeHost.ts, and inspectui.completeRoot/ui.cloneNodeWithNewPropscalls (see10-controlled-input-restore-misses-commit/repro.test.ts).
What is the expected behavior?
After restoring the rejected edit on the controlled input, NativeHost should commit the dirty Fabric shadow node (ui.cloneNodeWithNewProps + ui.completeRoot) so text: "12" and mostRecentEventCount: 1 are flushed to the native shadow tree immediately.
What do you see instead?
ui.completeRoot is called 0 times and ui.cloneNodeWithNewProps is never called.
In packages/ui-native/src/NativeHost.ts:545-550:
// After the microtask render, restore rejected controlled edits if still mounted.
if (handle.value !== undefined) {
setTimeout(() => {
if (mounted(handle)) setProp(handle, "value", handle.value)
}, 0)
}
setProp(handle, "value", handle.value) calls setText (packages/ui-native/src/internal/kinds.ts:122-129), which calls host.set(n, "text", value) and host.set(n, "mostRecentEventCount", n.eventCount) (marking n.dirty = true) and dispatches setTextAndSelection, but host.commit() is never called. The updated text and mostRecentEventCount shadow props stay stranded uncommitted until some unrelated future render flushes the tree.
Additional information
Calling commit() inside the setTimeout callback in NativeHost.ts:547-550 after setProp(handle, "value", handle.value) ensures both the imperative setTextAndSelection command and the Fabric shadow props stay synchronized.
- Lingua principale
- TypeScript
- Stelle
- 16.7k
- Fork
- 808
- Merge medio
- 21h 22m
- PR unite (30g)
- 486
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Effect-TS/effect
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
`@effect/ui-native` (Effect-TS/ui): `kit/VirtualList` `list` part widens `R` to `any`, poisoning enclosing componentsForse già presa @effect-bot l’ha presa oggi. Aperta
Effect-TS/effect#11097 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
`@effect/ui-native` (Effect-TS/ui): `internal/focus.ts` `trackKeyboard` ignores `keyboardWillChangeFrame` / `keyboardDidChangeFrame` dismissalForse già presa @effect-bot l’ha presa oggi. Aperta
Effect-TS/effect#11095 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Effect-TS/effect
Issue simili
-
check:failed streams:edit
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
iptv-org/iptv#60585 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Critical path skips a child span that ends exactly when the next one startsForse già presa @Piyush4801 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jaegertracing/jaeger-ui#4865 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
anthropics/claude-code#112972 ·
-
Type: Improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno