Skip to content

fix(geisterhand/ios): register SecureField (#1384) + include perry-stdlib in auto-build (#1383)#1385

Merged
proggeramlug merged 2 commits into
mainfrom
fix/geisterhand-ios-followups
May 22, 2026
Merged

fix(geisterhand/ios): register SecureField (#1384) + include perry-stdlib in auto-build (#1383)#1385
proggeramlug merged 2 commits into
mainfrom
fix/geisterhand-ios-followups

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Two independent geisterhand-on-iOS fixes (one commit each), found while debugging a real app on a physical device.

#1384 — register SecureField with geisterhand

SecureField called register_widget but, unlike TextField, never called perry_geisterhand_register. So password fields were absent from /widgets and couldn't be driven via /type — blocking automated testing of any login/signup flow on iOS. Fix mirrors TextField's registration (widget_type=1, callback_kind=1, onChange closure + placeholder), under cfg(geisterhand).

#1383 — include perry-stdlib in the geisterhand auto-build

build_geisterhand_libs built perry-runtime + the UI crate + perry-ui-geisterhand, but not perry-stdlib. The geisterhand lib set was incomplete: apps pulling native-FFI packages that depend on perry-stdlib's async surface (perry_ffi_promise_*) had no consistent stdlib to link against under --enable-geisterhand. Building perry-stdlib separately doesn't work either — it resolves perry-runtime without the geisterhand feature, producing a second runtime variant and undefined-symbol link errors. Fix adds -p perry-stdlib to the same cargo invocation so the shared perry-runtime is built once (with geisterhand) and unified across all crates.

Verification

SecureField called register_widget but, unlike TextField, never called
perry_geisterhand_register, so it was absent from the geisterhand widget
registry. /widgets didn't list password fields and /type couldn't drive
them — blocking automated testing of any login/signup flow on iOS.

Mirror TextField's registration: register as widget_type=1, callback_kind=1
with the onChange closure and placeholder label, under cfg(geisterhand).
build_geisterhand_libs built perry-runtime + the UI crate + the
geisterhand server, but not perry-stdlib. The geisterhand lib set was
therefore incomplete: apps pulling native-FFI packages that depend on
perry-stdlib's async surface (perry_ffi_promise_*) had no consistent
stdlib to link against under --enable-geisterhand, and a separate
`cargo build -p perry-stdlib` resolves perry-runtime WITHOUT the
geisterhand feature → a second runtime variant → undefined-symbol
link errors.

Add -p perry-stdlib to the same cargo invocation so the shared
perry-runtime is built once (with geisterhand) and unified across all
crates, keeping the lib set complete and hash-consistent.
@proggeramlug proggeramlug merged commit 4eb9df1 into main May 22, 2026
9 checks passed
@proggeramlug proggeramlug deleted the fix/geisterhand-ios-followups branch May 22, 2026 13:34
proggeramlug added a commit that referenced this pull request May 22, 2026
…sweep (#1414)

Rolls up 26 PRs that merged to main post-v0.5.1023 without version
bumps:

- node:crypto gap-fixes (#1386 #1393 #1394 #1402 #1405): randomInt,
  timingSafeEqual, getHashes/getCiphers, sha224/sha384, base64 digest,
  Buffer hash input, no-arg digest() → Buffer, pbkdf2Sync digest arg,
  scryptSync.
- node:perf_hooks (#1321 + #1328 #1342 coverage): performance + User
  Timing + PerformanceObserver native impl, granular node-suite +
  edge-case coverage.
- #1090 GC checkpoint runtime work (#1324).
- #1311 geisterhand on iOS (#1316 #1383 #1384 #1385).
- #1312 process.env.X (unset) is nullish undefined (#1314).
- #1319 thread-safety hardening for cross-thread runtime statics.
- #1322 exact-head GC evidence packet.
- #1323 wasm timers dispatch through mem_call bridge (#1329).
- #1317 node:timers/promises shadow-segfault fix (#1326).
- #1330 node:process suite (#1331).
- #1292 bcrypt.hash() returns String (#1307).
- #1293 fastify .json()/.body external-fastify dispatch (#1308).
- #1296 app pattern performance gaps.
- #1297 diagnostics_channel parity.
- #1301 iOS App Groups capability (#1313).
- #1318 #1325 os/methods/modern-methods static dispatch.
- #1315 expanded Node parity test coverage.
- #1382 ui-ios stdlib pump for async fetch.
- #1392 ui-wasm reactive state + setText (#1404).
proggeramlug added a commit that referenced this pull request May 28, 2026
…imized one (#1383) (#2315)

PR #1385 fixed the BUILD half of #1383 by adding `-p perry-stdlib` to the
single geisterhand cargo invocation, so a geisterhand-featured, async-enabled
`libperry_stdlib.a` lands in target/geisterhand with a hash-consistent
perry-runtime. But the LINK half was still broken: the stdlib actually linked
under `--enable-geisterhand` was the auto-optimized one, built with
`--no-default-features` and a feature set derived from the app's *TS* imports.

For a geisterhand UI app whose async surface comes from a native binding
(@perryts/storekit / google-auth / play-billing — all using
`perry_ffi::async_runtime::JsPromise`) rather than TS, auto-optimize never
enables `async-runtime`, so the linked stdlib lacks `perry_ffi_promise_*` and
the link fails with `Undefined symbols: _perry_ffi_promise_new`.

Fix:
- Add `find_geisterhand_stdlib(target)` (mirrors `find_geisterhand_runtime`):
  searches only the target/geisterhand build dirs, so it returns the
  geisterhand-built stdlib (full default features incl. async-runtime) and
  never the auto-optimized one.
- In compile.rs, when `ctx.needs_geisterhand`, select that stdlib for the link
  (falling back to the auto-optimized stdlib if absent). This also keeps the
  bundled perry-runtime hash-consistent with `gh_runtime`.
- Include the geisterhand stdlib in the `gh_missing` cold-build check (both the
  compile.rs runtime-selection site and the link/mod.rs link site) so a stale
  target/geisterhand dir built before the stdlib was added triggers a rebuild
  instead of silently falling back.

Co-authored-by: Ralph Küpper <ralph@skelpo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant