You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Debts page shows the last rate segment's APR, not today's #7
The Debts page shows a debt's APR from the last segment of its rate schedule, not the segment in force today. Apr() in src/Mossmint.Desktop/ViewModels/DebtsPage.cs (line 229) reads rates.Segments[^1].
So a card on a 0% intro APR shows the rate that starts after the promotion, and a loan with a scheduled rate change shows the future rate. The export uses rates.SegmentOn(today) (ProfileExport.cs:73), and so do the payoff and loan engines, so the page and the export can disagree for the same debt. The forecast itself isn't affected.
What to do
Pass today from Card() into Apr() and use rates.SegmentOn(today).
Decide what the page shows when no segment applies yet (SegmentOn returns null before the first one starts).
Cards show Buckets[0]'s rate (line 170); check that's still the bucket to show.
Consider showing the next change ("0.00% APR, 24.99% from 2027-03-01") when one is scheduled.
Done when
The Debts page and the export show the same APR for the same debt and day
Activity