From 0b6d7f996815e5333c55c3693233f67ad7c0496e Mon Sep 17 00:00:00 2001 From: Miguel Velasco Date: Sat, 28 Feb 2026 14:00:26 -0500 Subject: [PATCH 1/3] feat: Add spouse-related fields and calculations for improved financial planning in the wizard --- src/App.tsx | 3 + src/components/features/InputSection.tsx | 75 ++++++++++++++++- .../features/wizard/Steps/Step6Income.tsx | 69 ++++++++++++++-- .../features/wizard/Steps/Step8Results.tsx | 1 + .../features/wizard/WizardModal.tsx | 2 +- src/components/features/wizard/types.ts | 2 + .../features/wizard/wizardMapper.ts | 3 + src/services/calculationEngine.ts | 82 +++++++++++++++---- src/types/core.ts | 3 + 9 files changed, 213 insertions(+), 27 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 80730d4..80e0e79 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -20,6 +20,9 @@ const INITIAL_PROFILE: UserProfile = { age: 65, // Retirement Start Age baseAge: 55, // Current Age filingStatus: FilingStatus.Single, + spouseAge: 0, + spouseSocialSecurity: 0, + spouseSocialSecurityStartAge: 67, spendingNeed: 60000, isSpendingReal: true, assets: { traditionalIRA: 250000, rothIRA: 100000, rothBasis: 50000, brokerage: 150000, hsa: 25000 }, diff --git a/src/components/features/InputSection.tsx b/src/components/features/InputSection.tsx index 778dac5..02a3035 100644 --- a/src/components/features/InputSection.tsx +++ b/src/components/features/InputSection.tsx @@ -190,18 +190,51 @@ const InputSection: React.FC = ({ profile, setProfile, onRest placeholder="Target Age" /> -
+
+ {profile.filingStatus === FilingStatus.MarriedJoint && ( +
+ + { + const rawValue = e.target.value; + const updatedValue = rawValue === '' ? 0 : parseInt(rawValue, 10); + handleChange('spouseAge', updatedValue); + }} + className={inputClass} + placeholder="Age" + /> +
+ )}