Skip to content

chore(state-machine): add support for dispacthing ui side effects from state side effects#10805

Open
rafaeltonholo wants to merge 5 commits intothunderbird:mainfrom
rafaeltonholo:chore/10775/state-machine-updates
Open

chore(state-machine): add support for dispacthing ui side effects from state side effects#10805
rafaeltonholo wants to merge 5 commits intothunderbird:mainfrom
rafaeltonholo:chore/10775/state-machine-updates

Conversation

@rafaeltonholo
Copy link
Copy Markdown
Member

Part of #10775.
feature-flag: enable_message_list_new_state

  • Update StateSideEffectHandler and its Factory to include a third generic type TEffect.
  • Add dispatchUiEffect to StateSideEffectHandler to allow side effect handlers to trigger UI effects.
  • Update BaseStateMachineViewModel and associated tests to support the updated factory and handler signatures.

- Update `StateSideEffectHandler` and its `Factory` to include a third generic type `TEffect`.
- Add `dispatchUiEffect` to `StateSideEffectHandler` to allow side effect handlers to trigger UI effects.
- Update `BaseStateMachineViewModel` and associated tests to support the updated factory and handler signatures.
…ttern

- Changed `StateSideEffectHandler.accept()` to receive both `oldState` and `newState` parameters
- Renamed `handle()` to `consume()` and updated return type to `ConsumeResult`
- Updated `accept()` to check for state changes (`oldState != newState`) where appropriate
- Modified all side effect handlers and tests to use new `consume()` pattern
- Updated `BaseStateMachineViewModel` to call `handle()` on all side effect handlers regardless of acceptance
- Removed redundant state transition in `SetupWarmingUpInitialState`
@rafaeltonholo rafaeltonholo requested a review from a team as a code owner April 8, 2026 17:50
@rafaeltonholo rafaeltonholo added the report: exclude Exclude changes from user-facing reports (internal, minor, or not relevant to users). label Apr 8, 2026
@rafaeltonholo rafaeltonholo requested a review from wmontwe April 8, 2026 17:50
@github-actions github-actions bot added the tb-team Tasks and features handled by project maintainers label Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

report: exclude Exclude changes from user-facing reports (internal, minor, or not relevant to users). tb-team Tasks and features handled by project maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants