fix(wasm): preserve TextField callback strings on web - #8621
fix(wasm): preserve TextField callback strings on web#8621proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughWeb callback paths now pass browser values directly to ChangesWASM callback conversion
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized WASM bridge change preserves text input values as strings for callbacks, with targeted regression coverage and no actionable merge-blocking risk remaining beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Landed via #8626, which carries this branch's commits plus #8622's missing Validated on the combined tree: |
Summary
Preserve browser text input values as strings when invoking Perry WASM closures. The WASM bridge now performs the JS-value-to-i64 conversion exactly once, avoiding NaN payload canonicalization that made
TextFieldcallbacks receive numericNaN.Changes
TextField,SecureField, andTextAreaintocallWasmClosure.Related issue
Fixes #8584
Test plan
cargo fmt -p perry-codegen-wasm -- --checkcargo test -p perry-codegen-wasmcargo run -p perry --no-default-features --features backend-wasm -- compile /tmp/perry-8584-repro.ts --target web -o /tmp/perry-8584-web.htmlel.valuedirectly and contains nofromJsValue(el.value)call./scripts/test_affected_crates.sh --base upstream/main(1,026 tests pass; the unrelatedcodegen_env_vars_are_build_cache_inputstest fails because currentupstream/maindoes not classify its newPERRY_OUTLINE_ENTRY*variables)./scripts/pre-tag-check.sh --quick(all non-format quick gates pass; currentupstream/mainhas a pre-existing rustfmt mismatch inmodule_global_typed_array_read.rs)#[test]in the affected crateChecklist