Skip to content

Amount formatting + balance adjusting improvemnets - #44

Merged
31b4 merged 3 commits into
mainfrom
amount-formatting
Jul 12, 2026
Merged

Amount formatting + balance adjusting improvemnets#44
31b4 merged 3 commits into
mainfrom
amount-formatting

Conversation

@31b4

@31b4 31b4 commented Jul 12, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a shared, locale-tolerant amount formatting/parsing utility plus a reusable AmountInput component, then migrates several UI flows (transfers, splits, recurring, bulk, budgets, accounts) to use the new amount handling for more consistent formatting and safer numeric parsing.

Changes:

  • Add client/src/lib/amount.ts (format/parse/normalize + scientific notation expansion) with Vitest coverage.
  • Add AmountInput with caret-preserving grouping behavior and migrate multiple forms/modals to use it.
  • Improve transfer exchange-rate handling (draft state + cancellation sequencing) and enhance adjustment flows (single vs split modal usage).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Bumps app version.
client/src/lib/amount.ts New centralized amount normalization/parsing/formatting utilities.
client/src/lib/amount.test.ts Unit tests for the new amount utilities.
client/src/components/dashboard-module/TransferForm.tsx Removes the legacy transfer form component.
client/src/components/dashboard-module/TransactionList.tsx Migrates transfer/bulk inputs to AmountInput and refines exchange-rate state handling.
client/src/components/dashboard-module/SplitTransactionModal.tsx Converts split amounts to string drafts, adds single-transaction mode, and uses shared formatting/parsing.
client/src/components/dashboard-module/RecurringTransactions.tsx Replaces manual numeric input logic with AmountInput + parseAmount.
client/src/components/dashboard-module/BulkTransactionModal.tsx Uses AmountInput, improves equal split cent allocation, and adopts shared parsing/formatting.
client/src/components/dashboard-module/AccountList.tsx Uses AmountInput for balances and adds a single-transaction adjustment modal path.
client/src/components/common/amount-input.tsx New reusable amount input with grouping + caret mapping behavior.
client/src/components/common/amount-input.test.tsx Interaction tests for grouping/caret behavior and paste normalization.
client/src/components/budget-module/BudgetFormModal.tsx Uses AmountInput and parseAmount for budget amount entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread client/src/components/dashboard-module/TransactionList.tsx
Comment thread client/src/components/dashboard-module/BulkTransactionModal.tsx Outdated
Comment thread client/src/components/dashboard-module/TransactionList.tsx Outdated
@31b4
31b4 merged commit caa5817 into main Jul 12, 2026
4 checks passed
@31b4
31b4 deleted the amount-formatting branch July 12, 2026 16:06
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