Skip to content
This repository was archived by the owner on Nov 20, 2026. It is now read-only.

[AI] CHE-1023: Enforce denomination in derived report widgets - #132

Draft
congvc-bot-x99[bot] wants to merge 4 commits into
author/CHE-1022/01a10aa9-5d66-745c-885b-06ea8082617cfrom
author/CHE-1023/c094bf249ff2
Draft

congvc-bot-x99[bot] wants to merge 4 commits into
author/CHE-1022/01a10aa9-5d66-745c-885b-06ea8082617cfrom
author/CHE-1023/c094bf249ff2

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

🤖 Status: Parked — CHE-3439, 2026-11-04 ICT. Head e4440b789e0b1d66b99e41a298973eb58caef980. Preserve the currency continuation stack rooted at #123. The root still has red autofix/lint checks. The stack owner must propagate the CI repair and current master, rerun this layer against its actual base, and reconcile independent PASS on the resulting head. Preserve the existing base branch; do not merge or close layers as duplicates.

Description

CHE-1023 (CHE-835 v3 layer 11/12): enforce Main-currency denomination in derived report widgets. AI-authored (Claude Opus, Multica agent x99-claude-opus).

  • Base: CHE-1022 head 560cb66ce42626604203bf16e1d60c6c57e49927 (PR [AI] CHE-1022: Convert calendar report amounts to Main #131; the coordinator comment named af8d06f9, the live head is its child 560cb66c, which only touches Calendar.tsx layout). Trunk base under that stack: 84be7c4eb3ab0716faedcfbc2aad71f209ea789e.
  • Crossover: each selected account's balance per month is converted to Main once (account + month leaf), then safe-summed. The projection algorithm is unchanged; it receives the converted monthly totals.
  • Balance forecast: useMainBalanceForecast converts each (account, date) balance before the existing combine/lowest-point code. Accountless schedules stay in Main.
  • Missing Main, unknown account, missing rate or unsafe amount makes the whole report unavailable (status text, never zero or a mixed sum). Unfinished account data shows loading. Foreign balances show the existing "estimate at current rates" note.
  • Formula and Monte Carlo output has no trustworthy account denomination: a visible notice is shown when foreign-currency accounts exist; the values are not labeled as converted Main.

Coverage table (all 14 built-in widget types)

Widget Class Basis
net-worth-card Converted CHE-1016
cash-flow-card Proven Main-only on-budget accounts only; unavailable if any on-budget account is not Main (hasOnlyMainCurrencyAccounts)
spending-card Converted CHE-1018
custom-report Converted CHE-1019
summary-card Converted CHE-1021
calendar-card Converted CHE-1022
sankey-card Converted existing convertSankeyCategoryEntries / convertTransferPairs
crossover-card Converted (this PR) income-account balances converted per account+month leaf; expense categories are budget categories (on-budget = Main) so proven Main-only
balance-forecast-card Converted (this PR) per account+date balance leaves
budget-analysis-card Proven Main-only envelope budget-month cells (categories, on-budget); regression test added
age-of-money-card Proven Main-only queries filter account.offbudget: false; counts/dates only; regression test added
markdown-card Dimensionless static text, no amounts
formula-card Unsupported arbitrary formula (disclosed) arbitrary formula output has no denomination; notice shown with foreign accounts; never labeled converted Main
monte-carlo-card Unsupported (disclosed), remainder linked pot balances are native account balances; notice shown on card and page when a pot links a foreign-currency account. Converting them (and their persisted startingBalance) is not in this PR: remainder for the coordinator to split

Dates, counts and percentages are unchanged. No historical FX, investment gain accounting, formula unit inference or new forecasting controls.

Related issue(s)

CHE-1023, parent CHE-835 / CHE-821. Stacked on #131.

Testing

Tests added in derived-widget-currency.test.ts (11 tests): mixed-currency crossover, per-leaf rounding (once per balance), Main-only unchanged, missing rate, unknown account, missing Main, loading; forecast conversion incl. accountless and empty completed input; Main-only regressions for age of money (on-budget filter, ages unchanged) and budget analysis.

Check Result
vitest new test file PASS (11/11)
vitest src/components/reports + src/hooks PASS 529/529 tests; 1 file Spending.test.tsx FAIL to load: local node_modules is a symlink to another checkout and vite denies dark.css?inline outside root (environment, not product)
tsgo --noEmit (desktop-client) PASS (only 4 pre-existing errors from ungenerated .pegjs/hyperformula typings in the borrowed node_modules, none in touched files)
oxfmt --check packages/desktop-client/src PASS
oxlint --type-aware on reports + hooks 2 FAIL, both pre-existing in CHE-1022 files (calendar-spreadsheet.ts, calendar-spreadsheet.test.ts); none in touched files
root yarn typecheck, full yarn lint, core workspace tests, browser surface NOT-RUN locally; use CI on this head
locale-fork/GLOSSARY.md lint base-red, left as is

Checklist

  • Release notes added
  • No obvious regressions in affected areas (independent verification pending)
  • Self-review has been performed

Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 44 14.15 MB → 14.16 MB (+10.39 kB) +0.07%
loot-core 1 4.67 MB 0%
api 2 3.88 MB 0%
cli 1 8.02 MB 0%
crdt 1 11.16 kB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
44 14.15 MB → 14.16 MB (+10.39 kB) +0.07%
Changeset
File Δ Size
src/hooks/useMainBalanceForecast.ts 🆕 +2.27 kB 0 B → 2.27 kB
src/components/reports/UnconvertedCurrencyNotice.tsx 🆕 +1.7 kB 0 B → 1.7 kB
src/components/reports/spreadsheets/report-currency.ts 📈 +818 B (+60.73%) 1.32 kB → 2.11 kB
src/components/reports/reports/CrossoverCard.tsx 📈 +1.09 kB (+19.01%) 5.74 kB → 6.83 kB
src/components/reports/spreadsheets/crossover-spreadsheet.ts 📈 +1.1 kB (+13.81%) 7.96 kB → 9.06 kB
src/components/reports/reports/monte-carlo/MonteCarloCard.tsx 📈 +223 B (+7.46%) 2.92 kB → 3.14 kB
src/components/reports/reports/BalanceForecastCard.tsx 📈 +700 B (+6.26%) 10.93 kB → 11.61 kB
src/components/reports/reports/FormulaCard.tsx 📈 +206 B (+4.15%) 4.84 kB → 5.04 kB
src/components/reports/reports/Crossover.tsx 📈 +1.25 kB (+3.69%) 33.7 kB → 34.94 kB
src/components/reports/reports/BalanceForecast.tsx 📈 +499 B (+2.86%) 17.04 kB → 17.52 kB
src/components/reports/reports/monte-carlo/MonteCarlo.tsx 📈 +488 B (+1.24%) 38.5 kB → 38.98 kB
src/components/reports/reports/Formula.tsx 📈 +125 B (+1.04%) 11.69 kB → 11.82 kB
src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx 📈 +4 B (+0.01%) 43.03 kB → 43.04 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/ReportRouter.js 1.56 MB → 1.57 MB (+10.39 kB) +0.65%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/index.js 1.78 MB 0%
static/js/BackgroundImage.js 121.09 kB 0%
static/js/DateSelect.js 2.37 MB 0%
static/js/FormulaEditor.js 767.24 kB 0%
static/js/ManageRules.js 83.15 kB 0%
static/js/NotesTagFormatter.js 25.94 kB 0%
static/js/PayeeRuleCountLabel.js 12.81 kB 0%
static/js/ScheduleEditForm.js 75.41 kB 0%
static/js/SchedulesTable.js 171.25 kB 0%
static/js/TourHost.js 169.22 kB 0%
static/js/TourProvider.js 1.54 kB 0%
static/js/TransactionList.js 79.22 kB 0%
static/js/TransactionList2.js 168.62 kB 0%
static/js/Value.js 1.8 MB 0%
static/js/bootstrapHyperFormula.js 302 B 0%
static/js/ca.js 170.64 kB 0%
static/js/client.js 452.05 kB 0%
static/js/columns.js 673.76 kB 0%
static/js/de.js 186.43 kB 0%
static/js/en-GB.js 13.69 kB 0%
static/js/en.js 272.82 kB 0%
static/js/es.js 183.73 kB 0%
static/js/fr.js 178.59 kB 0%
static/js/indexeddb-main-thread-worker-e59fee74.js 13.46 kB 0%
static/js/it.js 152.08 kB 0%
static/js/months.js 593.39 kB 0%
static/js/narrow.js 290.14 kB 0%
static/js/nb-NO.js 135.89 kB 0%
static/js/nl.js 151.78 kB 0%
static/js/pl.js 148.93 kB 0%
static/js/pt-BR.js 178.74 kB 0%
static/js/ru.js 211 kB 0%
static/js/theme.js 31.68 kB 0%
static/js/uk.js 210.69 kB 0%
static/js/useAccountBalances.js 220.92 kB 0%
static/js/useFormatList.js 10.4 kB 0%
static/js/useLocalPref.js 97.2 kB 0%
static/js/useReducedMotion.js 594 B 0%
static/js/vi.js 15.89 kB 0%
static/js/wide.js 285.94 kB 0%
static/js/workbox-window.prod.es5.js 7.21 kB 0%
static/js/zh-Hans.js 107.31 kB 0%
static/js/zh-Hant.js 130.92 kB 0%

loot-core

Total

Files count Total bundle size % Changed
1 4.67 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.CfRaXv_7.js 4.67 MB 0%

api

Total

Files count Total bundle size % Changed
2 3.88 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 3.88 MB 0%
models.js 0 B 0%

cli

Total

Files count Total bundle size % Changed
1 8.02 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
cli.js 8.02 MB 0%

crdt

Total

Files count Total bundle size % Changed
1 11.16 kB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
index.js 11.16 kB 0%

@github-actions github-actions Bot added the AI generated PR authored with AI assistance label Oct 5, 2026
@autofix-troubleshooter

Copy link
Copy Markdown

Hi! I'm the autofix logoautofix.ci troubleshooter bot.

It looks like you correctly set up a CI job that uses the autofix.ci GitHub Action, but the autofix.ci GitHub App has not been installed for this repository. This means that autofix.ci unfortunately does not have the permissions to fix this pull request. If you are the repository owner, please install the app and then restart the CI workflow! 😃

@congvc-dev
congvc-dev marked this pull request as ready for review October 5, 2026 18:09
@congvc-bot-x99

congvc-bot-x99 Bot commented Oct 8, 2026

Copy link
Copy Markdown
Author

OCR unavailable — NOT-RUN for cheese-work/actual#132 at head e4440b789e0b1d66b99e41a298973eb58caef980 / base 560cb66ce42626604203bf16e1d60c6c57e49927. multica repo checkout failed because the repository is not configured for this workspace, and the active model is gpt-6-luna rather than the required Sol model. P0/P1/P2 findings were not assessed; no clean-pass claim. Exact-head/base independent non-OCR fallback remains required.

@congvc-bot-x99
congvc-bot-x99 Bot marked this pull request as draft November 3, 2026 23:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

AI generated PR authored with AI assistance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant