Default flow + remove isDone-only auto-advance to estimate

Fixkamolos
Ya
16 Mei 2026, 03:31 UTC
Mwandishi
Kamo
Ahadi ya
eaf14d9

The real bug behind users landing on the estimate-reveal screen even after "Start over": the flow engine returns DONE when state.flow is null (no flow chosen → no question list → loop yields nothing → DONE). The auto-advance condition `(isDone || minimumAnswersForEstimate)` saw DONE and set stage='estimate' immediately, even on a freshly-reset state. Three coordinated fixes: 1. Default state.flow to 'PURCHASE' on hydration when it's null. The shared loan-purpose question (which is the user's actual choice) lets them switch to REFINANCE / REVERSE; answers carry over by question id and each flow's `appliesWhen` predicates re-route correctly. This gives the engine a question list to walk so the preferredName + loanPurpose bubbles render as designed. 2. hasPriorProgress no longer counts state.flow !== null. The default flow set in (1) is a system default, not user-entered data. Only preferredName and answer presence indicate real prior progress (so the welcome-back gate doesn't show on every fresh visit). 3. Auto-advance to estimate is gated SOLELY on minimumAnswersForEstimate (not isDone). isDone is now ambiguous — it can mean "user finished everything" OR "engine has nothing because flow is null at edge cases". minimumAnswersForEstimate is the unambiguous "user has answered enough" signal; for completed flows it's also true (since the question lists include all the fields the minimum-check requires). Net: brand-new visitors land on the warm T-Rex greeting + "What should I call you?" — never the estimate screen unless they actually answered the required questions.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei