Skip to content

feat: Beefed up debt log#85

Merged
jmpompeo merged 1 commit into
mainfrom
feature/debt-log-strategy-suite
Jun 16, 2026
Merged

feat: Beefed up debt log#85
jmpompeo merged 1 commit into
mainfrom
feature/debt-log-strategy-suite

Conversation

@jmpompeo

Copy link
Copy Markdown
Owner

No description provided.

@jmpompeo jmpompeo merged commit 84b943b into main Jun 16, 2026
6 checks passed
@jmpompeo jmpompeo deleted the feature/debt-log-strategy-suite branch June 16, 2026 02:36

@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

setDebtForm(initialDebtForm);
await refreshFromStorage();

P2 Badge Invalidate strategy after debt changes

After a strategy has been run, this success path refreshes the stored debt list but leaves the existing strategy state intact; adding another debt therefore keeps showing the old payoff order and totals in the Planner tab until the user manually reruns the comparison. Clear or recompute the strategy on successful debt/ledger mutations so the displayed plan matches the current balances.

ℹ️ 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 +357 to +361
var monthDebts = states
.Where(state => state.Balance > 0m)
.ToDictionary(
state => state.ClientDebtId,
state => new DebtStrategyMonthDebtAccumulator(state.ClientDebtId, state.Name, state.Balance));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject duplicate debt strategy IDs before simulating

When an API client submits two debts with the same clientDebtId, this ToDictionary throws for the duplicate key; the validator only checks that IDs are non-empty, so CalculateStrategy falls into its generic exception handler and returns a 500 instead of a validation problem. Since the IDs are caller-provided and are used as map keys throughout the response, validate uniqueness up front or avoid keying the simulation by a non-unique field.

Useful? React with 👍 / 👎.

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