Skip to content

Client-side termination flow with survey option tree#2882

Closed
hugokallstrom wants to merge 6 commits intodevelopfrom
feat/client-side-termination-flow
Closed

Client-side termination flow with survey option tree#2882
hugokallstrom wants to merge 6 commits intodevelopfrom
feat/client-side-termination-flow

Conversation

@hugokallstrom
Copy link
Contributor

Summary

  • Replace server-driven termination survey with client-side option tree builder, ported from Odyssey's TerminationSurveyService
  • Add car decommission eligibility, deflection routing, and termination flow computations (date/deletion logic)
  • Add termination reason mapper for survey option → mutation enum mapping
  • Rewire all VMs (Survey, Confirmation, DeflectAutoDecom) and navigation to use client-side flow, with fallback to old server-driven flow when terminationInfo is null
  • Mock fetchTerminationInfo and terminateContract repository methods (to be replaced with real queries/mutations)

Test plan

  • Unit tests for TerminationSurveyOptionBuilder, TerminationReasonMapper, TerminationFlowComputations, CarDecomEligibility, CarDeflectionRouter
  • Existing TerminationSurveyPresenter tests pass
  • Manual E2E test on emulator: insurance details → edit → cancellation shows client-built survey options
  • Verify car contract types show correct deflection screens
  • Verify sub-options navigation works (e.g. "I'm moving" → sub-options)

🤖 Generated with Claude Code

hugokallstrom and others added 6 commits March 11, 2026 19:41
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…new termination flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ChooseInsuranceVM: uses fetchTerminationInfo + TerminationSurveyOptionBuilder
- SurveyVM: computes next step locally via CarDeflectionRouter/TerminationFlowComputations
- ConfirmationVM: calls terminateContract mutation (mocked) with TerminationReasonMapper
- DeflectAutoDecomVM: computes next step locally instead of server call
- Navigation: threads TerminationInfo, selectedOptionId, feedbackText through chain
- DI: updated all Koin bindings for new parameters
- All old flow paths preserved as fallback when terminationInfo is null

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing fetchTerminationInfo/terminateContract stubs to
FakeTerminateInsuranceRepository and auto-format all new/modified files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hugokallstrom hugokallstrom deleted the feat/client-side-termination-flow branch March 11, 2026 19:24
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