Skip to content

PAM Native 1.41.0

Choose a tag to compare

@DavidWilliamBalbino DavidWilliamBalbino released this 15 Oct 00:14
· 635 commits to main since this release

PAM Native 1.41.0 (on top of 1.40.0) makes covered routes lean by default and fixes scroll requests that landed short.

  • Covered routes release native media (Android and iOS). When a full-screen route covers a route, or a native tab becomes inactive, every MediaPlayer in it frees its player, decoder (ExoPlayer/MediaPlayer + MediaCodec, AVPlayer), video surface and progress loop. It comes back at the same position and play intent when the route is visible again. Contained modals and form sheets keep the route below them playing. A player can opt out with keepAliveWhenCovered. Apps no longer have to release players themselves before pushing; Zé Chat's ReleasesMediaWhenCovered workaround is no longer needed.
  • Route focus events. on:routeCovered and on:routeFocused (onRouteCovered()/onRouteFocused() on any element) fire natively once per change, including in nested navigators and tabs.
  • Exact scroll requests. A fling that is still running is now stopped before ScrollView, FlatList, SectionList and VirtualizedList jump. A scroll to the top used to stop about 40 px short on Android. Offset 0 on Android virtual lists is now the real top (it used to resolve to 1 px). iOS deceleration is stopped the same way. The new scrollAnimated (scrollRequest(..., animated: true)) glides to the target and then snaps onto it exactly. iOS lists now jump by default instead of always animating.
  • #[PureHandler]. Template method handlers and element closures with this attribute do not mark their component dirty. The runtime renders after them only when that component's state, a tracked store or signal, or an explicit request changed. Timer-like events no longer re-render the screen.
  • Native media clock and progress. <Text mediaClock="ref" mediaClockFormat="remaining|elapsed|elapsed-duration|duration|countdown"> and mediaProgress="ref" (Text::mediaClock(), Element::mediaProgress(), MediaClockFormat) follow a player's position natively. PHP gets no tick, and nothing updates while the player is paused or its route is covered.
  • Protocol additions are append-only: event kinds 78–79 and properties 530–536.

Validation:

  • 235 Rust tests, plus clippy and fmt.
  • The full PHP SDK suite, including the new route_coverage.php, plus the performance, visual DOM, navigation and fuzz suites.
  • Protocol parity and the release-workflow contracts.
  • 290 Android JVM tests.
  • 317 of 318 Android instrumented tests on API 36. They include 11 new ones: covered push/pop with position resume, inactive tab, keep-alive opt-out, renderer route events, media clock and progress, and fling-then-jump for the list and the scroll view, both exact and animated.
  • Exact-candidate native and native-ui community first-run gates passed on a clean emulator (screenshots in gate-evidence/). The server journeys need host PHP 8.5, which this machine does not have, so they were not run here.
  • The Linux CLI, Android renderer, PHP SDK archives and plugin AAR passed deterministic rebuilds and package budgets.

Not covered:

  • The iOS sources and PamCoveredRouteTests were not compiled, because Xcode is not available on Linux. The Mac checklist is in docs/ios-parity.md.
  • API 26 was not rerun.
  • PamReloadModuleResultInstrumentedTest.shutdownCompletionsCannotConsumeNewLinkingRequestIds crashes the test process on the v1.40.0 baseline too (the app process exits after PHP entry execution returned). It was excluded from the run. This looks like the PHP exit crash being investigated on fix/php-exit-crash, not this change.
  • The local mbstring_polyfill check differs on host PHP 8.4.24. This happened before this change and does not affect the shipped SDK.
  • The on-device CPU and decoder measurement in Zé Chat (Feed covered by Loops) still needs to be done after installing this release.