Skip to content

IFDM-141: fixed the years in house input on the Mortgage Refinancing Calculator#91

Open
jenbreese wants to merge 1 commit into1.xfrom
IFDM-141
Open

IFDM-141: fixed the years in house input on the Mortgage Refinancing Calculator#91
jenbreese wants to merge 1 commit into1.xfrom
IFDM-141

Conversation

@jenbreese
Copy link
Copy Markdown
Collaborator

@jenbreese jenbreese commented Apr 13, 2026

READY FOR REVIEW

Summary

  • Fixed the years in house for the mortgage refinance calculator so it is optional but also does work if years added
  • Under the "Refinance Analysis" tab for the right hand column where it says "New annual interest rate (%)" can we say "New interest rate".
  • Under the "Current Balance" tab can we change "Annual interest rate" with "Current interest rate"
  • Under the "Current Balance" tab we have a tagline that says "Calculate the present value of your remaining monthly mortgage payments (your mortgage balance)." Can we change this to say "Calculate your mortgage balance (the present value of your remaining monthly mortgage payments)."

Review By (Date)

  • 4/17

Criticality

  • Normal

Review Tasks

Setup tasks and/or behavior to test

  1. Check out this branch
  2. Navigate to hte mortgage refinance calculator
  3. Verify the years in house has impact on the calculations.
  4. Verify you can also not put in the years and it still works.
  5. Ticket: https://stanfordits.atlassian.net/browse/IFDM-141

Front End Validation

  • Is the markup using the appropriate semantic tags and passes HTML validation?
  • Cross-browser testing has been performed?
  • Automated accessibility scans performed?
  • Manual accessibility tests performed?
  • Design is approved by @ user?

Backend / Functional Validation

Code

  • Are the naming conventions following our standards?
  • Does the code have sufficient inline comments?
  • Is there anything in this code that would be hidden or hard to discover through the UI?
  • Are there any code smells?
  • Are tests provided? eg (unit, behat, or codeception)

Code security

General

  • Is there anything included in this PR that is not related to the problem it is trying to solve?
  • Is the approach to the problem appropriate?

Affected Projects or Products

  • Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

  • JIRA ticket(s)
  • Other PRs
  • Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
  • Anyone who should be notified? (@mention them here)

Resources


// Uses monthsToUse instead of full loan terms
const totalCurrentCost = currentMonthlyPayment * monthsToUse
const totalNewCost = newMonthlyPayment * monthsToUse + closingCosts
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so this is going to be incorrect if there is no value for monthsInHouse, but correct otherwise.

Can we change it so that it only uses this version of the calculation if monthsInHouse is greater than 0, otherwise use the old calculation (which is right).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, if a user says "I'll be in this house 5 years" and refinances to a longer term, the new loan amortizes slower, so the unpaid principal at sale is higher. The PR's math doesn't account for the remaining balance at monthsToUse

Can we check with the math fellow and see if this is correct?


<div className="mb-5 relative">
<Label className="font-semibold" htmlFor="ref-new-rate">New annual interest rate (%)</Label>
<Label className="font-semibold" htmlFor="ref-new-rate">New interest rate</Label>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Label className="font-semibold" htmlFor="ref-new-rate">New interest rate</Label>
<Label className="font-semibold" htmlFor="ref-new-rate">New interest rate</Label>

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.

2 participants