Skip to content

feat(web): add debt log tab and update docs#75

Merged
jmpompeo merged 1 commit into
mainfrom
feature/debt-log-mvp
Mar 20, 2026
Merged

feat(web): add debt log tab and update docs#75
jmpompeo merged 1 commit into
mainfrom
feature/debt-log-mvp

Conversation

@jmpompeo

@jmpompeo jmpompeo commented Mar 5, 2026

Copy link
Copy Markdown
Owner

No description provided.

@jmpompeo jmpompeo force-pushed the feature/debt-log-mvp branch from 25446c0 to e593ba0 Compare March 5, 2026 22:26

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25446c0c33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +91 to +93
const totalPaidCents = payments.reduce((sum, payment) => sum + payment.amountCents, 0);
const remainingBalanceCents = Math.max(debt.startingBalanceCents - totalPaidCents, 0);
const progressPercent = debt.startingBalanceCents > 0 ? Math.min((totalPaidCents / debt.startingBalanceCents) * 100, 100) : 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Include accrued interest when computing remaining balance

getDebtMetrics computes remainingBalanceCents as startingBalanceCents - sum(payments) and never uses APR or payment dates, so the debt balance is treated as if no interest ever accrues. For any non-zero APR debt tracked over time (for example, a balance carried for a month before payment), the UI will understate current balance/progress and then send that understated totalDebt into /api/v1/debt/payoff, producing optimistic payoff projections.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex can you fix please?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Summary

  • Updated debt log balance metrics to accrue APR-based daily interest from the debt creation date through each logged payment date and then through today, instead of subtracting payments from principal only. This keeps the displayed remaining balance aligned with carried-balance interest. src/web/src/DebtLogPage.tsxL87-L129
  • Adjusted payoff progress to use the interest-adjusted remaining balance, preventing overstated payoff progress when interest has accrued. src/web/src/DebtLogPage.tsxL130-L133
  • Committed the fix on the current branch as 5b947ce with message fix(web): accrue debt interest in remaining balance.
  • Created the follow-up PR metadata with title fix(web): accrue debt interest in debt log balances.
  • I did not modify the pre-existing unrelated pnpm-lock.yaml working tree change.
  • Screenshot note: this is a frontend behavior change, but I could not take a screenshot because the required browser/screenshot tool was not available in this environment.

Testing

  • pnpm --dir src/web build
  • ⚠️ browser_container screenshot (not run because the browser/screenshot tool was unavailable in this environment)

View task →

@jmpompeo jmpompeo merged commit 6162d49 into main Mar 20, 2026
7 checks passed
@jmpompeo jmpompeo deleted the feature/debt-log-mvp branch June 14, 2026 13:38
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.

1 participant