Skip to content

Share AutoLogging primitives across web and React Native - #307

Draft
schwartzmx wants to merge 6 commits into
meta:mainfrom
schwartzmx:rn-al-plugins-review/27-build-validation
Draft

schwartzmx wants to merge 6 commits into
meta:mainfrom
schwartzmx:rn-al-plugins-review/27-build-validation

Conversation

@schwartzmx

Copy link
Copy Markdown
Member

Summary

  • Addresses Hook and channel review feedback by renaming the callback-unwrapping seam to getOriginalCallback() and making the AutoLogging channel a concrete ResilientChannel subclass. Strict and resilient listener behavior remains unchanged.
  • Reuses the portable surface hierarchy and inherited-property implementation from both web and React Native while keeping DOM storage and lookup web-only and React Context/lifecycle behavior native-only.
  • Extracts heartbeat inactivity gating and dispatch policy into a platform-neutral controller. Web retains document/window lifecycle and TimedTrigger; React Native retains injected AppState lifecycle and interval scheduling.
  • Preserves existing public APIs, event payloads, defaults, ordering, cleanup, and web behavior.

Commits

  • 865d1800 — Address Hook and AutoLogging channel review feedback
  • 07952e0b — Share surface hierarchy behavior across web and native
  • ac8024f9 — Share heartbeat inactivity control across web and native

Test plan

  • Run Hook and channel regression tests:

    npm test --workspace hyperion-hook -- --runInBand
    npm test --workspace hyperion-autologging -- --runInBand ALChannel.test.ts
  • Run web surface and heartbeat compatibility tests:

    npm test --workspace hyperion-autologging -- --runInBand ALSurfaceDataCompatibility.test.ts ALHeartbeat.test.ts ALHeartbeatController.test.ts
  • Run React Native heartbeat and lifecycle coverage:

    npm test --workspace hyperion-react-native -- --runInBand ALLifecycle.test.ts
  • Validate workspace types and both distributions:

    npm run build:all
  • Run targeted lint and formatting checks for the changed files.

  • Confirm the web artifact manifest and existing generated web bundles are unchanged.

  • Confirm mobile heartbeat still emits the expected active/inactive/background transitions, suppresses events after inactivity, and removes timers/listeners on disposal.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 5, 2026
- Add the generated Surface chunk to the expected web distribution manifest.
- Lock the core AutoLogging and split Surface import/export boundaries independently.
- Preserve the aggregate public API and generated runtime behavior.
- Pin the root development React runtime to the Web workspace's React 18 version.
- Keep the React Native workspaces on their exact React 19 runtime and renderer versions.
- Verify Metro aliases all application and package imports to the test app's single React copy.
- Prevent npm 11 from hoisting an incompatible React runtime into React Native tests.
- Leave shipped Web and mobile APIs unchanged.
- Rename the protected callback-unwrapping seam to getOriginalCallback.
- Represent the AutoLogging channel with the exact ResilientChannel type.
- Construct the resilient implementation directly without an unsafe assertion or extra runtime subclass.
- Preserve strict and resilient listener behavior with focused regression coverage.
- Leave existing Web channel semantics unchanged.
- Make Web ALSurfaceData use the portable hierarchy and inherited-property base already consumed by React Native.
- Keep DOM element storage and lookup exclusively in the Web implementation.
- Keep React Context, committed lifecycle state, and empty native elements exclusively in React Native.
- Preserve Web registry, duplicate-name, inheritance, and removal behavior.
- Add compatibility assertions around the shared base without changing public surface APIs.
- Extract the common inactivity gate and heartbeat dispatch policy into a platform-neutral controller.
- Keep document visibility, window focus, and TimedTrigger scheduling in the Web adapter.
- Keep injected AppState transitions and interval scheduling in the React Native adapter.
- Preserve Web event shapes, timestamps, ordering, defaults, and listener cleanup.
- Preserve React Native lifecycle, activity-refresh, and cleanup behavior.
- Cover inactivity suppression and strict-delivery state behavior without increasing the bundle budget.
- Pin the TypeScript ESLint facade, parser, and plugin to the same published release.
- Prevent lockless CI installs from selecting a partially replicated release.
- Keep application, web, and React Native runtime behavior unchanged.
@schwartzmx
schwartzmx force-pushed the rn-al-plugins-review/27-build-validation branch from 256568e to 7c2be5a Compare October 14, 2026 22:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant