Repository navigation
Add shared events and active request tooling - #10
Merged
Merged
Conversation
…d improve state management across platforms
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Fetch::active(),Fetch::isActive(), andFetch::cancelAll().FetchActiveRequestsChangedso activity and transfer screens can refresh from lifecycle changes without polling.#[On(...)]behavior.Why?
These changes make long-running requests easier to observe and control across navigation. Applications can now build transfer or activity screens, react to active-request changes without polling, and deliver an opt-in terminal result to the currently active screen.
The native reliability work prevents stale progress and retry state from leaking between attempts and ensures terminal operations release their native state consistently.
How was it tested?
Automated checks completed locally:
composer validate --strictcomposer testcomposer analysecomposer format:checknpm test --prefix resources/jsnpm run syntax --prefix resources/jsnpm run format:check --prefix resources/jsnpm audit --prefix resources/js --audit-level=highnpm audit --prefix docs --audit-level=highnpm run docs:build --prefix docsnativephp.jsonJSON validationgit diff --checkThe shared-event flow, active-request snapshots, retry state, and Android/iOS progress behavior were also exercised in generated NativePHP applications and simulators/emulators during the phased implementation.
Platforms tested
Breaking changes?
None.
Existing applications can update without changing their current request code or event listeners. The existing PHP and JavaScript APIs, native bridge contracts, event names and payloads, retries, cancellation, downloads, progress events, global lifecycle delivery, and NativeComponent
#[On(...)]behavior remain compatible. New shared events and active-request APIs are opt-in.Checklist