Skip to content

Blocker and High priority fixes#156

Merged
jenbreese merged 1 commit into
devfrom
interest-0710
Jul 10, 2026
Merged

Blocker and High priority fixes#156
jenbreese merged 1 commit into
devfrom
interest-0710

Conversation

@jenbreese

Copy link
Copy Markdown
Collaborator

Summary

Moves the "balance grows if left unpaid" line into the "When you borrow" explanation where it belongs, and switches the calculation to use the fractional periods value the user enters rather than a rounded whole number. Also removes the stray "Rounded to the nearest whole period" info message that was added to the errors doc by mistake.

Changes

  • Appended "This shows how the balance grows if left unpaid." to the borrowing explanation copy so it renders as constant context, not a result-dependent line.
  • Removed the borrowing helper block from the results panel. It was gated on !hasError, which made it appear above the results as soon as a valid calculation ran.
  • Removed rounding in the calculation useMemo. Math.pow now receives the fractional periods directly, so 2.5 periods computes as 2.5, not 3.
  • Removed the periodsInfo state and its "Rounded to the nearest whole period for calculation" message entirely (state declaration, reset handler, both change-handler branches, and the message paragraph fallback).

Testing

  • $1 / 8% / 2.5 periods / annually now returns a final amount of $1.21 as expected.
  • Verified the borrowing line no longer appears above the results in error or valid states, and shows only in the "When you borrow" section.
  • Confirmed zero-period warning, range errors, and whole-number results are unchanged.

@jenbreese jenbreese marked this pull request as ready for review July 10, 2026 18:15
@jenbreese jenbreese requested a review from majimmy88 July 10, 2026 18:16

@majimmy88 majimmy88 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@jenbreese jenbreese merged commit 574232b into dev Jul 10, 2026
@jenbreese jenbreese mentioned this pull request Jul 10, 2026
14 tasks
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