Skip to content

Refactor Intent Discovery state model and stabilize UX flow#5

Merged
digitalrisedorset merged 1 commit intomainfrom
feat/intent-state-refactor
Mar 24, 2026
Merged

Refactor Intent Discovery state model and stabilize UX flow#5
digitalrisedorset merged 1 commit intomainfrom
feat/intent-state-refactor

Conversation

@digitalrisedorset
Copy link
Copy Markdown
Contributor

Refactor Intent Discovery state model and stabilize UX flow

Summary

This PR refactors the Intent Discovery widget to simplify state, reduce coupling, and stabilise the user experience.

The main change is a shift toward a deterministic state model, removing implicit behaviours and fragmented local state in favour of centralized handling via SystemState and InteractionState.


Key Changes

  • Centralized state management (removed fragmented local state)
  • Introduced explicit setters for predictable interactions
  • Simplified attribute selection and interaction flow
  • Improved loading and empty states (SpinnerOverlay, NoResult)
  • Reorganized IntentExplanation to prioritize action and feedback
  • Removed legacy event emitters and side-effect-driven logic

Why this matters

The previous model relied on implicit state transitions and distributed logic, which made behaviour harder to reason about and introduced UI inconsistencies.

This refactor:

  • Reduces coordination complexity between components
  • Makes user interactions easier to trace and debug
  • Prepares the system for more reliable intent evaluation and recommendation flows

Current Status

  • UX flow is stable and ready for testing
  • Intent evaluation and recommendations still require validation and tuning

Notes / Next Steps

  • Validate AI intent consistency across edge cases
  • Stress test interaction flows (rapid selections, toggling, empty states)
  • Review performance under real data conditions

Visuals (optional)

Add before/after screenshots or short video if available

Centralized state, removed implicit logic
Simplified interactions and rendering
Improved loading and empty states
Reduced coupling and side effects
@digitalrisedorset digitalrisedorset merged commit b8a47d3 into main Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant