Skip to content

87 implement state machine with stepper visualization for api call coordination ynab settleup - #89

Draft
SThor wants to merge 9 commits into
mainfrom
87-implement-state-machine-with-stepper-visualization-for-api-call-coordination-ynab-settleup
Draft

SThor wants to merge 9 commits into
mainfrom
87-implement-state-machine-with-stepper-visualization-for-api-call-coordination-ynab-settleup

Conversation

@SThor

@SThor SThor commented Jan 25, 2026

Copy link
Copy Markdown
Owner

Description

This PR cleans-up the flow across the app, using a state machine, and displays a custom stepper component so that the user better visualizes the process and potential errors.

Fixes #87

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

SThor added 2 commits January 25, 2026 16:29
…ation

- Create XState v5 parallel state machine for YNAB/SettleUp API coordination
- Implement conditional API targeting with proper guard functions
- Add support for all outcome scenarios: success, partial success, error states
- Build visual test interface with manual API outcome controls
- Add real-time state debugging with context display
- Implement smart retry logic (full retry vs targeted retry for partial failures)
- Set up proper project structure with /src/machines directory
- Add /state-machine route for development testing and validation
SThor added 3 commits January 25, 2026 18:57
- Store entire formState object in machine context for transaction integrity
- Update all guards to check formState.target.ynab/settleup properties
- Modify RETRY_FAILED action to work with formState structure
- Update StateMachineTest to create realistic mock formState objects
- Prepare for API service integration with complete transaction data

This ensures the state machine captures a complete snapshot of transaction
data when sync starts, preventing inconsistencies if form state changes
during API calls.
- Add 24 comprehensive unit tests achieving 100% coverage
- Fix RESET actions to properly clear context on state transitions
- Test both partial success scenarios and retry logic
@SThor
SThor force-pushed the 87-implement-state-machine-with-stepper-visualization-for-api-call-coordination-ynab-settleup branch from 2372788 to 8f579c4 Compare January 25, 2026 20:33
@SThor
SThor force-pushed the 87-implement-state-machine-with-stepper-visualization-for-api-call-coordination-ynab-settleup branch from 8f579c4 to 47ab32e Compare January 25, 2026 20:35
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.

Implement state machine with stepper visualization for API call coordination (YNAB & SettleUp)

1 participant