Repository navigation
feat(runtime): page-scoped event bus, API disposal guards, storage cleanup - #2387
Merged
Merged
Conversation
…eanup Ports the storage/event-bus work from fix/storage-optimization onto main, without the TV / binding-owner changes that branch was stacked on. - PageEventBus: page-scoped EventBus with a model-id index (onIndexed) - PageData.isDisposed + onResponse/onError disposal guards in invoke_api_action - PublicStorage.clearPublicStorage now uses Future.wait - tests: page_event_bus_test, api_dispose_guard_test, storage_manager_test - page_event_bus_binding_test: integration coverage ported from ensemble_widget_rebind_test.dart on fix/storage-optimization (2 assertions there depend on the binding-owner listenerMap teardown and are skipped) scope.dart: isDisposed is only set when the page's root scope is disposed (child scopes share the page bus, so disposing one must not mark the page).
usmanvrtx
added a commit
that referenced
this pull request
Oct 15, 2026
…tion Brings in PR #2387 (page-scoped PageEventBus, API disposal guards, storage cleanup). Conflict resolved in modules/ensemble/lib/framework/scope.dart: kept the branch's shared-resource dispose split and adopted the incoming isDisposed semantics. pageData._disposed is set on the root-scope path only, because child scopes already early-return and must not mark the page disposed. That keeps PR #2387's API onResponse/onError disposal guards effective while child-scope teardown still leaves the page alive. The incoming PageEventBus model indexing applies unchanged in the branch's _listenToBindingSource (the incoming change targeted the pre-branch method name listen()).
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.
Description
This PR adds runtime support for model-specific page events, strengthens API and widget lifecycle handling, and storage improvements.
Related Issue
N/A
Type of Change
What Has Changed
PageEventBusto support model-specific event handling.How to Test
flutter test test/page_event_bus_test.dart test/api_dispose_guard_test.dart test/ensemble_widget_rebind_test.dart test/storage_manager_test.dartfrommodules/ensemble.modules/ensemble:flutter test test/framework/tv/page_tv_header_test.dart test/widget/tv_focus_registry_index_test.dart test/widget/tv_focus_registry_test.dart test/widget/tv_focus_scroll_test.dart.flutter testsuite frommodules/ensemble.Screenshots / Videos
Not applicable.
Checklist
flutter analyzeand addressed any new warningsflutter testand all tests pass