Public report of actualbudget/actual, published 17 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 17 November 2026, 03:08 UTC · Survey ID cd_6f776b0837334c26aca3221b03977562

actualbudget/actual

Measured 17 November 2026, 03:06 UTC, at code version 9cb9b72

First survey, so nothing to compare with yet Code coverage: not measured

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 46.4out of 100 At risk

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 239,384 lines of product code in 16 projects, tests not counted · Estimated rebuild effort: about 2.0 person-years · Weakest lens: Architecture, 43.2

Findings by how serious they are

88 critical 1594 serious 355 minor

7 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 03:06 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

84of 84 dimensions measured by tools.
1998of 2037 findings point to an exact file and line, so you can open each one in the code. The other 39 concern the repository as a whole, such as missing documentation.
84dimensions across 7 lenses, read from 239,384 lines of product code in 16 projects.
Chapters

Executive summary

actualbudget/actual is rated At risk because critical security findings are open. Its score is held back in part because it has loops of files that import each other. It scores 46.4 out of 100, which the At risk rating leaves unchanged.

Architecture, at 43.2, is the weakest lens and counts most in the score. The best first step for the work it takes is checking whether the largest projects should be split, worth about 2.2 points. Respecting the front end's boundaries would lift Architecture itself, worth about 2.7 points. Raising Architecture to 70 would lift the score to about 49.3.

Eleven settings leave the servers or containers unsafe. Seven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and six pipeline steps install packages that can change without warning. Correcting the unsafe settings, pinning each tool to an exact version and pinning what the pipeline installs would close these risks. Fixing the weaknesses the scanner points to would fix the five security weaknesses in the code, and updating the vulnerable packages would deal with the four packages with a known security hole. The 12 loops of files that import each other need breaking.

The product code is 239,384 lines, about €300,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Architecture 43.2 · counts for 46%Production Readiness 45.4 · counts for 25%Security and Compliance 49.5 · counts for 14%Code Health 50.3 · counts for 8%Accessibility 51.7 · counts for 4%Performance 60.0 · counts for 2%Maturity 86.8 · counts for 1%

If Architecture rose from 43.2 to 70, the lowest score rated Strong, the score would rise from 46.4 to about 49.3.

Code composition: what the lines of code are
Product code 73%Tests 27%
Rebuild cost: about €300,000 · Estimate
Cost to rebuild€98,000 to €490,000, for 1,641 to 5,205 hours of work, about 2.0 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 46. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 239,384 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json (4).
Raises the score by about 2.2 points · Low effort · Project Cohesion
2
Resolve the 1 Banned license finding(s) in License Compliance — start with package.json.
Raises the score by about 1.4 points · Low effort · License Compliance
3
Fix the listed violations: move the shared test helper into a source directory production code may depend on (2341 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (3 rows).
Raises the score by about 2.7 points · Medium effort · Import Boundaries

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €300,000 to build again, about 2.0 person-years of work. Its weakest lens is Architecture, at 43.2 (Weak). Architecture is about whether the structure holds up as the product grows, and when the structure is weak, a change in one place ripples into many others. Because the weakest lens counts most in the score, work on Architecture also moves the score most.
Based on: the rebuild estimate · the Architecture grade · how much each lens counts
What to do: Start with the Architecture actions in Top priorities.
If you do one thing first · First action
Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion. Of all the actions in this report, it raises the score most for the work it takes: about 2.2 points for low effort, because it clears the 4 Project Cohesion findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 4.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 8% to 18% on every change. The history of the code shows how much it changes: about 108,772 lines over the last 90 days, which is about 441,131 lines a year. At that pace, the extra work comes to an estimated 86.9 to 521.5 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch :app :app @actual-app/api api @actual-app/core core @actual-app/api->@actual-app/core @actual-app/crdt crdt @actual-app/api->@actual-app/crdt @actual-app/cli cli @actual-app/cli->@actual-app/api @actual-app/components components @actual-app/sync-server sync-server @actual-app/sync-server->@actual-app/crdt @actual-app/web web @actual-app/sync-server->@actual-app/web @actual-app/vite-plugin-peggy vite-plugin-peggy android android desktop-electron desktop-electron desktop-electron->@actual-app/sync-server eslint-plugin-actual eslint-plugin-actual mobile-client mobile-client mobile-client->@actual-app/web plugins-service plugins-service

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

354 modules, with 122 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 314 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 api.app.query2 cli.src3 component-library.src4 component-library.src.date-range-picker.util5 component-library.src.icons.v16 desktop-client.src.components.autocomplete7 desktop-client.src.components.banksync8 desktop-client.src.components.budget.goals.constants9 desktop-client.src.components.formula.codeMirror-excelLanguage10 desktop-client.src.components.modals11 desktop-client.src.components.reports.reports12 desktop-client.src.components.sidebar.redesign13 desktop-client.src.hooks.useFormat14 loot-core.src.platform.client.browser-preload15 loot-core.src.server.accounts16 loot-core.src.server.main17 loot-core.src.server.rules.rule18 loot-core.src.types.file19 loot-core.src.types.models.dashboard20 loot-core.src.types.models.rule21 loot-core.src.types.models.templates22 api23 desktop-client.src.components.budget.goals24 desktop-client.src.components.formula25 desktop-client.src.components.modals.BudgetAutomationsModal26 desktop-client.src.components.modals.ImportTransactionsModal27 desktop-client.src.components.reports28 desktop-client.src.components.reports.reports.monte-carlo29 desktop-client.src.components.reports.spreadsheets30 desktop-client.src.components.select31 desktop-client.src.hooks.useSpreadsheet32 desktop-client.src.queries.liveQuery33 loot-core.src.platform.client34 loot-core.src.server.budget35 loot-core.src.shared36 sync-server.src.app-sync.services.files-service37 desktop-client.src.hooks38 desktop-client.src.queries.pagedQuery39 desktop-client.src.components.accounts.Account40 desktop-client.src.queries
1 api.app.query
2 cli.src
3 component-library.src
4 component-library.src.date-range-picker.util
5 component-library.src.icons.v1
6 desktop-client.src.components.autocomplete
7 desktop-client.src.components.banksync
8 desktop-client.src.components.budget.goals.constants
9 desktop-client.src.components.formula.codeMirror-excelLanguage
10 desktop-client.src.components.modals
11 desktop-client.src.components.reports.reports
12 desktop-client.src.components.sidebar.redesign
13 desktop-client.src.hooks.useFormat
14 loot-core.src.platform.client.browser-preload
15 loot-core.src.server.accounts
16 loot-core.src.server.main
17 loot-core.src.server.rules.rule
18 loot-core.src.types.file
19 loot-core.src.types.models.dashboard
20 loot-core.src.types.models.rule
21 loot-core.src.types.models.templates
22 api111
23 desktop-client.src.components.budget.goals13
24 desktop-client.src.components.formula1
25 desktop-client.src.components.modals.BudgetAutomationsModal1
26 desktop-client.src.components.modals.ImportTransactionsModal1
27 desktop-client.src.components.reports12
28 desktop-client.src.components.reports.reports.monte-carlo1
29 desktop-client.src.components.reports.spreadsheets21
30 desktop-client.src.components.select11
31 desktop-client.src.hooks.useSpreadsheet1
32 desktop-client.src.queries.liveQuery1
33 loot-core.src.platform.client11
34 loot-core.src.server.budget2
35 loot-core.src.shared11
36 sync-server.src.app-sync.services.files-service1
37 desktop-client.src.hooks112
38 desktop-client.src.queries.pagedQuery11
39 desktop-client.src.components.accounts.Account111
40 desktop-client.src.queries311
Uses a module listed above itPart of a loopThe module itself
1 api.app.query2 cli.src3 component-library.src4 component-library.src.date-range-picker.util5 component-library.src.icons.v16 desktop-client.src.components.autocomplete7 desktop-client.src.components.banksync8 desktop-client.src.components.budget.goals.constants9 desktop-client.src.components.formula.codeMirror-excelLanguage10 desktop-client.src.components.modals11 desktop-client.src.components.reports.reports12 desktop-client.src.components.sidebar.redesign13 desktop-client.src.hooks.useFormat14 loot-core.src.platform.client.browser-preload15 loot-core.src.server.accounts16 loot-core.src.server.main17 loot-core.src.server.rules.rule18 loot-core.src.types.file19 loot-core.src.types.models.dashboard20 loot-core.src.types.models.rule21 loot-core.src.types.models.templates22 api23 desktop-client.src.components.budget.goals24 desktop-client.src.components.formula25 desktop-client.src.components.modals.BudgetAutomationsModal26 desktop-client.src.components.modals.ImportTransactionsModal27 desktop-client.src.components.reports28 desktop-client.src.components.reports.reports.monte-carlo29 desktop-client.src.components.reports.spreadsheets30 desktop-client.src.components.select31 desktop-client.src.hooks.useSpreadsheet32 desktop-client.src.queries.liveQuery33 loot-core.src.platform.client34 loot-core.src.server.budget35 loot-core.src.shared36 sync-server.src.app-sync.services.files-service37 desktop-client.src.hooks38 desktop-client.src.queries.pagedQuery39 desktop-client.src.components.accounts.Account40 desktop-client.src.queriesapi.app.query1cli.src2component-library.src3component-library.src.date-range-picker.util4component-library.src.icons.v15desktop-client.src.components.autocomplete6desktop-client.src.components.banksync7desktop-client.src.components.budget.goals.constants8desktop-client.src.components.formula.codeMirror-excelLanguage9desktop-client.src.components.modals10desktop-client.src.components.reports.reports11desktop-client.src.components.sidebar.redesign12desktop-client.src.hooks.useFormat13loot-core.src.platform.client.browser-preload14loot-core.src.server.accounts15loot-core.src.server.main16loot-core.src.server.rules.rule17loot-core.src.types.file18loot-core.src.types.models.dashboard19loot-core.src.types.models.rule20loot-core.src.types.models.templates21api22desktop-client.src.components.budget.goals23desktop-client.src.components.formula24desktop-client.src.components.modals.BudgetAutomationsModal25desktop-client.src.components.modals.ImportTransactionsModal26desktop-client.src.components.reports27desktop-client.src.components.reports.reports.monte-carlo28desktop-client.src.components.reports.spreadsheets29desktop-client.src.components.select30desktop-client.src.hooks.useSpreadsheet31desktop-client.src.queries.liveQuery32loot-core.src.platform.client33loot-core.src.server.budget34loot-core.src.shared35sync-server.src.app-sync.services.files-service36desktop-client.src.hooks37desktop-client.src.queries.pagedQuery38desktop-client.src.components.accounts.Account39desktop-client.src.queries401111311112121111111211111211111311+314 more modules (most-connected shown)

At a glance — Code Health · 50.3 · Adequate · gated by D1, D2, X5 ·

At a glance — Architecture · 43.2 · Weak · gated by R11, R9 ·

At a glance — Maturity · 86.8 · Strong ·

At a glance — Readiness · 45.4 · Weak · gated by D11, R8, P7 ·

At a glance — Security · 49.5 · Weak · gated by D29 ·

At a glance — Accessibility · 51.7 · Adequate · gated by AC2, AC4 ·

At a glance — Performance · 60.0 · Adequate ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection59High / Critical
A02:2025 — Security Misconfiguration22High / Critical
A03:2025 — Software Supply Chain Failures17High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Fix the listed violations: move the shared test helper into a source directory production code may depend on (2341 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (3 rows); Break each cycle by extracting the shared piece into a module both sides can import; Resolve the 23 Flaky test finding(s) in Test Reliability — start with ssrf.test.ts (2), fetch.integration.test.ts.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json (4).+2.2 ptsLowProject Cohesion
Resolve the 1 Banned license finding(s) in License Compliance — start with package.json.+1.4 ptsLowLicense Compliance
Fix the listed violations: move the shared test helper into a source directory production code may depend on (2341 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (3 rows).+2.7 ptsMediumImport Boundaries
Break each cycle by extracting the shared piece into a module both sides can import.+2.7 ptsMediumCircular Imports
Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with useReports.ts (3), ReportRouter.tsx, vitest.web.config.ts.+1.2 ptsLowChange Coupling
Resolve the 23 Flaky test finding(s) in Test Reliability — start with ssrf.test.ts (2), fetch.integration.test.ts.+2.3 ptsMediumTest Reliability
Resolve the 3 Off the main sequence finding(s) in Coupling.+1.1 ptsLowCoupling
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+1.6 ptsMediumDependency Hygiene

File quality

Per-file score 0–10 — a quality signature. Of 474 files carrying findings, judged against the Production bar: 1% slop · 60% mixed · 39% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.9SlopIaC & Container Security: High IaC: REDACTED
REDACTED1.3SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.0SlopIaC & Container Security: High IaC: REDACTED
REDACTED3.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.4SlopIaC & Container Security: High IaC: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
packages/desktop-client/src/components/reports/ReportRouter.tsx5.0MixedChange Coupling: Boundary-crossing change coupling: ReportRouter.tsx ↔ prefs.ts
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
packages/desktop-client/src/components/reports/ReportSidebar.tsx5.6MixedCyclomatic Complexity: ReportSidebar.ReportSidebar (cyclomatic 40)
packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx5.6MixedCyclomatic Complexity: ImportTransactionsModal.ImportTransactionsModal::onImport (cyclomatic 33)
packages/desktop-client/src/components/reports/reports/CustomReport.tsx5.7MixedCyclomatic Complexity: CustomReport.CustomReportInner (cyclomatic 102)

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 88

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 1594

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 355

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 7

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 84 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 1.0, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 84 dimensions across the health lenses
D1D2D3D5D6D7D10D11D13D14D15D16D17D19D21D22D23D24D26D28D29D30D31D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX6C1C2C5GD1IC1M1M2M3M4P1P10P2P3P4P5P6P7P8PF3R1R10R11R2R3R4R6R7R8R9S1X1X12X16X17X19X2X21X23X24X25X28X29X3X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1998 of 2037 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1e777-f8c6-75d5-91de-d17ba1816489.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 0 dependency(ies) and leaving 4 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D20 ADR Quality — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR lexicon (adr-lexicon-1) covers de, en, it, nl. A record identified as another language, or whose language could not be identified (fewer than 25 words of prose, or no clear winner), is never read with English rules: its missing-section, status, consequence-cost and same-question rules abstain, and only the structural rules (title, single option, dangling link, enforcement field) run.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D22's deterministic call-shape rules are gated per language (docs/plans/deterministic-engine.md, P5; C# and each NeutralApiArms arm pass): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D23 Boundary Type-Coupling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind measured 0/40 valid on a seeded held-out sample of its rows on 98 C# repositories (docs/plans/deterministic-engine/adjudication/P5c-D23-units.md, "Version 1 ON MAIN"): the noise rows were dependencies on layer folders, shared cores and grouping folders read as contexts. By the pre-registered fallback (PREREGISTRATION v37) it publishes no row until version 4 passes its gate. The candidates are counted here, not reported as findings, and the score does not include them.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/api/models.ts`, `packages/ci-actions/src/news-feed/parse.ts`, `packages/ci-actions/src/versions/get-next-package-version.ts`, `packages/component-library/src/AlignedText.stories.tsx`, `packages/component-library/src/Block.stories.tsx`, … (+146 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AC2 Forms & labels — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in REDACTED, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. User interface: 1046 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. Boot: crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:3001: page.goto: net::ERR_CONNECTION_RESET at http://127.0.0.1:3001/ Call log: - navigating to "http://127.0.0.1:3001/", waiting until "load" ran the repo's playwright suite against the booted app but captured no surfaces (suite failed to install/run, or visited no pages) — see runtime diagnostics.
  • IC1 Incompleteness & stubs — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 12 further occurrence(s) are not listed individually; the score already reflects all 52.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P2 Observability — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 31 further occurrence(s) are not listed individually; the score already reflects all 71.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 657 further occurrence(s) are not listed individually; the score already reflects all 697.
  • R11 Import Boundaries — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2304 further occurrence(s) are not listed individually; the score already reflects all 2344.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 324 further occurrence(s) are not listed individually; the score already reflects all 364.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 86 further occurrence(s) are not listed individually; the score already reflects all 126.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 21 further occurrence(s) are not listed individually; the score already reflects all 61.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 247 further occurrence(s) are not listed individually; the score already reflects all 287.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 46 further occurrence(s) are not listed individually; the score already reflects all 86.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala, Rust, Go, Swift, Erlang, F# and Visual Basic source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D22 Internal API Consistency: API consistency compares the call shapes of members that play the same role on the exposed C# surface: whether the API suits its callers is not measured, and surfaces in other languages are not measured.
  • D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • C5 Data-Subject Rights: This control is scored from in-repo evidence only — absence of evidence here means the scan found no in-repo trace, not that the control does not exist.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity3.2 / 10Weak✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 3.2 / 10 · rule-coverage 100% · ceiling Prevented

257 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was monteCarloSimulation.runMonteCarloSimulation at 169. A further 6 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being mutations.useBudgetActions at 27 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: packages/desktop-client/src/budget/mutations.ts (mutations.useBudgetActions at 27), packages/desktop-client/src/components/HelpMenu.tsx (HelpMenu.getPageDocs at 18), packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx (EnvelopeBudgetComponents.ExpenseCategoryMonth at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

TransactionsTable.Transaction::renderColumnCell (cyclomatic 47) · ×2packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629
FiltersMenu.ConfigureField::setOp (cyclomatic 36) · ×2packages/desktop-client/src/components/filters/FiltersMenu.tsx:232
monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots (cyclomatic 27) · ×2packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1647
monteCarloSimulation.runMonteCarloSimulation (cyclomatic 169)packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400
TransactionsTable.TransactionTable (cyclomatic 121)packages/desktop-client/src/components/transactions/TransactionsTable.tsx:3140

+ 248 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with monteCarloSimulation.runMonteCarloSimulation (cyclomatic 169), TransactionsTable.TransactionTable (cyclomatic 121). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 3.2 to about 3.9/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

303 method(s) exceeded the cognitive complexity threshold of 15; the worst was monteCarloSimulation.runMonteCarloSimulation at 479.

TransactionsTable.Transaction::renderColumnCell (cognitive 61) · ×3packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629
monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots (cognitive 53) · ×2packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1647
createOnce.Program:exit (cognitive 46) · ×2packages/eslint-plugin-actual/lib/rules/prefer-const.js:265
FiltersMenu.ConfigureField::setOp (cognitive 44) · ×2packages/desktop-client/src/components/filters/FiltersMenu.tsx:232
monteCarloSimulation.runMonteCarloSimulation (cognitive 479)packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400

+ 290 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 3 bodies over 120 down to 120 or less in Cognitive Complexity — start with monteCarloSimulation.runMonteCarloSimulation (cognitive 479), TransactionsTable.TransactionTable (cognitive 166), BalanceForecast.BalanceForecastInner (cognitive 150). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes4.5 / 10Weak✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 4.5 / 10 · rule-coverage 100% · ceiling Prevented

354 god class(es) detected.

FunctionTooLong: monteCarloSimulation.runMonteCarloSimulation · ×281packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400
FileTooLong: transactions/TransactionsTable.tsx · ×56packages/desktop-client/src/components/transactions/TransactionsTable.tsx
ClassTooLong: AccountInternal · ×11packages/desktop-client/src/components/accounts/Account.tsx:310
MethodTooLong: AccountInternal.render · ×4packages/desktop-client/src/components/accounts/Account.tsx:1853
TooManyMethods: AccountInternal · ×2packages/desktop-client/src/components/accounts/Account.tsx:310

What to do

  1. Resolve the 281 FunctionTooLong finding(s) in God Classes — start with TransactionsTable.tsx (4), SelectLinkedAccountsModal.tsx (3), TransactionList.tsx (3). — One of this dimension's main actionable groups (281 warning-level).
  2. Resolve the 56 FileTooLong finding(s) in God Classes — start with REDACTED (3), index.ts (3), mutations.ts (2). — One of this dimension's main actionable groups (56 warning-level).
  3. Resolve the 11 ClassTooLong finding(s) in God Classes — start with Account.tsx, MonteCarloRunDetailTable.tsx, ImportTransactionsModal.tsx. — One of this dimension's main actionable groups (11 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling8.3 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.3 / 10 · rule-coverage 100% · ceiling Prevented

14 production modules (Gradle+npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 3 module(s) off the main sequence, with abstractness counted on 11 of the 14 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: @actual-app/crdt · ×3

What to do

  1. Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.3 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Verified

2 of 36 classes have LCOM4 above 3.

Low cohesion: BudgetPage (LCOM4 4) · ×2packages/desktop-client/e2e/page-models/budget-page.ts:6

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with budget-page.ts, mobile-budget-page.ts. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D7 · Architectural Integrity6.0 / 10Adequate✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Prevented

No mechanizable ADR was identified, so enforcement is not measured. Dependency cycles not checked (no project-reference graph; where this repository's language has an import-cycle lens, cycles are reported there).

Detailed fixes: d7_recommendation.md.

D10 · Test Quality10.0 / 10Stronggated by 12 serious findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

14 skipped (7 with a documented reason), 2 zero-assertion, 3 synchronised by a fixed sleep, no mocking-framework packages referenced (hand-written doubles or no mocking) across 3870 tests.

Skipped test: should always sync clients into the same state · ×7packages/loot-core/src/server/sync/sync.property.test.ts:316
Fixed-sleep synchronisation: keeps an open waiting while a write replaces the file · ×3packages/loot-core/src/platform/server/sqlite/storage/opfs-sahpool.test.ts:626
No assertions: Transfers are properly updated · ×2packages/loot-core/src/server/main.test.ts:215
Mock-dominated test: uses institution transaction_total_days for maxHistoricalDays by default · ×17packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.ts:265
Skipped (documented): (unnamed test) · ×7packages/loot-core/src/shared/async.test.ts:32

What to do

  1. Resolve the 7 Skipped test finding(s) in Test Quality — start with storage.test.ts (4), sync.property.test.ts (2), TransactionsTable.test.tsx. — One of this dimension's main actionable groups (7 warning-level).
  2. Resolve the 3 Fixed-sleep synchronisation finding(s) in Test Quality — start with opfs-sahpool.test.ts, pagedQuery.test.ts, lock.test.ts. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 2 No assertions finding(s) in Test Quality — start with main.test.ts, transfer.test.ts. — One of this dimension's main actionable groups (2 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D11 · Test Reliability0.0 / 10Critical✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Verified

23 flaky across 1 measured tier(s). JavaScript/TypeScript (vitest via `yarn install --immutable --mode=skip-build` in the repository root (2828 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/api/ (5 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/ci-actions/ (31 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/cli/ (193 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/component-library/ (12 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/crdt/ (20 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/desktop-client/ (1764 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/desktop-electron/ (13 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/eslint-plugin-actual/ (175 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/loot-core/ (1532 tests); vitest via `yarn install --immutable --mode=skip-build` in packages/sync-server/ (852 tests)): measured (23 flaky).

Flaky test: packages/sync-server/src/accounts/password.test.js::loginWithPassword legacy hash upgrade does not rehash an existing argon2id hash on login · ×23

What to do

  1. Resolve the 23 Flaky test finding(s) in Test Reliability — start with ssrf.test.ts (2), fetch.integration.test.ts. — One of this dimension's main actionable groups (23 issue-level).

Detailed fixes: d11_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 1399 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 1401 package(s) this repository's committed lockfile installs for a consumer — its 67 production, optional and peer dependency(ies), across 14 product package.json manifest(s), and everything those install in turn. Its 216 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. 3 of them publish no licence this pass can read on registry.npmjs.org — an absent field, `UNLICENSED`, or a `SEE LICENSE IN <file>` pointer into a tarball this pass does not download; that is missing data, not a violation, and none of them is charged. A further 2 package(s) the lockfile resolves are not published on the public registry at all — a private scope, a workspace-internal name or a git install — and are outside this verdict. No third-party code was found shipping without a manifest entry (vendored or copied-in directories, licence comments preserved in committed bundles, bundled module paths, compiled wasm modules). This repository publishes itself under ISC / MIT, which is its own choice and is not judged here.

Banned license: hyperformulapackages/loot-core/package.json:211

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance — start with package.json. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d14_recommendation.md · top locations in Appendix A, every location in findings.md.

D15 · Churn × Complexity Hotspots9.3 / 10Stronggated by 69 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts (12×274=3288); packages/desktop-client/src/components/transactions/TransactionsTable.tsx (10×198=1980); packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx (9×106=954)

Hotspot: packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts · ×69packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400

What to do

  1. Resolve the 69 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED (3), monteCarloSimulation.ts, TransactionsTable.tsx. — One of this dimension's main actionable groups (69 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

56 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts. Counted over 781 of the 1882 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×4
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt9.9 / 10Stronggated by 93 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

93 deducted task-comment markers across 231337 LoC (0.0/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×86REDACTED:134
FixmeComment · ×4REDACTED:133
HackComment · ×3packages/desktop-client/src/hooks/useFormat.ts:127

What to do

  1. Resolve the 86 TodoComment finding(s) in Explicit Debt — start with index.ts (7), REDACTED (7), spreadsheet.ts (4). — One of this dimension's main actionable groups (86 warning-level).
  2. Resolve the 4 FixmeComment finding(s) in Explicit Debt — start with REDACTED (4). — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 HackComment finding(s) in Explicit Debt — start with useFormat.ts, RuleEditor.tsx, codeMirror-excelLanguage.tsx. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

1 of 2 documentation facets pass in full; short on: F2 example. 137 document(s) read across 15 unit(s).

Documentation: no build, run or usage exampleREADME.md:1

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency8.4 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Verified

6 naming inconsistencies among 371 declarations measured against a convention their peers follow.

`getIDByName` spells `ID` where 298 names in the project spell it `Id`packages/api/methods.ts:469
`OpenIDEnableModal` spells `ID` where 298 names in the project spell it `Id`packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx:28
`AmountOPType` spells `OP` where 44 names in the project spell it `Op`packages/loot-core/src/server/api-models.ts:224
`getOpenIDConfig` spells `ID` where 298 names in the project spell it `Id`packages/sync-server/src/services/user-service.ts:264
`enableOpenID` spells `ID` where 23 names in the project spell it `Id`packages/sync-server/src/account-db.js:157

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 `getIDByName` spells `ID` where 298 names in the project spell it `Id` finding(s) in Naming Consistency — start with methods.ts. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `OpenIDEnableModal` spells `ID` where 298 names in the project spell it… finding(s) in Naming Consistency — start with OpenIDEnableModal.tsx. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `AmountOPType` spells `OP` where 44 names in the project spell it `Op` finding(s) in Naming Consistency — start with api-models.ts. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D22 · Internal API Consistency10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the internal API surface is consistent and coherent.

Method: Call-shape rules (A1-A9) over the structured code model of the intentionally exposed C# surface: members of one type, overloads of one name and the same slot across sibling types are compared, and a member that makes a caller use a different convention for the same kind of operation is flagged. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 API inconsistencies among 50 exposed members measured against a convention their peers follow.

✓ On the Gold path — maintain.

Detailed fixes: d22_recommendation.md.

D23 · Boundary Type-Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether domain types (IDs, enums, value objects) leak across bounded-context boundaries.

Method: Cross-context domain-type leakage via Roslyn structural classification (strongly-typed IDs / value objects) over every public surface. Exhaustive, deterministic, type-level aggregate-boundary check.

Coverage: Bounded contexts derived from NAMESPACE prefix (or graph-inferred where available); cross-boundary domain-type leakage then checked exhaustively over every public member of every type.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

70 domain type(s) cross context boundaries across 13 contexts; they are measured and withheld (not published, not scored). Contexts: api, ci-actions, cli, component-library, crdt, desktop-client, desktop-electron, docs, eslint-plugin-actual, loot-core, plugins-service, sync-server and 1 more.

✓ On the Gold path — maintain.

Detailed fixes: d23_recommendation.md.

D24 · Comment Value9.1 8.9 / 10Strong✓ Tool-verified

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 98% · ceiling Documented

46 of 4927 judged comments only repeat the code they sit on (0.9 %). 125 comment(s) in another language or script were not judged.

redundant comment · ×37packages/api/methods.test.ts:213
doc comments repeat the names · ×4packages/crdt/src/crdt/timestamp.ts:92

What to do

  1. Resolve the 37 redundant comment finding(s) in Comment Value — start with index.ts (3), methods.test.ts (2), mutations.ts (2). — One of this dimension's main actionable groups (37 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion5.0 / 10Adequate✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

4 of 16 build units (Gradle, Xcode, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×4packages/desktop-client/package.json:1

What to do

  1. Resolve the 4 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json (4). — One of this dimension's main actionable groups (4 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Documented

2 finding(s): 0 critical, 2 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

60 finding(s): 0 critical, 21 high, 39 medium, 0 low. semgrep hit a parse error in 176 file(s) — `packages/api/methods.test.ts` (line 984), `packages/api/models.ts` (line 1), `packages/ci-actions/src/news-feed/parse.ts` (lines 44–46, lines 46–47), `packages/ci-actions/src/versions/get-next-package-version.ts` (line 102), `packages/component-library/src/AlignedText.stories.tsx` (line 12), … (+171 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 7 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 9 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (6 issue-level).
  3. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities4.7 / 10Weak✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 4.7 / 10 · rule-coverage 100% · ceiling Documented

14 finding(s): 2 critical, 2 high, 8 medium, 2 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 8 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).
  2. Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. Resolve the 2 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D31 · IaC & Container Security5.5 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Documented

22 finding(s): 0 critical, 11 high, 7 medium, 4 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 11 High IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
  2. Resolve the 7 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 4 Low IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness8.2 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Documented

140 of 781 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is packages/desktop-client/src/components/BackgroundImage.tsx. Counted over 781 of the 1882 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgepackages/desktop-client/src/components/BackgroundImage.tsx:1
Orphaned file · ×139packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with BackgroundImage.tsx. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 139 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (5), budgetfilesSlice.ts, crossover-spreadsheet.ts. — One of this dimension's main actionable groups (139 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.5 / 10Adequategated by 5 critical findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: CustomReport.tsx↔makeQuery.ts 90%; LineGraph.tsx↔StackedBarGraph.tsx 87%; Overview.tsx↔ReportRouter.tsx 85%

Boundary-crossing change coupling: useReports.ts ↔ reports.ts · ×5packages/desktop-client/src/hooks/useReports.ts:1
Change coupling: Experimental.tsx ↔ useFeatureFlag.ts · ×28packages/desktop-client/src/components/settings/Experimental.tsx:1
Change-coupling hub: CustomReport.tsx → SaveReport.tsx, ReportTableHeader.tsx, ReportTableTotals.tsx, GetCardData.tsx, makeQuery.ts, useReports.ts · ×7packages/desktop-client/src/components/reports/reports/CustomReport.tsx
Change coupling clique: AreaGraph.tsx, BarGraph.tsx, DonutGraph.tsx, LineGraph.tsx, StackedBarGraph.tsx · ×2packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx

What to do

  1. Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with useReports.ts (3), ReportRouter.tsx, vitest.web.config.ts. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 28 Change coupling finding(s) in Change Coupling — start with ReportOptions.ts (2), main.ts (2), AccountAutocomplete.tsx (2). — One of this dimension's main actionable groups (28 warning-level).
  3. Resolve the 7 Change-coupling hub finding(s) in Change Coupling — start with CustomReport.tsx, ReportRouter.tsx, EnvelopeBalanceMenuModal.tsx. — One of this dimension's main actionable groups (7 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 7.5 / 10 · rule-coverage 100% · ceiling Documented

3/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 2 platform declaration(s) and 0 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels3.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×24) — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:36, packages/desktop-client/src/components/accounts/Header.tsx:645, packages/desktop-client/src/components/accounts/Reconcile.tsx:182, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×2) — packages/desktop-client/src/components/Notes.tsx:56, packages/desktop-client/src/components/formula/QueryManager.tsx:677
  • This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×13) — packages/desktop-client/src/components/common/Search.tsx:73, packages/desktop-client/src/components/formula/QueryManager.tsx:224, packages/desktop-client/src/components/manager/ConfigServer.tsx:504, …
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:192

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure5.4 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — packages/desktop-client/index.html:5
  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — packages/desktop-electron/loading.html:1
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. — packages/desktop-electron/loading.html:1
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — packages/desktop-electron/loading.html:1

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics2.7 / 10Weak✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. — packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:197
  • This <path> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus. — packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx:94

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety7.9 / 10Strong✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.recharts-wrapper:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — packages/desktop-client/index.html:75
  • <textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator. — packages/desktop-client/src/components/formula/QueryManager.tsx:677
  • <input> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator. — packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:192

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.8 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

C1 · Data Protection6.5 / 10Adequate✓ Tool-verified

Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.

Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.

What to do

  • Strengthen data-at-rest protection: vault your keys (AWS KMS / Secrets Manager, Azure Key Vault, GCP KMS / REDACTED Manager, HashiCorp Vault) and encrypt the most sensitive columns (typeorm-encrypted, prisma-field-encryption, mongoose-field-encryption or MongoDB CSFLE) — partial coverage still leaves gaps.
C2 · Access Controls5.0 / 10Adequate✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Access here is not default-deny: this route in app declares no guard, while its 9 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization. — REDACTED:20
  • Access here is not default-deny: this route in app declares no guard, while its 7 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization. — REDACTED:129
  • Access here is not default-deny: this route in app declares no guard, while its 6 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization. — packages/sync-server/src/app-gocardless/app-gocardless.ts:87
  • Here who is asking is taken from the 'role' form field (const{userName, role, displayName, enabled} = req.body||{}) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:57
  • Here who is asking is taken from the 'role' form field (const{id, userName, role, displayName, enabled} = req.body||{}) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:109
  • Here who is asking is taken from the 'X-Actual-File-Id' request header (const fileId = req.get('X-Actual-File-Id')) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. (×3) — packages/sync-server/src/app-secrets.js:38, packages/sync-server/src/app-secrets.js:132, REDACTED:36
  • Here who is asking is taken from the 'x-actual-file-id' request header (const fileId = req.headers['x-actual-file-id']) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:336
  • Here who is asking is taken from the 'x-actual-group-id' request header (const groupIdHeader = req.headers['x-actual-group-id']) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed. — REDACTED:347
  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect. — packages/sync-server/src/app-gocardless/services/gocardless-service.ts:95

What to do

  • Put every endpoint behind the guard its siblings carry — mount the router after (or with) the authentication middleware, or declare the guard and the rule it needs on the route — so the open surface is only what is public on purpose.
  • Keep who is signed in on the server: give the browser only a long random session id (express-session, iron-session, a sessions table), or sign the cookie (cookie-parser with a secret and req.signedCookies, a verified JWT), and look the user up from that — never from an id, role or token claim the browser sends unchecked.
  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
C5 · Data-Subject Rights4.0 / 10Weak✓ Tool-verified

Other · Security — Whether GDPR data-subject requests are supported in code — erasure, export/portability, consent.

Method: Roslyn scan: GDPR data-subject-rights corroboration (erasure/export/consent vocabulary co-occurring with subject-id store crossing or explicit GDPR pattern). Deterministic, gated by PII.

  • Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.

What to do

  • Implement data export/portability for a data subject (a machine-readable export of their personal data).
  • Track GDPR consent (lawful basis) alongside the personal data it authorises.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs6.0 / 10Adequate✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `ensureSuccessResponse` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts:94
  • `onEditCategoryGroup` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx:84
  • `onToggleCollapse` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx:86
  • `onNext` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:288
  • `onChange` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:683
  • `onCloseAddTransaction` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:685
  • `onApplyFilter` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:687
  • `onBatchDelete` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:688
  • `onBatchDuplicate` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:689
  • `onBatchLinkSchedule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:690
  • `onBatchUnlinkSchedule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:691
  • `onCreateRule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:692
  • `onScheduleAction` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:693
  • `onMakeAsNonSplitTransactions` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:694
  • `authorizeBank` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — packages/desktop-client/src/enablebanking.ts:129, packages/desktop-client/src/gocardless.ts:50
  • `stopSyncServer` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/desktop-electron/index.ts:513
  • `saveState` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/desktop-electron/window-state.ts:49
  • The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/eslint-plugin-actual/lib/rules/no-untranslated-strings.js:104
  • `runMigration` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×4) — packages/loot-core/migrations/1722717601000_reports_move_selected_categories.js:1, packages/loot-core/migrations/1722804019000_create_dashboard_table.js:5, packages/loot-core/migrations/1765518577215_multiple_dashboards.js:3, …
  • `mkdir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — packages/loot-core/src/platform/server/fs/fs.legacy.ts:384, packages/loot-core/src/platform/server/fs/fs.web.ts:240
  • `size` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/platform/server/fs/fs.legacy.ts:388
  • `removeDir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. (×2) — packages/loot-core/src/platform/server/fs/fs.legacy.ts:503, packages/loot-core/src/platform/server/fs/fs.web.ts:288
  • `init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/platform/server/sqlite/index.electron.ts:48
  • `stopGoCardlessWebTokenPolling` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/accounts/app.ts:872
  • `stopEnableBankingPollAuth` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/accounts/app.ts:1202
  • `stopServices` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/app.ts:79
  • The guard above `return whereStr;` also returns `whereStr`, so no input can make it matter. Implement the distinction that was intended, or delete the guard. — packages/loot-core/src/server/aql/compiler.ts:28
  • `applySql` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/migrate/migrations.ts:122
  • `updateSpreadsheetCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/sheet.ts:32
  • `createQuery` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/spreadsheet/app.ts:41
  • `_applyMessages` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/sync/index.ts:402
  • `errorHandler` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/sync/index.ts:693
  • `repairSync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/loot-core/src/server/sync/repair.ts:27
  • `up` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/sync-server/migrations/1719409568000-multiuser.js:5

What to do

  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)8.1 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.5 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 3/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/cli`, `packages/desktop-electron`, `packages/mobile-client/ios/App`.
  • `packages/loot-core/src/mocks/budget.ts` reports through `console.*` at line 901 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/loot-core/src/mocks/budget.ts:901
  • `packages/loot-core/src/mocks/setup.ts` reports through `console.*` at line 32 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/loot-core/src/mocks/setup.ts:32
  • `packages/loot-core/src/mocks/setup.ts` reports through `console.*` at line 135 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/loot-core/src/mocks/setup.ts:135
  • `packages/sync-server/app.ts` reports through `console.*` at line 9 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/app.ts:9
  • `packages/sync-server/vitest.globalSetup.js` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/vitest.globalSetup.js:34
  • `packages/sync-server/vitest.globalSetup.js` reports through `console.*` at line 58 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/vitest.globalSetup.js:58
  • `REDACTED` reports through `console.*` at line 167 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:167
  • `REDACTED` reports through `console.*` at line 320 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:320
  • `REDACTED` reports through `console.*` at line 398 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:398
  • `REDACTED` reports through `console.*` at line 31 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:31
  • `REDACTED` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:109
  • `REDACTED` reports through `console.*` at line 164 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:164
  • `REDACTED` reports through `console.*` at line 179 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:179
  • `REDACTED` reports through `console.*` at line 201 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:201
  • `REDACTED` reports through `console.*` at line 213 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:213
  • `REDACTED` reports through `console.*` at line 217 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:217
  • `REDACTED` reports through `console.*` at line 219 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:219
  • `REDACTED` reports through `console.*` at line 222 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:222
  • `packages/sync-server/src/migrations.ts` reports through `console.*` at line 44 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/migrations.ts:44
  • `packages/sync-server/src/migrations.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/migrations.ts:63
  • `packages/sync-server/src/migrations.ts` reports through `console.*` at line 70 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/migrations.ts:70
  • `packages/sync-server/src/account-db.js` reports through `console.*` at line 220 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/account-db.js:220
  • `packages/sync-server/src/account-db.js` reports through `console.*` at line 287 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/account-db.js:287
  • `REDACTED` reports through `console.*` at line 82 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:82
  • `REDACTED` reports through `console.*` at line 89 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:89
  • `REDACTED` reports through `console.*` at line 56 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:56
  • `REDACTED` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:59
  • `REDACTED` reports through `console.*` at line 76 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:76
  • `REDACTED` reports through `console.*` at line 108 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:108
  • `REDACTED` reports through `console.*` at line 118 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:118
  • `REDACTED` reports through `console.*` at line 157 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:157
  • `REDACTED` reports through `console.*` at line 166 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:166
  • `REDACTED` reports through `console.*` at line 208 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:208
  • `packages/sync-server/src/util/middlewares.ts` reports through `console.*` at line 29 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/middlewares.ts:29
  • `packages/sync-server/src/util/prompt.ts` reports through `console.*` at line 7 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/prompt.ts:7
  • `packages/sync-server/src/util/prompt.ts` reports through `console.*` at line 16 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/prompt.ts:16
  • `packages/sync-server/src/util/validate-user.ts` reports through `console.*` at line 51 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/validate-user.ts:51
  • `packages/sync-server/src/util/validate-user.ts` reports through `console.*` at line 62 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/validate-user.ts:62
  • `packages/sync-server/src/util/validate-user.ts` reports through `console.*` at line 65 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/sync-server/src/util/validate-user.ts:65

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • No persistence guard on critical data stores — use Docker named volumes (or your orchestrator's persistent-volume equivalent) so the data store can't be wiped by a container recreate (or, in cloud, set purge-protection / soft-delete / prevent_destroy).
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×5) — REDACTED:47, REDACTED:213, REDACTED:421, …

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
P8 · Schema migrations10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether database schema changes go through versioned migrations rather than being auto-created from the model at startup.

Method: Roslyn scan: EF Core DbContext for a versioned migrations directory versus bare EnsureCreated usage; off .NET, a file scan of dependency manifests, migration histories (Flyway, Liquibase, Alembic, Django, Rails, Prisma, TypeORM, Knex/Sequelize, golang-migrate, goose, Laravel, Doctrine, Diesel/sqlx) and schema auto-create in production source or config. Exhaustive, deterministic.

PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

  • `rmSync` in `callback to action` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/cli/src/commands/sync.ts:90
  • `writeFileSync` in `acquireShared` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/cli/src/lock.ts:140
  • `rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/cli/src/lock.ts:147
  • `fs.readFileSync` in `loadGlobalPrefs` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/index.ts:197
  • `fs.existsSync` in `startSyncServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/index.ts:448
  • `fs.existsSync` in `ipcMain.handle("set-document-dir")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/index.ts:767
  • `fs.existsSync` in `ipcMain.handle("move-budget-directory")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/index.ts:901
  • `fs.readFileSync` in `loadState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/window-state.ts:25
  • `fs.writeFileSync` in `saveState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — packages/desktop-electron/window-state.ts:51
  • `fs.statSync` in `removeDirRecursively` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. (×2) — packages/loot-core/src/platform/server/fs/index.api.ts:128, packages/loot-core/src/platform/server/fs/index.electron.ts:142
  • `fs.existsSync` in `findPackageJson` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:95
  • `readFileSync` in `findPackageJson` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:97

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety9.7 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

R10 · Code Duplication4.4 / 10Weak✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 106 duplicated blocks under packages/desktop-client/src/components/ have copies in at least two of the sibling directories accounts, admin, autocomplete, banksync, budget, common (+15 more sibling(s) not listed) — 55 of them are reported below, and 51 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 106 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 106 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 106 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69
  • 30 duplicated blocks under packages/desktop-client/src/ have copies in at least two of the sibling directories account-groups, accounts, budget, components, hooks, notifications (+5 more sibling(s) not listed) — 16 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 30 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx:50
  • 22 duplicated blocks under packages/desktop-client/src/components/mobile/ have copies in at least two of the sibling directories accounts, banksync, budget, payees, rules, schedules (+2 more sibling(s) not listed) — 21 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop-client/src/components/mobile/rules/RulesList.tsx:27
  • 21 duplicated blocks under packages/ have copies in at least two of the sibling directories api, ci-actions, component-library, desktop-client, desktop-electron, loot-core (+1 more sibling(s) not listed) — 14 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 21 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/api/app/query.ts:62
  • 17 duplicated blocks under packages/desktop-client/src/components/budget/ have copies in at least two of the sibling directories envelope, tracking — 14 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 17 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353
  • 13 duplicated blocks under packages/loot-core/src/server/ have copies in at least two of the sibling directories account-groups, accounts, admin, auth, budget, budgetfiles (+12 more sibling(s) not listed) — 5 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/loot-core/src/server/accounts/app.ts:84
  • 7 duplicated blocks under packages/component-library/src/icons/ have copies in at least two of the sibling directories logo, v0, v1, v2 — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/component-library/src/icons/v1/LockClosed.tsx:3
  • packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:93 · packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx:73 — the two spans are one implementation copied and then locally edited — 1122 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:93
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:27 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloLumpSums.tsx:37 — the two spans are one implementation copied and then locally edited — 1016 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:27
  • packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx:54 · packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx:41 — the two spans are one implementation copied and then locally edited — 657 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx:54
  • packages/loot-core/src/server/budget/envelope.ts:48 · packages/loot-core/src/server/budget/tracking.ts:23 — the two spans are one implementation copied and then locally edited — 997 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/loot-core/src/server/budget/envelope.ts:48
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:219 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloLumpSums.tsx:195 — the two spans are one implementation copied and then locally edited — 695 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:219
  • packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:60 · packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx:62 — the two spans are one implementation copied and then locally edited — 795 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:60
  • packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:360 · packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:118 — the two spans are one implementation copied and then locally edited — 645 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:360
  • packages/desktop-client/src/components/reports/reports/CashFlow.tsx:147 · packages/desktop-client/src/components/reports/reports/Sankey.tsx:682 — the two spans are one implementation copied and then locally edited — 536 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/CashFlow.tsx:147
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:50 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:34 — the two spans are one implementation copied and then locally edited — 765 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:50
  • packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353 · packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx:318 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353
  • packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:76 · packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBodyMobile.tsx:56 — the two spans are one implementation copied and then locally edited — 501 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:76
  • packages/loot-core/src/platform/server/fs/fs.legacy.ts:122 · packages/loot-core/src/platform/server/fs/fs.web.ts:84 — the two spans are one implementation copied and then locally edited — 730 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/loot-core/src/platform/server/fs/fs.legacy.ts:122
  • packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69 · packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx:95 — the two spans are one implementation copied and then locally edited — 563 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69
  • packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:373 · packages/desktop-client/src/components/reports/reports/Spending.tsx:269 — the two spans are one implementation copied and then locally edited — 337 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:373
  • packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx:56 · packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx:96 — the two spans are one implementation copied and then locally edited — 444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx:56
  • packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx:1 · packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx:1 — these 2 files are line-for-line copies of one another — 95 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx:1
  • packages/loot-core/src/platform/server/fs/index.api.ts:2 · packages/loot-core/src/platform/server/fs/index.electron.ts:2 — these 2 files are line-for-line copies of one another — 94 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — packages/loot-core/src/platform/server/fs/index.api.ts:2
  • packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:134 · packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx:128 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:134
  • packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx:75 · packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx:49 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx:75
  • packages/desktop-client/src/components/reports/AccountSelector.tsx:63 · packages/desktop-client/src/components/reports/CategorySelector.tsx:61 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop-client/src/components/reports/AccountSelector.tsx:63
  • packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:127 · packages/desktop-client/src/components/reports/reports/CashFlow.tsx:52 — the two spans are one implementation copied and then locally edited — 522 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:127
  • packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:63 · packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:81 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:63
  • packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx:26 · packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx:25 — the two spans are one implementation copied and then locally edited — 413 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx:26
  • packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:66 · packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx:59 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:66
  • packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:282 · packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBodyMobile.tsx:355 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:282
  • packages/cli/src/commands/categories.ts:8 · packages/cli/src/commands/category-groups.ts:8 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/cli/src/commands/categories.ts:8
  • packages/desktop-client/src/components/modals/CoverModal.tsx:31 · packages/desktop-client/src/components/modals/TransferModal.tsx:30 — the two spans are one implementation copied and then locally edited — 355 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/CoverModal.tsx:31
  • packages/loot-core/src/platform/client/connection/index.electron.ts:33 · packages/loot-core/src/platform/client/connection/index.ts:42 — the two spans are one implementation copied and then locally edited — 455 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/loot-core/src/platform/client/connection/index.electron.ts:33
  • packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:231 · packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:170 — the two spans are one implementation copied and then locally edited — 372 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:231
  • packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:21 · packages/desktop-client/src/components/modals/ConvertToScheduleModal.tsx:22 — the two spans are one implementation copied and then locally edited — 272 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:21
  • packages/desktop-client/src/components/modals/manager/ImportYNAB4Modal.tsx:32 · packages/desktop-client/src/components/modals/manager/ImportYNAB5Modal.tsx:42 — the two spans are one implementation copied and then locally edited — 326 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/modals/manager/ImportYNAB4Modal.tsx:32
  • packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:217 · packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:699 — the two spans are one implementation copied and then locally edited — 512 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:217
  • packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx:32 · packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx:30 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx:32

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • packages/desktop-client/src/auth/ProtectedRoute.tsx:5 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/auth/ProtectedRoute.tsx:5
  • packages/desktop-client/src/components/AnimatedRefresh.tsx:4 imports packages/component-library/src/icons/v1/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AnimatedRefresh.tsx:4
  • packages/desktop-client/src/components/AnimatedRefresh.tsx:5 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AnimatedRefresh.tsx:5
  • packages/desktop-client/src/components/App.tsx:10 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/App.tsx:10
  • packages/desktop-client/src/components/App.tsx:11 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/App.tsx:11
  • packages/desktop-client/src/components/AppBackground.tsx:4 imports packages/component-library/src/Block.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AppBackground.tsx:4
  • packages/desktop-client/src/components/AppBackground.tsx:5 imports packages/component-library/src/icons/AnimatedLoading.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AppBackground.tsx:5
  • packages/desktop-client/src/components/AppBackground.tsx:6 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AppBackground.tsx:6
  • packages/desktop-client/src/components/AppBackground.tsx:7 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/AppBackground.tsx:7
  • packages/desktop-client/src/components/Background.tsx:3 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/Background.tsx:3
  • packages/desktop-client/src/components/BackgroundImage.tsx:3 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/BackgroundImage.tsx:3
  • packages/desktop-client/src/components/BankSyncStatus.tsx:5 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/BankSyncStatus.tsx:5
  • packages/desktop-client/src/components/BankSyncStatus.tsx:6 imports packages/component-library/src/Text.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/BankSyncStatus.tsx:6
  • packages/desktop-client/src/components/BankSyncStatus.tsx:7 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/BankSyncStatus.tsx:7
  • packages/desktop-client/src/components/BankSyncStatus.tsx:8 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/BankSyncStatus.tsx:8
  • packages/desktop-client/src/components/CommandBar.tsx:5 imports packages/component-library/src/icons/v1/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:5
  • packages/desktop-client/src/components/CommandBar.tsx:11 imports packages/component-library/src/icons/v2/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:11
  • packages/desktop-client/src/components/CommandBar.tsx:12 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:12
  • packages/desktop-client/src/components/CommandBar.tsx:13 imports packages/component-library/src/Text.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:13
  • packages/desktop-client/src/components/CommandBar.tsx:14 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:14
  • packages/desktop-client/src/components/CommandBar.tsx:15 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/CommandBar.tsx:15
  • packages/desktop-client/src/components/ContextMenu.tsx:3 imports packages/component-library/src/Menu.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/ContextMenu.tsx:3
  • packages/desktop-client/src/components/ContextMenu.tsx:5 imports packages/component-library/src/Popover.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/ContextMenu.tsx:5
  • packages/desktop-client/src/components/ContextMenu.tsx:6 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/ContextMenu.tsx:6
  • packages/desktop-client/src/components/DevelopmentTopBar.tsx:1 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/DevelopmentTopBar.tsx:1
  • packages/desktop-client/src/components/DevelopmentTopBar.tsx:2 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/DevelopmentTopBar.tsx:2
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:3 imports packages/component-library/src/Button.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:3
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:4 imports packages/component-library/src/icons/v2/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:4
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:5 imports packages/component-library/src/InitialFocus.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:5
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:6 imports packages/component-library/src/Input.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:6
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:7 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:7
  • packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:8 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:8
  • packages/desktop-client/src/components/EnableBankingCallback.tsx:4 imports packages/component-library/src/Paragraph.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EnableBankingCallback.tsx:4
  • packages/desktop-client/src/components/EnableBankingCallback.tsx:5 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/EnableBankingCallback.tsx:5
  • packages/desktop-client/src/components/FatalError.tsx:5 imports packages/component-library/src/Block.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:5
  • packages/desktop-client/src/components/FatalError.tsx:6 imports packages/component-library/src/Button.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:6
  • packages/desktop-client/src/components/FatalError.tsx:7 imports packages/component-library/src/Paragraph.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:7
  • packages/desktop-client/src/components/FatalError.tsx:8 imports packages/component-library/src/SpaceBetween.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:8
  • packages/desktop-client/src/components/FatalError.tsx:9 imports packages/component-library/src/Text.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:9
  • packages/desktop-client/src/components/FatalError.tsx:10 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — packages/desktop-client/src/components/FatalError.tsx:10

What to do

  • Fix the listed violations: move the shared test helper into a source directory production code may depend on (2341 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (3 rows).
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • runMonteCarloSimulation has cyclomatic complexity 179 and cognitive complexity 544; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400
  • onmessage has cyclomatic complexity 89 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/platform/client/browser-server/coordinator.ts:552
  • (anonymous) has cyclomatic complexity 86 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/Modals.tsx:113
  • BalanceForecastInner has cyclomatic complexity 74 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94
  • Transaction has cyclomatic complexity 65 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065
  • eval has cyclomatic complexity 60 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:239
  • renderColumnCell has cyclomatic complexity 50 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629
  • MonteCarlo has cyclomatic complexity 50 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56
  • mapConditionToActualQL has cyclomatic complexity 45 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/transactions/transaction-rules.ts:534
  • ActionEditor has cyclomatic complexity 44 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/rules/RuleEditor.tsx:524
  • (anonymous) has cyclomatic complexity 42 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:634
  • TransactionListItem has cyclomatic complexity 42 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx:79
  • (anonymous) has cyclomatic complexity 41 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/sync-events.ts:93
  • SummaryInner has cyclomatic complexity 41 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/Summary.tsx:71
  • Transaction has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx:38
  • recalculate has cyclomatic complexity 39 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:214
  • (anonymous) has cyclomatic complexity 39 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/forecast/forecast-filters.ts:176
  • exec has cyclomatic complexity 38 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/rules/action.ts:99
  • (anonymous) has cyclomatic complexity 38 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/transactions/TransactionList.tsx:349
  • ConfigureField has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/filters/FiltersMenu.tsx:91
  • reconcileTransactions has cyclomatic complexity 37 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/accounts/sync.ts:641
  • GenericInput has cyclomatic complexity 37 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/util/GenericInput.tsx:121
  • SpendingInternal has cyclomatic complexity 37 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/Spending.tsx:75
  • advanceSchedulesService has cyclomatic complexity 36 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/schedules/app.ts:672
  • buildMonthlyOutflow has cyclomatic complexity 36 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/budget/schedule-template.ts:361
  • setOp has cyclomatic complexity 36 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/filters/FiltersMenu.tsx:232
  • CustomReportInner has cyclomatic complexity 36 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145
  • (anonymous) has cyclomatic complexity 36 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/budget/MonthPicker.tsx:132
  • processCleanup has cyclomatic complexity 35 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/budget/cleanup-template.ts:152
  • validateAutomation has cyclomatic complexity 35 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/budget/goals/validateAutomation.ts:48
  • onImport has cyclomatic complexity 33 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:645
  • resolveConfig has cyclomatic complexity 33 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/cli/src/config.ts:167
  • friendlyOp has cyclomatic complexity 32 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/util/rule.ts:79
  • runTemplatesForPriority has cyclomatic complexity 31 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/budget/category-template-context.ts:160
  • TransactionEditInner has cyclomatic complexity 31 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:635
  • castInput has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/aql/compiler.ts:246
  • templateToLine has cyclomatic complexity 30 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/loot-core/src/server/budget/template-notes.ts:169
  • (anonymous) has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:956
  • CrossoverInner has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/reports/Crossover.tsx:74
  • showActivity has cyclomatic complexity 30 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/desktop-client/src/components/reports/graphs/showActivity.ts:35
R3 · Large Files7.2 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • packages/desktop-client/src/components/transactions/TransactionsTable.tsx has 3950 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts has 3073 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx has 2079 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:1
  • packages/desktop-client/src/components/accounts/Account.tsx has 2027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/accounts/Account.tsx:1
  • packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts has 1804 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1
  • packages/loot-core/src/server/accounts/app.ts has 1600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/accounts/app.ts:1
  • packages/desktop-client/src/components/formula/formulaCatalog.ts has 1576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/formula/formulaCatalog.ts:1
  • packages/desktop-client/src/components/rules/RuleEditor.tsx has 1554 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/rules/RuleEditor.tsx:1
  • packages/desktop-client/src/components/table.tsx has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/table.tsx:1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx has 1336 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:1
  • packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx has 1332 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:1
  • packages/loot-core/src/server/accounts/sync.ts has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/accounts/sync.ts:1
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:1
  • packages/loot-core/src/server/transactions/transaction-rules.ts has 1189 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/transactions/transaction-rules.ts:1
  • packages/loot-core/src/server/api.ts has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/api.ts:1
  • packages/loot-core/src/server/importers/ynab5.ts has 1134 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/importers/ynab5.ts:1
  • packages/desktop-client/src/components/reports/reports/Crossover.tsx has 1096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/Crossover.tsx:1
  • packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx has 1094 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:1
  • packages/loot-core/src/server/aql/compiler.ts has 1078 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/aql/compiler.ts:1
  • packages/desktop-client/src/components/reports/reports/CustomReport.tsx has 1037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/CustomReport.tsx:1
  • packages/loot-core/src/server/sync/index.ts has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/sync/index.ts:1
  • packages/loot-core/src/server/db/index.ts has 1005 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/db/index.ts:1
  • packages/loot-core/src/server/budget/category-template-context.ts has 978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/budget/category-template-context.ts:1
  • packages/desktop-client/src/components/reports/reports/Calendar.tsx has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/Calendar.tsx:1
  • packages/desktop-client/src/components/reports/reports/Sankey.tsx has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/Sankey.tsx:1
  • packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx has 960 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx:1
  • packages/loot-core/src/mocks/budget.ts has 945 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/mocks/budget.ts:1
  • packages/desktop-client/src/components/reports/Overview.tsx has 881 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/Overview.tsx:1
  • packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx has 867 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:1
  • packages/desktop-client/src/budget/mutations.ts has 861 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/budget/mutations.ts:1
  • packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx has 856 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:1
  • packages/desktop-client/src/components/filters/FiltersMenu.tsx has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/filters/FiltersMenu.tsx:1
  • packages/loot-core/src/platform/client/browser-server/coordinator.ts has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/platform/client/browser-server/coordinator.ts:1
  • packages/desktop-client/src/components/formula/QueryManager.tsx has 825 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/formula/QueryManager.tsx:1
  • packages/loot-core/src/server/budget/schedule-template.ts has 824 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/loot-core/src/server/budget/schedule-template.ts:1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx has 815 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:1
  • packages/desktop-client/src/components/autocomplete/Autocomplete.tsx has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/autocomplete/Autocomplete.tsx:1
  • packages/desktop-electron/index.ts has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-electron/index.ts:1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx has 803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:1
  • packages/desktop-client/src/modals/modalsSlice.ts has 800 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/desktop-client/src/modals/modalsSlice.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.6 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:1, packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx:1, packages/loot-core/src/platform/server/sqlite/index.electron.ts:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code7.8 / 10Strong✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 10 file(s) (~1313 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/ci-actions
  • 1 file(s) (~30 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package. — packages/mobile-client
  • Unreachable from the 530 application, 63 tooling and 477 test entry point(s) detected in this repo. Gate removals on `yarn run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×26) — packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx, packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx, packages/desktop-electron/preload.ts, …
  • no import path from any entry point (530 application, 63 tooling, 477 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx
  • no import path from any entry point (530 application, 63 tooling, 477 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx
  • Nothing imports this binding — it is safe to review for removal. — packages/ci-actions/src/versions/get-next-package-version.ts:45
  • Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists. (×8) — packages/component-library/src/icons/v1/AddOutline.tsx:3, packages/component-library/src/icons/v1/AddSolid.tsx:3, packages/component-library/src/icons/v1/Adjust.tsx:3, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json. (×3) — packages/component-library/src/icons/add-attribute.ts:1, packages/component-library/src/icons/add-attribute.ts:2, packages/component-library/src/icons/add-attribute.ts:3
  • Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×6) — package.json:73, package.json:76, package.json:84, …
  • Declared in packages/api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/api/package.json:67
  • Declared in packages/ci-actions/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2) — packages/ci-actions/package.json:11, packages/ci-actions/package.json:12
  • Declared in packages/cli/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/cli/package.json:44
  • Declared in packages/component-library/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/component-library/package.json:78
  • Declared in packages/crdt/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/crdt/package.json:48
  • Declared in packages/desktop-client/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/desktop-client/package.json:178
  • Declared in packages/desktop-electron/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/desktop-electron/package.json:30
  • Declared in packages/loot-core/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/loot-core/package.json:223
  • Declared in packages/sync-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. — packages/sync-server/package.json:122

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports0.0 / 10Critical✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • packages/desktop-client/src/accounts/accountsSlice.ts → packages/desktop-client/src/app/appSlice.ts → packages/desktop-client/src/modals/modalsSlice.ts → packages/desktop-client/src/accounts/index.ts → packages/desktop-client/src/accounts/mutations.ts → packages/desktop-client/src/accounts/accountsSlice.ts (one verified cycle inside a mutually-dependent group of 14 files) — packages/desktop-client/src/accounts/accountsSlice.ts:7
  • packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx → packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx → packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx → packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx (one verified cycle inside a mutually-dependent group of 7 files) — packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:35
  • packages/desktop-client/src/components/banksync/EditSyncAccount.tsx → packages/desktop-client/src/components/banksync/useBankSyncAccountSettings.ts → packages/desktop-client/src/components/banksync/EditSyncAccount.tsx — packages/desktop-client/src/components/banksync/EditSyncAccount.tsx:18
  • packages/desktop-client/src/components/budget/BudgetCategories.tsx → packages/desktop-client/src/components/budget/ExpenseCategory.tsx → packages/desktop-client/src/components/budget/index.tsx → packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx → packages/desktop-client/src/components/budget/BudgetTable.tsx → packages/desktop-client/src/components/budget/BudgetCategories.tsx (one verified cycle inside a mutually-dependent group of 11 files) — packages/desktop-client/src/components/budget/BudgetCategories.tsx:16
  • packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx → packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx → packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx — packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx:10
  • packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx → packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx → packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx → packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx (one verified cycle inside a mutually-dependent group of 11 files) — packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx:34
  • packages/loot-core/src/server/aql/exec.ts → packages/loot-core/src/server/aql/schema-helpers.ts → packages/loot-core/src/server/models.ts → packages/loot-core/src/server/aql/index.ts → packages/loot-core/src/server/aql/exec.ts (one verified cycle inside a mutually-dependent group of 20 files) — packages/loot-core/src/server/aql/exec.ts:12
  • packages/loot-core/src/server/budget/category-template-context.ts → packages/loot-core/src/server/budget/statements.ts → packages/loot-core/src/server/budget/template-notes.ts → packages/loot-core/src/server/budget/goal-template.ts → packages/loot-core/src/server/budget/category-template-context.ts — packages/loot-core/src/server/budget/category-template-context.ts:32
  • REDACTED → packages/loot-core/src/server/importers/index.ts → packages/loot-core/src/server/importers/actual.ts → packages/loot-core/src/server/main.ts → REDACTED (one verified cycle inside a mutually-dependent group of 6 files) — REDACTED:23
  • packages/loot-core/src/server/rules/action.ts → packages/loot-core/src/server/rules/rule-utils.ts → packages/loot-core/src/shared/schedules.ts → packages/loot-core/src/server/rules/index.ts → packages/loot-core/src/server/rules/action.ts (one verified cycle inside a mutually-dependent group of 6 files) — packages/loot-core/src/server/rules/action.ts:17
  • packages/loot-core/src/server/transactions/index.ts → packages/loot-core/src/server/transactions/transaction-rules.ts → packages/loot-core/src/server/transactions/index.ts (one verified cycle inside a mutually-dependent group of 3 files) — packages/loot-core/src/server/transactions/index.ts:10
  • packages/sync-server/src/account-db.js → packages/sync-server/src/accounts/openid.ts → packages/sync-server/src/account-db.js (one verified cycle inside a mutually-dependent group of 5 files) — packages/sync-server/src/account-db.js:3

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture4.5 / 10Weak✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. This repository commits the configuration that serves its own HTTP surface, so that configuration was read in full for the security response headers it sets. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository. Its Node HTTP listeners were read for HTTPS enforcement alone — TLS served, a redirect to https:// or HSTS, or a TLS-terminating proxy configuration committed beside the server — each judged per server package.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. — packages/loot-core/src/server/update.ts:23
  • This code fixes PBKDF2-SHA-512 at 10,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. (×2) — packages/loot-core/src/server/encryption/encryption-internals.electron.ts:82, packages/loot-core/src/server/encryption/encryption-internals.ts:75
  • `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.) — packages/sync-server/src/util/server-listen.ts:14

What to do

  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key.
  • Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code. This repository constructs a key derivation priced below the floor at 2 sites, not one: `packages/loot-core/src/server/encryption/encryption-internals.electron.ts:82` (PBKDF2-SHA-512, 10,000 iterations), `packages/loot-core/src/server/encryption/encryption-internals.ts:75` (PBKDF2-SHA-512, 10,000 iterations). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Enforce HTTPS on each listed server: serve TLS itself, or redirect plain requests to `https://` and send `Strict-Transport-Security` (`helmet()` does by default) behind the TLS-terminating proxy — and commit that proxy's configuration beside the service. A server only this machine reaches should bind `127.0.0.1`.
X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.8 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `matchesAQLFilter` is exported, takes a document from its caller (line 266) and hands it to `evaluateClause`, which calls itself at line 163 (`evaluateClause`) with a piece of `clause` — and nowhere in `evaluateClause` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `evaluateClause` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/loot-core/src/server/forecast/forecast-filters.ts:163
  • `matchesAQLFilter` is exported and takes `filter: Record<string, unknown>` from its caller, and it calls itself at line 274 (`matchesAQLFilter`) with a piece of `filter` (and at line 283) — and nowhere in `matchesAQLFilter` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `matchesAQLFilter` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/loot-core/src/server/forecast/forecast-filters.ts:274
  • `insert` is exported, takes a document from its caller (line 48) and hands it to `insertKey`, which calls itself at line 64 (`insertKey`) with a piece of `trie` — and nowhere in `insertKey` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `insertKey` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/crdt/src/crdt/merkle.ts:64
  • `prune` is exported and takes `trie: TrieNode` from its caller, and it calls itself at line 160 (`prune`) with a piece of `trie` — and nowhere in `prune` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `prune` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/crdt/src/crdt/merkle.ts:160
  • `debug` is exported and takes `trie: TrieNode` from its caller, and it calls itself at line 177 (`debug`) with a piece of `trie` — and nowhere in `debug` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `debug` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — packages/crdt/src/crdt/merkle.ts:177

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X19 · Unrestored process-global state3.5 / 10Weak✓ Tool-verified

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

  • `beforePackHook` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CC_target` environment variable (set at line 24, cleared at line 27) and the `CXX_target` environment variable (set at line 25, cleared at line 28) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between — or by a promise that rejects at an `await`, and while this function is suspended at one every other callback the event loop runs sees the moved value too: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path. — packages/desktop-electron/beforePackHook.ts:9

What to do

  • Each finding names the statement that changes the process-global value and the statement that puts it back. Confirm from the two that nothing between them is protected — then prefer removing the mutation over widening the restore: a working directory or an environment variable passed to the operation that needs it (the `cwd` and `env` options of `child_process`, or of `Deno.Command`) is scoped to that operation, which is what the save-and-restore was trying to approximate. Where the global genuinely must move, a `try`/`finally` is the least that makes the restore unconditional. In Java the same holds for a system property, the default `Locale` or `TimeZone` and `System.out`: pass the value to the operation (`String.format(Locale.ROOT, …)`, a `ZoneId`) rather than moving the global. In Swift the same holds for `changeCurrentDirectoryPath` and `setenv`: give the child `Process.currentDirectoryURL`/`environment`, or `defer` the restore.
X2 · Cancellation propagation6.5 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 9/22 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `fetchAllowlist` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:37
  • `claimAccessKey` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:417
  • `getAccounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:462
  • `fetchJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/server/cloud-storage.ts:70
  • `download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/server/cloud-storage.ts:453
  • `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/server/auth/api-keys.ts:12
  • `getLoginMethods` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/server/auth/app.ts:126
  • `populateDefaultFilesystem` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/platform/server/fs/fs.legacy.ts:293
  • `fetchBundled` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/loot-core/src/platform/server/fs/fs.web.ts:172
  • `getLatestVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/desktop-client/src/util/versions.ts:53
  • `fetchDirectCss` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/desktop-client/src/style/customThemes.ts:78
  • `fetchNewsFeed` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/desktop-client/src/news/fetchNewsFeed.ts:75
  • `fetchCatalog` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — packages/desktop-client/src/hooks/useThemeCatalog.ts:16

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×26) — packages/sync-server/src/util/mutex.ts:11, packages/sync-server/src/app-gocardless/services/gocardless-api.ts:152, packages/loot-core/src/server/cloud-storage.ts:62, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×5) — packages/loot-core/src/server/cloud-storage.ts:408, packages/loot-core/src/server/importers/actual.ts:46, REDACTED:381, …
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. (×2) — packages/desktop-client/src/hooks/useDragDrop.tsx:365, packages/desktop-client/src/components/mobile/tags/MobileTagsPage.tsx:69

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • 4/16 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
  • ~0.2 `!` null assertions per 1k TypeScript source lines — 44 assertion(s) across the 252244 source line(s) of the 1761 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/loot-core/src/platform/client/browser-server/coordinator.ts (6), packages/desktop-client/src/components/accounts/Account.tsx (5), packages/desktop-electron/index.ts (5). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health50.3Adequate — gated by D1, D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture43.2Weak — gated by R11, R9Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity86.8StrongStrongest area.
Readiness45.4Weak — gated by D11, R8, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security49.5Weak — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility51.7Adequate — gated by AC2, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60.0AdequateAcceptable, with room to improve.
Unscored — 3 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 5 observation(s) recorded · Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 27 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Repo shows no audit-logging mechanism (an audit-log table or model, an ORM write hook that records changes — a TypeORM/MikroORM subscriber, a Sequelize or Mongoose hook, Prisma middleware — or a change-history plugin such as mongoose-history or sequelize-paper-trail) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
  • C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
Not included — 41 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — The runtime tier booted this repository's service, but crawled PUBLIC routes only — add a Playwright storageState (e.g. playwright/.auth/user.json) or a test auth-setup to crawl authenticated screens rendered 0/1 surface(s) × 2 renders render failed for http://127.0.0.1:3001: page.goto: net::ERR_CONNECTION_RESET at http://127.0.0.1:3001/ Call log: - navigating to "http://127.0.0.1:3001/", waiting until "load" ran the repo's playwright suite against the booted app but captured no surfaces (suite failed to install/run, or visited no pages) — see runtime diagnostics. This repository also has a user interface (1046 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates) that the booted service does not serve, and this scan has no strategy that reaches it — so no WCAG success criterion was verified in a rendered page on this run. That is a gap in OUR tooling, not a finding about your application: nothing here says the interface is inaccessible. The static accessibility checks still ran.
  • AXS1 Runtime exposed surface — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • D12 Dependency Hygiene — Not scored — 2 Maven/Gradle manifest(s) were read, stating a version for 0 dependency(ies) and leaving 4 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — 2 ADR(s) are written in a language our ADR lexicon does not cover, or are too short to tell (undetermined); their sections and statuses were not judged.
  • D25 ADR Conformance — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D32 Data Compliance (PII/GDPR) — 151 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D4 Code Duplication — This repository's production source (.ts, .tsx) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R5 Dependency Freshness — uses a yarn lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 88 finding(s)
D11 · Test Reliability · Flaky test · ×23
  • Flaky test: packages/sync-server/src/accounts/password.test.js::loginWithPassword legacy hash upgrade does not rehash an existing argon2id hash on login — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/accounts/password.test.js::loginWithPassword legacy hash upgrade does not upgrade or change the stored hash when the password is wrong — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/accounts/password.test.js::password session revocation issues distinct sessions and revokes both when the password changes — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/accounts/password.test.js::password session revocation rolls back the password update if session revocation fails — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rate limits incorrect current passwords — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: "" — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: "wrong" — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: null — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: undefined — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: {} — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password should return 200 when admin with password-auth session sends valid password — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/change-password should return 403 when user is not an admin — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/app-account.test.js::/login should allow password login when OIDC is the active method — Passed 1×, failed 2× across repeated runs.
  • Flaky test: packages/sync-server/src/app-simplefin/fetch.integration.test.ts::claims a token and lists accounts through the real SSRF dispatcher packages/sync-server/src/app-simplefin/fetch.integration.test.ts:20 — Passed 2×, failed 1× across repeated runs.
  • Flaky test: packages/sync-server/src/app-simplefin/ssrf.test.ts::does not fetch a claim URL using a transition address packages/sync-server/src/app-simplefin/ssrf.test.ts:43 — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/accounts/password.test.js::password session revocation does not issue a session if the password changes during verification — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/accounts/password.test.js::password session revocation issues distinct sessions and revokes both when the password changes — Passed 1×, failed 2× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/accounts/password.test.js::password session revocation rolls back the password update if session revocation fails — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: "" — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: null — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/app-account.test.js::/change-password rejects a stolen token without the current password: undefined — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/app-account.test.js::/change-password should return 200 when admin with password-auth session sends valid password — Passed 2×, failed 1× across repeated runs.
  • Flaky test: the repository rootpackages/sync-server/src/app-simplefin/ssrf.test.ts::does not fetch a claim URL using a transition address packages/sync-server/src/app-simplefin/ssrf.test.ts:43 — Passed 2×, failed 1× across repeated runs.
D31 · IaC & Container Security · High IaC · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×5
  • Boundary-crossing change coupling: useReports.ts ↔ reports.ts packages/desktop-client/src/hooks/useReports.ts:1 — `packages/desktop-client/src/hooks/useReports.ts` (context desktop-client) and `packages/loot-core/src/types/models/reports.ts` (context loot-core) sit in DIFFERENT parts of the tree yet change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8ae90a7a` Retrofit useReports to use react-query under the hood (#6951); `80fd9975` ✨ Reports - Add an option to trim the start & end intervals (#5641); `bec84193` Add sorting option to custom reports (#4141) (at that commit the files were still `packages/loot-core/src/client/data-hooks/reports.ts` and `packages/loot-core/src/types/models/reports.d.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: useReports.ts ↔ REDACTED packages/desktop-client/src/hooks/useReports.ts:1 — `packages/desktop-client/src/hooks/useReports.ts` (context desktop-client) and `packages/loot-core/src/server/reports/app.ts` (context loot-core) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `8ae90a7a` Retrofit useReports to use react-query under the hood (#6951); `80fd9975` ✨ Reports - Add an option to trim the start & end intervals (#5641); `bec84193` Add sorting option to custom reports (#4141) (at that commit the file was still `packages/loot-core/src/client/data-hooks/reports.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: ReportRouter.tsx ↔ prefs.ts packages/desktop-client/src/components/reports/ReportRouter.tsx:1 — `packages/desktop-client/src/components/reports/ReportRouter.tsx` (context desktop-client) and `packages/loot-core/src/types/prefs.ts` (context loot-core) sit in DIFFERENT parts of the tree yet change together 60% of the time (12 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `08e2a10f` [AI] Promote Age of Money report to a stable feature (#8540); `d1f9f8ae` :sparkles: release crossover report (#7804); `e3dd3d1d` Add Age of Money report (#2994) (#6685) — run `git show` on any of them.
  • Boundary-crossing change coupling: useReports.ts ↔ index.ts packages/desktop-client/src/hooks/useReports.ts:1 — `packages/desktop-client/src/hooks/useReports.ts` (context desktop-client) and `packages/loot-core/src/server/aql/schema/index.ts` (context loot-core) sit in DIFFERENT parts of the tree yet change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `80fd9975` ✨ Reports - Add an option to trim the start & end intervals (#5641); `bec84193` Add sorting option to custom reports (#4141) (at that commit the file was still `packages/loot-core/src/client/data-hooks/reports.ts`); `63d9547e` :recycle: (reports) unify selectedCategories and conditions (#3178) (at that commit the file was still `packages/loot-core/src/client/data-hooks/reports.ts`) — run `git show` on any of them.
  • Boundary-crossing change coupling: vitest.web.config.ts ↔ vitest.config.ts packages/component-library/vitest.web.config.ts:1 — `packages/component-library/vitest.web.config.ts` (context component-library) and `packages/loot-core/vitest.config.ts` (context loot-core) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `c4775bf2` wire tests up to depot test results analysis (#8262); `c74923eb` [AI] Replace vite-plugin-peggy-loader with an in-repo Vite plugin (#8…; `4960363d` [AI] Stop using .browser extension; removing "resolve.extensions" - p… — run `git show` on any of them.
R9 · Circular Imports · Import cycle (2 files) · ×4
  • Import cycle (2 files) packages/desktop-client/src/components/banksync/EditSyncAccount.tsx:18 — packages/desktop-client/src/components/banksync/EditSyncAccount.tsx → packages/desktop-client/src/components/banksync/useBankSyncAccountSettings.ts → packages/desktop-client/src/components/banksync/EditSyncAccount.tsx
  • Import cycle (2 files) packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx:10 — packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx → packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx → packages/desktop-client/src/components/budget/tracking/BalanceMenu.tsx
  • Import cycle (2 files) packages/loot-core/src/server/transactions/index.ts:10 — packages/loot-core/src/server/transactions/index.ts → packages/loot-core/src/server/transactions/transaction-rules.ts → packages/loot-core/src/server/transactions/index.ts (one verified cycle inside a mutually-dependent group of 3 files)
  • Import cycle (2 files) packages/sync-server/src/account-db.js:3 — packages/sync-server/src/account-db.js → packages/sync-server/src/accounts/openid.ts → packages/sync-server/src/account-db.js (one verified cycle inside a mutually-dependent group of 5 files)
R9 · Circular Imports · Import cycle (4 files) · ×4
  • Import cycle (4 files) packages/loot-core/src/server/aql/exec.ts:12 — packages/loot-core/src/server/aql/exec.ts → packages/loot-core/src/server/aql/schema-helpers.ts → packages/loot-core/src/server/models.ts → packages/loot-core/src/server/aql/index.ts → packages/loot-core/src/server/aql/exec.ts (one verified cycle inside a mutually-dependent group of 20 files)
  • Import cycle (4 files) packages/loot-core/src/server/budget/category-template-context.ts:32 — packages/loot-core/src/server/budget/category-template-context.ts → packages/loot-core/src/server/budget/statements.ts → packages/loot-core/src/server/budget/template-notes.ts → packages/loot-core/src/server/budget/goal-template.ts → packages/loot-core/src/server/budget/category-template-context.ts
  • Import cycle (4 files) REDACTED:23 — REDACTED → packages/loot-core/src/server/importers/index.ts → packages/loot-core/src/server/importers/actual.ts → packages/loot-core/src/server/main.ts → REDACTED (one verified cycle inside a mutually-dependent group of 6 files)
  • Import cycle (4 files) packages/loot-core/src/server/rules/action.ts:17 — packages/loot-core/src/server/rules/action.ts → packages/loot-core/src/server/rules/rule-utils.ts → packages/loot-core/src/shared/schedules.ts → packages/loot-core/src/server/rules/index.ts → packages/loot-core/src/server/rules/action.ts (one verified cycle inside a mutually-dependent group of 6 files)
AC2 · Forms & labels · <textarea> without a programmatic label · ×2
  • <textarea> without a programmatic label packages/desktop-client/src/components/Notes.tsx:56 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label packages/desktop-client/src/components/formula/QueryManager.tsx:677 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×2
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (5 files) · ×2
  • Import cycle (5 files) packages/desktop-client/src/accounts/accountsSlice.ts:7 — packages/desktop-client/src/accounts/accountsSlice.ts → packages/desktop-client/src/app/appSlice.ts → packages/desktop-client/src/modals/modalsSlice.ts → packages/desktop-client/src/accounts/index.ts → packages/desktop-client/src/accounts/mutations.ts → packages/desktop-client/src/accounts/accountsSlice.ts (one verified cycle inside a mutually-dependent group of 14 files)
  • Import cycle (5 files) packages/desktop-client/src/components/budget/BudgetCategories.tsx:16 — packages/desktop-client/src/components/budget/BudgetCategories.tsx → packages/desktop-client/src/components/budget/ExpenseCategory.tsx → packages/desktop-client/src/components/budget/index.tsx → packages/desktop-client/src/components/budget/DynamicBudgetTable.tsx → packages/desktop-client/src/components/budget/BudgetTable.tsx → packages/desktop-client/src/components/budget/BudgetCategories.tsx (one verified cycle inside a mutually-dependent group of 11 files)
R9 · Circular Imports · Import cycle (3 files) · ×2
  • Import cycle (3 files) packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:35 — packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx → packages/desktop-client/src/components/budget/envelope/BalanceMovementMenu.tsx → packages/desktop-client/src/components/budget/envelope/BalanceMenu.tsx → packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx (one verified cycle inside a mutually-dependent group of 7 files)
  • Import cycle (3 files) packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx:34 — packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx → packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx → packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx → packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx (one verified cycle inside a mutually-dependent group of 11 files)
AC2 · Forms & labels · <input> without a programmatic label · ×1
  • <input> without a programmatic label packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:192 — This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom packages/desktop-client/index.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang packages/desktop-electron/loading.html:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure · Document without a <title> · ×1
  • Document without a <title> packages/desktop-electron/loading.html:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
AC4 · Keyboard semantics · Click handler on a non-interactive <span> · ×1
  • Click handler on a non-interactive <span> packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:197 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC4 · Keyboard semantics · Hover-only interaction on <path> · ×1
  • Hover-only interaction on <path> packages/desktop-client/src/components/reports/graphs/SankeyGraph.tsx:94 — This <path> binds mouse-enter and mouse-leave and nothing else — no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}="0" so the element can receive that focus.
D14 · License Compliance · Banned license · ×1
  • Banned license: hyperformula packages/loot-core/package.json:211 — `hyperformula` 3.5.0 is published on registry.npmjs.org under `GPL-3.0-only`, which this policy bans, and it is a production, optional or peer dependency this repository's committed lockfile resolves — so it is installed by everything that depends on this repository, not just by its build toolchain. A package offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package (or the dependency that pulls it in), or record an accepted exception.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge packages/desktop-client/src/components/BackgroundImage.tsx:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Serious — 1594 finding(s)
D3 · God Classes · FunctionTooLong · ×281
  • FunctionTooLong: monteCarloSimulation.runMonteCarloSimulation packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400 — FunctionTooLong — runMonteCarloSimulation runs 1153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1053 over it, 11.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MonteCarloRunDetailTable.MonteCarloRunDetailTable packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:76 — FunctionTooLong — MonteCarloRunDetailTable runs 1016 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 916 over it, 10.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TransactionsTable.Transaction packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065 — FunctionTooLong — Transaction runs 923 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 823 over it, 9.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Crossover.CrossoverInner packages/desktop-client/src/components/reports/reports/Crossover.tsx:74 — FunctionTooLong — CrossoverInner runs 892 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 792 over it, 8.92× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ImportTransactionsModal.ImportTransactionsModal packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:205 — FunctionTooLong — ImportTransactionsModal runs 883 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 783 over it, 8.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: formulaCatalog.getFormulaFunctionCatalog packages/desktop-client/src/components/formula/formulaCatalog.ts:118 — FunctionTooLong — getFormulaFunctionCatalog runs 864 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 764 over it, 8.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: CustomReport.CustomReportInner packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145 — FunctionTooLong — CustomReportInner runs 763 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 663 over it, 7.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BalanceForecast.BalanceForecastInner packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94 — FunctionTooLong — BalanceForecastInner runs 672 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 572 over it, 6.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MonteCarloPotConfiguration.MonteCarloPotConfiguration packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:73 — FunctionTooLong — MonteCarloPotConfiguration runs 636 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 536 over it, 6.36× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MonteCarlo.MonteCarlo packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56 — FunctionTooLong — MonteCarlo runs 634 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 534 over it, 6.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: MonteCarloConfiguration.MonteCarloConfiguration packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx:73 — FunctionTooLong — MonteCarloConfiguration runs 626 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 526 over it, 6.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Overview.Overview packages/desktop-client/src/components/reports/Overview.tsx:104 — FunctionTooLong — Overview runs 605 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 505 over it, 6.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: coordinator.createCoordinator packages/loot-core/src/platform/client/browser-server/coordinator.ts:37 — FunctionTooLong — createCoordinator runs 587 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 487 over it, 5.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ReportSidebar.ReportSidebar packages/desktop-client/src/components/reports/ReportSidebar.tsx:87 — FunctionTooLong — ReportSidebar runs 542 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 442 over it, 5.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Calendar.CalendarInner packages/desktop-client/src/components/reports/reports/Calendar.tsx:95 — FunctionTooLong — CalendarInner runs 515 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 415 over it, 5.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: useBuiltInBankSyncProviders.useBuiltInBankSyncProviders packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts:107 — FunctionTooLong — useBuiltInBankSyncProviders runs 505 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 405 over it, 5.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Spending.SpendingInternal packages/desktop-client/src/components/reports/reports/Spending.tsx:75 — FunctionTooLong — SpendingInternal runs 503 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 403 over it, 5.03× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Sankey.SankeyInner packages/desktop-client/src/components/reports/reports/Sankey.tsx:440 — FunctionTooLong — SankeyInner runs 478 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 378 over it, 4.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: QueryManager.QueryItem packages/desktop-client/src/components/formula/QueryManager.tsx:289 — FunctionTooLong — QueryItem runs 472 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 372 over it, 4.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: FinancesApp.FinancesApp packages/desktop-client/src/components/FinancesApp.tsx:102 — FunctionTooLong — FinancesApp runs 426 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 326 over it, 4.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: ScheduleEditForm.ScheduleEditForm packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx:103 — FunctionTooLong — ScheduleEditForm runs 398 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 298 over it, 3.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: Header.AccountHeader packages/desktop-client/src/components/accounts/Header.tsx:131 — FunctionTooLong — AccountHeader runs 382 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 282 over it, 3.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BudgetAnalysis.BudgetAnalysisInternal packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:145 — FunctionTooLong — BudgetAnalysisInternal runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: TransactionEdit.TransactionEditUnconnected packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:1601 — FunctionTooLong — TransactionEditUnconnected runs 365 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 265 over it, 3.65× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: BalanceForecastCard.BalanceForecastCard packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:54 — FunctionTooLong — BalanceForecastCard runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 256 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×86
  • TodoComment REDACTED:134 — //TODO: put this into a middleware that checks if FileNotFound is thrown and returns 404 and same error message — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:539 — // TODO: Return 422 if fileId is not provided. Need to make sure frontend can handle it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/sync-server/src/app-gocardless/banks/danskebank_privat.ts:9 — // TODO: Add other Danske Bank BICs? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/types/prefs.ts:50 — // TODO: pull from src/components/modals/ImportTransactions.js — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/types/prefs.ts:92 — // TODO: delete this (unused) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/shared/months.ts:266 — // TODO: This doesn't really fit in this module anymore, should — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/cloud-storage.ts:356 — // TODO: fix me — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/errors.ts:3 — // TODO: normalize error types — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/post.ts:101 — // Something seriously went wrong. TODO handle errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/post.ts:151 — // Something seriously went wrong. TODO handle errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/post.ts:199 — // Something seriously went wrong. TODO handle errors — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sheet.ts:192 — // TODO: Should wait for the sheet to finish — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sheet.ts:220 — // TODO: Clear out the cache here so make sure future loads of the app — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/transactions/index.ts:28 — // TODO: convert to whereIn — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/transactions/transaction-rules.test.ts:23 — // TODO: write tests to make sure payee renaming is "pre" and category — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/transactions/transaction-rules.test.ts:706 — // todo: isapprox — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/transactions/transaction-rules.test.ts:1568 — // TODO: write tests for split transactions — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/transactions/transaction-rules.ts:53 — // TODO: Detect if it looks like the user is creating a rename rule — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sync/index.ts:176 — // TODO: convert to `whereIn` — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sync/index.ts:228 — // TODO make this type stricter. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sync/index.ts:948 — // TODO: Send the message to the client and allow them to expand & view it — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/sync/reset.ts:35 — // TODO: pre-reset confirmation dialog — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/spreadsheet/spreadsheet.ts:136 — // TODO: Formally write out the different cases when the existing — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/spreadsheet/spreadsheet.ts:204 — // TODO: use captureException here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment packages/loot-core/src/server/spreadsheet/spreadsheet.ts:430 — // TODO: diff these — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 61 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×69
  • Hotspot: packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400 — packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 274 in monteCarloSimulation.runMonteCarloSimulation at line 1400. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/transactions/TransactionsTable.tsx packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065 — packages/desktop-client/src/components/transactions/TransactionsTable.tsx changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 198 in TransactionsTable.Transaction at line 1065. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/transactions/TransactionsTable.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:76 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in MonteCarloRunDetailTable.MonteCarloRunDetailTable at line 76. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:635 — packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in TransactionEdit.TransactionEditInner at line 635. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94 — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in BalanceForecast.BalanceForecastInner at line 94. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:205 — packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 127 in ImportTransactionsModal.ImportTransactionsModal at line 205. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in MonteCarlo.MonteCarlo at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/Modals.tsx packages/desktop-client/src/components/Modals.tsx:96 — packages/desktop-client/src/components/Modals.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in Modals.Modals at line 96. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/Modals.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/CustomReport.tsx packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145 — packages/desktop-client/src/components/reports/reports/CustomReport.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in CustomReport.CustomReportInner at line 145. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/CustomReport.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/loot-core/src/server/schedules/app.ts packages/loot-core/src/server/schedules/app.ts:672 — packages/loot-core/src/server/schedules/app.ts changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in app.advanceSchedulesService at line 672. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/loot-core/src/server/schedules/app.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/sync-events.ts packages/desktop-client/src/sync-events.ts:61 — packages/desktop-client/src/sync-events.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in sync-events.listenForSyncEvent at line 61. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/sync-events.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/loot-core/src/server/sync/index.ts packages/loot-core/src/server/sync/index.ts:402 — packages/loot-core/src/server/sync/index.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in index._applyMessages at line 402. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/loot-core/src/server/sync/index.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/loot-core/src/server/accounts/sync.ts packages/loot-core/src/server/accounts/sync.ts:641 — packages/loot-core/src/server/accounts/sync.ts changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in sync.reconcileTransactions at line 641. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/loot-core/src/server/accounts/sync.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/filters/FiltersMenu.tsx packages/desktop-client/src/components/filters/FiltersMenu.tsx:91 — packages/desktop-client/src/components/filters/FiltersMenu.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 121 in FiltersMenu.ConfigureField at line 91. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/filters/FiltersMenu.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:54 — packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in BalanceForecastCard.BalanceForecastCard at line 54. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx:107 — packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in DonutGraph.DonutGraph at line 107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/transactions/TransactionList.tsx packages/desktop-client/src/components/transactions/TransactionList.tsx:139 — packages/desktop-client/src/components/transactions/TransactionList.tsx changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in TransactionList.TransactionList at line 139. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/transactions/TransactionList.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/loot-core/src/server/budget/category-template-context.ts packages/loot-core/src/server/budget/category-template-context.ts:160 — packages/loot-core/src/server/budget/category-template-context.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in CategoryTemplateContext.runTemplatesForPriority at line 160. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/loot-core/src/server/budget/category-template-context.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:624 — REDACTED changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in app._loadBudget at line 624. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/rules/RuleEditor.tsx packages/desktop-client/src/components/rules/RuleEditor.tsx:524 — packages/desktop-client/src/components/rules/RuleEditor.tsx changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in RuleEditor.ActionEditor at line 524. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/rules/RuleEditor.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts:111 — packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in custom-spreadsheet.createCustomSpreadsheet.<returned closure> at line 111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/Overview.tsx packages/desktop-client/src/components/reports/Overview.tsx:104 — packages/desktop-client/src/components/reports/Overview.tsx changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 68 in Overview.Overview at line 104. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/Overview.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx:73 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in MonteCarloConfiguration.MonteCarloConfiguration at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/desktop-client/src/components/accounts/Account.tsx packages/desktop-client/src/components/accounts/Account.tsx:1853 — packages/desktop-client/src/components/accounts/Account.tsx changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AccountInternal.render at line 1853. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/desktop-client/src/components/accounts/Account.tsx`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: packages/loot-core/src/server/accounts/app.ts packages/loot-core/src/server/accounts/app.ts:1397 — packages/loot-core/src/server/accounts/app.ts changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in app.getBankSyncStatusFromError at line 1397. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-18..2026-11-16, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-18 21:24:50 +00:00' --until='2026-11-16 21:24:50 +00:00' --full-history --no-merges -- packages/loot-core/src/server/accounts/app.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 44 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×56
  • FileTooLong: transactions/TransactionsTable.tsx packages/desktop-client/src/components/transactions/TransactionsTable.tsx — FileTooLong — 3232 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2732 over it, 6.46× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: monte-carlo/monteCarloSimulation.ts packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts — FileTooLong — 1973 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1473 over it, 3.95× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: transactions/TransactionEdit.tsx packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx — FileTooLong — 1662 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1162 over it, 3.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: accounts/Account.tsx packages/desktop-client/src/components/accounts/Account.tsx — FileTooLong — 1543 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: AccountInternal (310-2083). The bar is 500 significant lines; this is 1043 over it, 3.09× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: spreadsheets/sankey-spreadsheet.ts packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts — FileTooLong — 1403 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 903 over it, 2.81× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: rules/RuleEditor.tsx packages/desktop-client/src/components/rules/RuleEditor.tsx — FileTooLong — 1270 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 770 over it, 2.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: accounts/app.ts packages/loot-core/src/server/accounts/app.ts — FileTooLong — 1218 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 718 over it, 2.44× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: formula/formulaCatalog.ts packages/desktop-client/src/components/formula/formulaCatalog.ts — FileTooLong — 1200 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: getFormulaFunctionCatalog (118-1237). The bar is 500 significant lines; this is 700 over it, 2.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: monte-carlo/MonteCarloRunDetailTable.tsx packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx — FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MonteCarloRunDetailTable (76-1366). The bar is 500 significant lines; this is 574 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: components/table.tsx packages/desktop-client/src/components/table.tsx — FileTooLong — 1074 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 574 over it, 2.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ImportTransactionsModal/ImportTransactionsModal.tsx packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx — FileTooLong — 1073 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: ImportTransactionsModal (205-1404). The bar is 500 significant lines; this is 573 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: modals/SelectLinkedAccountsModal.tsx packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx — FileTooLong — 982 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 482 over it, 1.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: reports/Crossover.tsx packages/desktop-client/src/components/reports/reports/Crossover.tsx — FileTooLong — 954 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: CrossoverInner (74-1159). The bar is 500 significant lines; this is 454 over it, 1.91× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: accounts/sync.ts packages/loot-core/src/server/accounts/sync.ts — FileTooLong — 916 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 416 over it, 1.83× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: reports/CustomReport.tsx packages/desktop-client/src/components/reports/reports/CustomReport.tsx — FileTooLong — 876 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: CustomReportInner (145-1122). The bar is 500 significant lines; this is 376 over it, 1.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: formula/codeMirror-excelLanguage.tsx packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx — FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 362 over it, 1.72× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: server/api.ts packages/loot-core/src/server/api.ts — FileTooLong — 833 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 333 over it, 1.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: importers/ynab5.ts packages/loot-core/src/server/importers/ynab5.ts — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: transactions/transaction-rules.ts packages/loot-core/src/server/transactions/transaction-rules.ts — FileTooLong — 822 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 322 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: reports/Sankey.tsx packages/desktop-client/src/components/reports/reports/Sankey.tsx — FileTooLong — 820 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 320 over it, 1.64× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: reports/Calendar.tsx packages/desktop-client/src/components/reports/reports/Calendar.tsx — FileTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), about 63% of them inside a single declaration: CalendarInner (95-770). The bar is 500 significant lines; this is 318 over it, 1.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: aql/compiler.ts packages/loot-core/src/server/aql/compiler.ts — FileTooLong — 794 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 294 over it, 1.59× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: reports/BalanceForecast.tsx packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx — FileTooLong — 750 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: BalanceForecastInner (94-905). The bar is 500 significant lines; this is 250 over it, 1.50× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: budget/BudgetPage.tsx packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx — FileTooLong — 725 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 225 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: budget/category-template-context.ts packages/loot-core/src/server/budget/category-template-context.ts — FileTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: CategoryTemplateContext (34-993). The bar is 500 significant lines; this is 200 over it, 1.40× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 31 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×40
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/auth/ProtectedRoute.tsx:5 — packages/desktop-client/src/auth/ProtectedRoute.tsx:5 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AnimatedRefresh.tsx:4 — packages/desktop-client/src/components/AnimatedRefresh.tsx:4 imports packages/component-library/src/icons/v1/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AnimatedRefresh.tsx:5 — packages/desktop-client/src/components/AnimatedRefresh.tsx:5 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/App.tsx:10 — packages/desktop-client/src/components/App.tsx:10 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/App.tsx:11 — packages/desktop-client/src/components/App.tsx:11 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AppBackground.tsx:4 — packages/desktop-client/src/components/AppBackground.tsx:4 imports packages/component-library/src/Block.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AppBackground.tsx:5 — packages/desktop-client/src/components/AppBackground.tsx:5 imports packages/component-library/src/icons/AnimatedLoading.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AppBackground.tsx:6 — packages/desktop-client/src/components/AppBackground.tsx:6 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/AppBackground.tsx:7 — packages/desktop-client/src/components/AppBackground.tsx:7 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/Background.tsx:3 — packages/desktop-client/src/components/Background.tsx:3 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/BackgroundImage.tsx:3 — packages/desktop-client/src/components/BackgroundImage.tsx:3 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/BankSyncStatus.tsx:5 — packages/desktop-client/src/components/BankSyncStatus.tsx:5 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/BankSyncStatus.tsx:6 — packages/desktop-client/src/components/BankSyncStatus.tsx:6 imports packages/component-library/src/Text.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/BankSyncStatus.tsx:7 — packages/desktop-client/src/components/BankSyncStatus.tsx:7 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/BankSyncStatus.tsx:8 — packages/desktop-client/src/components/BankSyncStatus.tsx:8 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:5 — packages/desktop-client/src/components/CommandBar.tsx:5 imports packages/component-library/src/icons/v1/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:11 — packages/desktop-client/src/components/CommandBar.tsx:11 imports packages/component-library/src/icons/v2/index.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:12 — packages/desktop-client/src/components/CommandBar.tsx:12 imports packages/component-library/src/styles.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:13 — packages/desktop-client/src/components/CommandBar.tsx:13 imports packages/component-library/src/Text.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:14 — packages/desktop-client/src/components/CommandBar.tsx:14 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/CommandBar.tsx:15 — packages/desktop-client/src/components/CommandBar.tsx:15 imports packages/component-library/src/View.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/ContextMenu.tsx:3 — packages/desktop-client/src/components/ContextMenu.tsx:3 imports packages/component-library/src/Menu.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/ContextMenu.tsx:5 — packages/desktop-client/src/components/ContextMenu.tsx:5 imports packages/component-library/src/Popover.tsx, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/ContextMenu.tsx:6 — packages/desktop-client/src/components/ContextMenu.tsx:6 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] packages/desktop-client/src/components/DevelopmentTopBar.tsx:1 — packages/desktop-client/src/components/DevelopmentTopBar.tsx:1 imports packages/component-library/src/theme.ts, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • + 15 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/src/platform/server/sqlite/index.electron.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/src/platform/server/fs/index.electron.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/budgets.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/src/platform/server/fs/index.api.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/transactions.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/payees.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/desktop-electron/server.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/desktop-electron/preload.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/ci-actions/src/release-notes/util.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/rules.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/scripts/add-types-conditions.mts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/tags.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/index.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/src/server/encryption/encryption-internals.electron.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/cli/src/commands/schedules.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/loot-core/src/platform/server/connection/index.electron.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/app-gocardless/banks/seb_kort_bank_ab.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/app-gocardless/banks/norwegian_xx_norwnok1.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/app-gocardless/banks/bnp_be_gebabebb.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/app-gocardless/banks/hype_hyeeit22.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/util/prompt.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file packages/sync-server/src/app-gocardless/banks/ing_ingbrobu.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×31
  • Swallowed exception (empty catch) packages/sync-server/src/util/mutex.ts:11 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/sync-server/src/app-gocardless/services/gocardless-api.ts:152 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/cloud-storage.ts:62 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/cloud-storage.ts:408 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/transactions/import/xmlcamt2json.ts:112 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/importers/actual.ts:46 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:360 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:381 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:459 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:542 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/budgetfiles/backups.ts:210 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/budgetfiles/backups.ts:229 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/server/budget/cleanup-template-notes.ts:80 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/server/sqlite/storage/opfs-sahpool.ts:258 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/server/fs/fs.legacy.ts:81 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/server/fs/fs.legacy.ts:86 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/server/connection/shared.ts:68 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/server/asyncStorage/index.electron.ts:157 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/client/browser-preload/storage-backend.ts:33 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/src/platform/client/browser-preload/storage-backend.ts:50 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/loot-core/migrations/1723665565000_prefs.js:56 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/eslint-plugin-actual/lib/rules/no-extraneous-dependencies.js:41 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) packages/desktop-client/src/global-events.ts:280 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) packages/desktop-client/src/components/settings/StorageBackendToggle.tsx:44 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts:121 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 6 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×28
  • Change coupling: Experimental.tsx ↔ useFeatureFlag.ts packages/desktop-client/src/components/settings/Experimental.tsx:1 — `packages/desktop-client/src/components/settings/Experimental.tsx` and `packages/desktop-client/src/hooks/useFeatureFlag.ts` change together 78% of the time (46 of the 59 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 46 shared commits counted here, the most recent 3 are `b13f5c29` [AI] Release Akahu bank sync as a stable feature (#9426); `6c73bbb1` sidebar pt. 2: UI to manage groups and assign accounts (#8832); `08e2a10f` [AI] Promote Age of Money report to a stable feature (#8540) — run `git show` on any of them.
  • Change coupling: ReportOptions.ts ↔ disabledList.ts packages/desktop-client/src/components/reports/ReportOptions.ts:1 — `packages/desktop-client/src/components/reports/ReportOptions.ts` and `packages/desktop-client/src/components/reports/disabledList.ts` change together 78% of the time (14 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `7caedc7c` [AI] Add Quarterly interval to custom reports (#9347); `fab0ab1b` [AI] Expose tag splitting and scope selection in custom reports (#8948); `a9252f9c` [Enhancements] Add quarter date range presets (#8607) — run `git show` on any of them.
  • Change coupling: CategoryGroupMenuModal.tsx ↔ CategoryMenuModal.tsx packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx:1 — `packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx` and `packages/desktop-client/src/components/modals/CategoryMenuModal.tsx` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `37d391b4` Do not allow renaming to an empty category or group name (#3463); `0e86dea5` ♻️ (tooltip) refactoring to react-aria (vol.6) (#2771); `672dd5ea` [Mobile] Fix account notes not retrieving correctly in mobile (#2599) — run `git show` on any of them.
  • Change coupling: REDACTED ↔ secrets-service.js REDACTED:1 — `REDACTED` and `packages/sync-server/src/services/secrets-service.js` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `f1c0960f` Feature: Add Akahu New Zealand bank sync (#6041); `d5e2030d` Pluggy.ai bank sync (#4049) (at that commit the file was still `packages/sync-server/src/app.js`); `e7f6348d` SimpleFin (#296) (at that commit the files were still `src/app.js` and `src/services/secrets-service.js`) — run `git show` on any of them.
  • Change coupling: SidebarCategory.tsx ↔ SidebarGroup.tsx packages/desktop-client/src/components/budget/SidebarCategory.tsx:1 — `packages/desktop-client/src/components/budget/SidebarCategory.tsx` and `packages/desktop-client/src/components/budget/SidebarGroup.tsx` change together 65% of the time (13 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `4b583357` feat: expandable budget categories (#4807); `866f4891` [TypeScript] More specific types on budget table components (#4524); `5717d905` enhance: context menu budget page positioning (#3775) — run `git show` on any of them.
  • Change coupling: api.ts ↔ api-handlers.ts packages/loot-core/src/server/api.ts:1 — `packages/loot-core/src/server/api.ts` and `packages/loot-core/src/types/api-handlers.ts` change together 65% of the time (24 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 24 shared commits counted here, the most recent 3 are `e67bb684` [AI] Add API methods to budget a category from its templates (#9260); `f36804f0` [AI] Return what a bank sync reconciled from the API's runBankSync (#…; `89384e0b` [AI] Add getScheduleDates to the API (#9020) — run `git show` on any of them.
  • Change coupling: CashFlow.tsx ↔ NetWorth.tsx packages/desktop-client/src/components/reports/reports/CashFlow.tsx:1 — `packages/desktop-client/src/components/reports/reports/CashFlow.tsx` and `packages/desktop-client/src/components/reports/reports/NetWorth.tsx` change together 64% of the time (16 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `c57260a5` Remove comma from all instances of month-year strings (#6748); `9dd0284e` fix report date dropdowns not including current period (#5981); `14426b64` fix live report time ranges (#5790) — run `git show` on any of them.
  • Change coupling: main.ts ↔ server-handlers.ts packages/loot-core/src/server/main.ts:1 — `packages/loot-core/src/server/main.ts` and `packages/loot-core/src/types/server-handlers.ts` change together 61% of the time (39 of the 64 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 39 shared commits counted here, the most recent 3 are `01f45d50` Extract auth related server handlers from main.ts to server/auth/app.… (at that commit the file was still `packages/loot-core/src/types/server-handlers.d.ts`); `c77168fa` Extract encryption related server handlers from main.ts to server/enc… (at that commit the file was still `packages/loot-core/src/types/server-handlers.d.ts`); `490ec22b` Extract budget file related server handlers from main.ts to server/bu… (at that commit the file was still `packages/loot-core/src/types/server-handlers.d.ts`) — run `git show` on any of them.
  • Change coupling: accountsSlice.ts ↔ Account.tsx packages/desktop-client/src/accounts/accountsSlice.ts:1 — `packages/desktop-client/src/accounts/accountsSlice.ts` and `packages/desktop-client/src/components/accounts/Account.tsx` change together 60% of the time (9 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `68f0b05a` [Redux] Rename queriesSlice to transactionsSlice (#5598); `92e43bc3` [Redux] Move payee states from queriesSlice to payeesSlice (#5592); `165be3d0` [Redux] Move account states from queriesSlice to accountsSlice (#5581) — run `git show` on any of them.
  • Change coupling: GoCardlessExternalMsgModal.tsx ↔ GoCardlessInitialiseModal.tsx packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx:1 — `packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx` and `packages/desktop-client/src/components/modals/GoCardlessInitialiseModal.tsx` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `04aa086c` Unlink account via bank sync page (#4714); `5e3485a8` Automatically focus inputs, or the primary button, in modals. (#2974) (at that commit the files were still `packages/desktop-client/src/components/modals/GoCardlessExternalMsg.tsx` and `packages/desktop-client/src/components/modals/GoCardlessInitialise.tsx`); `73289148` ♻️ (common) migrating to specific common component import paths pt4 (… (at that commit the files were still `packages/desktop-client/src/components/modals/GoCardlessExternalMsg.js` and `packages/desktop-client/src/components/modals/GoCardlessInitialise.tsx`) — run `git show` on any of them.
  • Change coupling: AccountAutocomplete.tsx ↔ PayeeAutocomplete.tsx packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:1 — `packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx` and `packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `65dee4c6` lint: a11y issue fixes (#6679); `2dfd62ad` Improve schedule edit form responsiveness for mobile support (#6178); `af5fd5b3` Translation: desktop-client/components/autocomplete (#3275) — run `git show` on any of them.
  • Change coupling: disabledList.ts ↔ getLiveRange.ts packages/desktop-client/src/components/reports/disabledList.ts:1 — `packages/desktop-client/src/components/reports/disabledList.ts` and `packages/desktop-client/src/components/reports/getLiveRange.ts` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a9252f9c` [Enhancements] Add quarter date range presets (#8607); `210422f6` [AI] Add 'Last 30 days' date range option to custom reports (#7217); `4bd0303b` add "last month" mode date filter to reports (#6222) — run `git show` on any of them.
  • Change coupling: index.ts ↔ index.electron.ts packages/loot-core/src/platform/client/connection/index.ts:1 — `packages/loot-core/src/platform/client/connection/index.ts` and `packages/loot-core/src/platform/server/connection/index.electron.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f8b4e87a` Update `send` function to propagate any errors and fix `catchErrors` … (at that commit the file was still `packages/loot-core/src/platform/client/fetch/index.ts`); `5fdaa982` :recycle: removal of '.testing.ts' file extensions in favour of mocks… (at that commit the file was still `packages/loot-core/src/platform/client/fetch/index.ts`); `6ce502ea` :recycle: refactor(electron): moving back from websockets to IPC (#2190) (at that commit the file was still `packages/loot-core/src/platform/client/fetch/index.web.ts`) — run `git show` on any of them.
  • Change coupling: CreateAccountModal.tsx ↔ gocardless.ts packages/desktop-client/src/components/modals/CreateAccountModal.tsx:1 — `packages/desktop-client/src/components/modals/CreateAccountModal.tsx` and `packages/desktop-client/src/gocardless.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `78d533c8` Bank sync page refactor (#7449); `6e934e46` Extract accounts related server handlers from `main.ts` to `server/ac…; `75186183` SimpleFin (#2188) (at that commit the file was still `packages/desktop-client/src/components/modals/CreateAccount.tsx`) — run `git show` on any of them.
  • Change coupling: sync.ts ↔ server-config.ts packages/loot-core/src/server/accounts/sync.ts:1 — `packages/loot-core/src/server/accounts/sync.ts` and `packages/loot-core/src/server/server-config.ts` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f1c0960f` Feature: Add Akahu New Zealand bank sync (#6041); `d5e2030d` Pluggy.ai bank sync (#4049); `1c04aeae` :fire: stripping out plaid integration (#2616) — run `git show` on any of them.
  • Change coupling: ReportOptions.ts ↔ useReports.ts packages/desktop-client/src/components/reports/ReportOptions.ts:1 — `packages/desktop-client/src/components/reports/ReportOptions.ts` and `packages/desktop-client/src/hooks/useReports.ts` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `80fd9975` ✨ Reports - Add an option to trim the start & end intervals (#5641); `bec84193` Add sorting option to custom reports (#4141) (at that commit the file was still `packages/loot-core/src/client/data-hooks/reports.ts`); `6ad0b47c` Custom Reports: Include current (#2684) (at that commit the file was still `packages/loot-core/src/client/data-hooks/reports.ts`) — run `git show` on any of them.
  • Change coupling: Themes.tsx ↔ theme.tsx packages/desktop-client/src/components/settings/Themes.tsx:1 — `packages/desktop-client/src/components/settings/Themes.tsx` and `packages/desktop-client/src/style/theme.tsx` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `0086f805` [AI] Release custom themes feature (#7775); `4b940423` [AI] Persist custom CSS override across theme changes (#7495); `8a8fb2da` [AI] Custom Themes - ability to define separate light/dark theme (#7145) — run `git show` on any of them.
  • Change coupling: AccountAutocomplete.tsx ↔ CategoryAutocomplete.tsx packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:1 — `packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx` and `packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx` change together 53% of the time (9 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `65dee4c6` lint: a11y issue fixes (#6679); `af5fd5b3` Translation: desktop-client/components/autocomplete (#3275); `70e37c01` Use desktop colors for mobile autocomplete modals (#2577) — run `git show` on any of them.
  • Change coupling: CategoryTransactions.tsx ↔ TransactionList.tsx packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx:1 — `packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx` and `packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx` change together 50% of the time (10 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `cac4be7d` :zap: Add in mobile running balance (#5513); `f54e459e` Fix transaction hooks and improve transactions loading experience in …; `6e2154d4` Revert "Mobile running balance" because its causing extreme slowness … — run `git show` on any of them.
  • Change coupling: TransactionListItem.tsx ↔ TransactionListWithBalances.tsx packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx:1 — `packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx` and `packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `566ee382` 🔒 reconciliation on mobile (#8384); `c3e3a258` Mobile: improve performance for transaction list usage (#6755); `cac4be7d` :zap: Add in mobile running balance (#5513) — run `git show` on any of them.
  • Change coupling: SpendingGraph.tsx ↔ spending-spreadsheet.ts packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx:1 — `packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx` and `packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f3451bfc` :sparkles: (dashboards) ability to save filters & timeframes on spend…; `16944a61` Spending Report: Header update (#3380); `2799dbee` Spending Report: Add Last Month (#3132) — run `git show` on any of them.
  • Change coupling: ImportTransactionsModal.tsx ↔ Format.tsx packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:1 — `packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx` and `packages/desktop-client/src/components/settings/Format.tsx` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `9a45d670` :recycle: (components) moving select component to component library (… (at that commit the file was still `packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.jsx`); `e507b8ff` Fix React Aria Button hover styles (#3453) (at that commit the file was still `packages/desktop-client/src/components/modals/ImportTransactionsModal.jsx`); `95ed7aaf` :recycle: (synced-prefs) refactor some SyncedPrefs to string type (#3… (at that commit the file was still `packages/desktop-client/src/components/modals/ImportTransactions.jsx`) — run `git show` on any of them.
  • Change coupling: main.ts ↔ sheet.ts packages/loot-core/src/server/main.ts:1 — `packages/loot-core/src/server/main.ts` and `packages/loot-core/src/server/sheet.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `4b48f091` [TypeScript] Make db.all generic to make it easy to type DB query res…; `89006275` [TypeScript] Make `db.first` generic to make it easy to type DB query…; `58baf749` 🐛 Fix translations failing (#3830) — run `git show` on any of them.
  • Change coupling: actions.ts ↔ sheet.ts packages/loot-core/src/server/budget/actions.ts:1 — `packages/loot-core/src/server/budget/actions.ts` and `packages/loot-core/src/server/sheet.ts` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `4b48f091` [TypeScript] Make db.all generic to make it easy to type DB query res…; `89006275` [TypeScript] Make `db.first` generic to make it easy to type DB query…; `4e6a3bba` :recycle: (synced-prefs) move budget type to synced prefs (#3427) — run `git show` on any of them.
  • Change coupling: ConfirmTransactionEditModal.tsx ↔ TransactionsTable.tsx packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:1 — `packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx` and `packages/desktop-client/src/components/transactions/TransactionsTable.tsx` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `3ec6eeab` add confirmation dialog when changing half-reconciled transfers (#7269); `f18bce60` Fix warning modal not showing a second time. (#2956) (at that commit the files were still `packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx` and `packages/desktop-client/src/components/transactions/TransactionsTable.jsx`); `a6e38ad2` :sparkles: allow un-reconciling (unlocking) transactions (#2252) (at that commit the files were still `packages/desktop-client/src/components/modals/ConfirmTransactionEdit.tsx` and `packages/desktop-client/src/components/transactions/TransactionsTable.jsx`) — run `git show` on any of them.
  • + 3 more in this group — see findings.md.
IC1 · Incompleteness & stubs · Fake-async · ×26
  • Fake-async — async method never awaits packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts:94 — `ensureSuccessResponse` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:288 — `onNext` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/desktop-client/src/enablebanking.ts:129 — `authorizeBank` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/desktop-client/src/gocardless.ts:50 — `authorizeBank` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/desktop-electron/index.ts:513 — `stopSyncServer` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/desktop-electron/window-state.ts:49 — `saveState` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/migrations/1722717601000_reports_move_selected_categories.js:1 — `runMigration` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/migrations/1722804019000_create_dashboard_table.js:5 — `runMigration` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/migrations/1765518577215_multiple_dashboards.js:3 — `runMigration` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/migrations/1788468782000_add_messages_pending.js:3 — `runMigration` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/fs/fs.legacy.ts:384 — `mkdir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/fs/fs.legacy.ts:388 — `size` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/fs/fs.legacy.ts:503 — `removeDir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/fs/fs.web.ts:240 — `mkdir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/fs/fs.web.ts:288 — `removeDir` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/platform/server/sqlite/index.electron.ts:48 — `init` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/accounts/app.ts:872 — `stopGoCardlessWebTokenPolling` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/accounts/app.ts:1202 — `stopEnableBankingPollAuth` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/app.ts:79 — `stopServices` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/migrate/migrations.ts:122 — `applySql` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/sheet.ts:32 — `updateSpreadsheetCache` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/spreadsheet/app.ts:41 — `createQuery` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/sync/index.ts:402 — `_applyMessages` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/sync/index.ts:693 — `errorHandler` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits packages/loot-core/src/server/sync/repair.ts:27 — `repairSync` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • + 1 more in this group — see findings.md.
AC2 · Forms & labels · <Input> field component without a label · ×20
  • <Input> field component without a label packages/desktop-client/src/components/EditablePageHeaderTitle.tsx:36 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/accounts/Header.tsx:645 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/accounts/Reconcile.tsx:182 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/budget/envelope/CoverMenu.tsx:79 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/common/Modal.tsx:542 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/common/Search.tsx:73 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/formula/QueryManager.tsx:224 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/formula/QueryManager.tsx:836 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/AccountGroupsModal/AccountGroupRow.tsx:81 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:198 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/EditFieldModal.tsx:195 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/EditFieldModal.tsx:208 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/EditFieldModal.tsx:251 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/EditFieldModal.tsx:271 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/ImportTransactionsModal/InOutOption.tsx:39 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/ImportTransactionsModal/MultiplierOption.tsx:33 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:965 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:1015 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/reports/DashboardHeader.tsx:77 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Input> field component without a label packages/desktop-client/src/components/reports/ReportCardName.tsx:25 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×13
  • Sync-over-async blocking packages/cli/src/commands/sync.ts:90 — `rmSync` in `callback to action` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/cli/src/lock.ts:140 — `writeFileSync` in `acquireShared` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/cli/src/lock.ts:147 — `rmSync` in `anonymous function` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/index.ts:197 — `fs.readFileSync` in `loadGlobalPrefs` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/index.ts:448 — `fs.existsSync` in `startSyncServer` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/index.ts:767 — `fs.existsSync` in `ipcMain.handle("set-document-dir")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/index.ts:901 — `fs.existsSync` in `ipcMain.handle("move-budget-directory")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/window-state.ts:25 — `fs.readFileSync` in `loadState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/desktop-electron/window-state.ts:51 — `fs.writeFileSync` in `saveState` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/loot-core/src/platform/server/fs/index.api.ts:128 — `fs.statSync` in `removeDirRecursively` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking packages/loot-core/src/platform/server/fs/index.electron.ts:142 — `fs.statSync` in `removeDirRecursively` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:95 — `fs.existsSync` in `findPackageJson` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:97 — `readFileSync` in `findPackageJson` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
X2 · Cancellation propagation · Async function without AbortSignal · ×13
  • Async function without AbortSignal: fetchAllowlist REDACTED:37 — `fetchAllowlist` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: claimAccessKey REDACTED:417 — `claimAccessKey` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getAccounts REDACTED:462 — `getAccounts` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchJSON packages/loot-core/src/server/cloud-storage.ts:70 — `fetchJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: download packages/loot-core/src/server/cloud-storage.ts:453 — `download` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: request packages/loot-core/src/server/auth/api-keys.ts:12 — `request` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getLoginMethods packages/loot-core/src/server/auth/app.ts:126 — `getLoginMethods` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: populateDefaultFilesystem packages/loot-core/src/platform/server/fs/fs.legacy.ts:293 — `populateDefaultFilesystem` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchBundled packages/loot-core/src/platform/server/fs/fs.web.ts:172 — `fetchBundled` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getLatestVersion packages/desktop-client/src/util/versions.ts:53 — `getLatestVersion` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchDirectCss packages/desktop-client/src/style/customThemes.ts:78 — `fetchDirectCss` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchNewsFeed packages/desktop-client/src/news/fetchNewsFeed.ts:75 — `fetchNewsFeed` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchCatalog packages/desktop-client/src/hooks/useThemeCatalog.ts:16 — `fetchCatalog` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
IC1 · Incompleteness & stubs · Markup wires an event to an empty handler · ×12
  • Markup wires an event to an empty handler packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx:84 — `onEditCategoryGroup` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/mobile/budget/ExpenseGroupList.tsx:86 — `onToggleCollapse` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:683 — `onChange` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:685 — `onCloseAddTransaction` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:687 — `onApplyFilter` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:688 — `onBatchDelete` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:689 — `onBatchDuplicate` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:690 — `onBatchLinkSchedule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:691 — `onBatchUnlinkSchedule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:692 — `onCreateRule` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:693 — `onScheduleAction` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
  • Markup wires an event to an empty handler packages/desktop-client/src/components/reports/reports/Calendar.tsx:694 — `onMakeAsNonSplitTransactions` is wired to an arrow whose body is empty — the markup attaches a listener that does nothing. Implement the handler, or remove the attribute that wires it.
D29 · Static Analysis (SAST) · REDACTED · ×11
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×11
  • ClassTooLong: AccountInternal packages/desktop-client/src/components/accounts/Account.tsx:310 — ClassTooLong — 1151 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 751 over it, 2.88× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MonteCarloRunDetailTable packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:1 — ClassTooLong — 1016 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 616 over it, 2.54× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ImportTransactionsModal packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:1 — ClassTooLong — 883 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 483 over it, 2.21× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MonteCarloPotConfiguration packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:1 — ClassTooLong — 636 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 236 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MonteCarlo packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:1 — ClassTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 234 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CategoryTemplateContext packages/loot-core/src/server/budget/category-template-context.ts:34 — ClassTooLong — 633 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 233 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MonteCarloConfiguration packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx:1 — ClassTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 226 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Overview packages/desktop-client/src/components/reports/Overview.tsx:1 — ClassTooLong — 605 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 205 over it, 1.51× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ReportSidebar packages/desktop-client/src/components/reports/ReportSidebar.tsx:1 — ClassTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 142 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: useBuiltInBankSyncProviders packages/desktop-client/src/components/banksync/useBuiltInBankSyncProviders.ts:1 — ClassTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 105 over it, 1.26× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FinancesApp packages/desktop-client/src/components/FinancesApp.tsx:1 — ClassTooLong — 426 significant lines (blank, comment-only and punctuation-only lines excluded), 4 methods. The bar is 400 significant lines; this is 26 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D29 · Static Analysis (SAST) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R8 · Dependency Hygiene · Unused dependency '@typescript/native-preview' · ×10
  • Unused dependency '@typescript/native-preview' package.json:76 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/api/package.json:67 — Declared in packages/api/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/ci-actions/package.json:12 — Declared in packages/ci-actions/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/cli/package.json:44 — Declared in packages/cli/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/component-library/package.json:78 — Declared in packages/component-library/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/crdt/package.json:48 — Declared in packages/crdt/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/desktop-client/package.json:178 — Declared in packages/desktop-client/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/desktop-electron/package.json:30 — Declared in packages/desktop-electron/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/loot-core/package.json:223 — Declared in packages/loot-core/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@typescript/native-preview' packages/sync-server/package.json:122 — Declared in packages/sync-server/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <Select> field component without a label · ×7
  • <Select> field component without a label packages/desktop-client/src/components/filters/FiltersMenu.tsx:363 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/modals/ImportTransactionsModal/DateFormatSelect.tsx:40 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/modals/ImportTransactionsModal/SelectField.tsx:37 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/reports/ReportSidebar.tsx:318 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/reports/ReportSidebar.tsx:360 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/reports/ReportSidebar.tsx:380 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Select> field component without a label packages/desktop-client/src/components/reports/ReportSidebar.tsx:418 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC2 · Forms & labels · <BigInput> field component without a label · ×7
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/ConfigServer.tsx:175 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/ConfigServer.tsx:504 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx:56 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx:64 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/subscribe/ConfirmPasswordForm.tsx:133 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/manager/subscribe/Login.tsx:68 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <BigInput> field component without a label packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx:139 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
C2 · Access Controls · Anyone can act as another user by changing what their browser sends · ×7
  • Anyone can act as another user by changing what their browser sends REDACTED:57 — Here who is asking is taken from the 'role' form field (const{userName, role, displayName, enabled} = req.body||{}) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends REDACTED:109 — Here who is asking is taken from the 'role' form field (const{id, userName, role, displayName, enabled} = req.body||{}) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends packages/sync-server/src/app-secrets.js:38 — Here who is asking is taken from the 'X-Actual-File-Id' request header (const fileId = req.get('X-Actual-File-Id')) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends packages/sync-server/src/app-secrets.js:132 — Here who is asking is taken from the 'X-Actual-File-Id' request header (const fileId = req.get('X-Actual-File-Id')) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends REDACTED:36 — Here who is asking is taken from the 'X-Actual-File-Id' request header (const fileId = req.get('X-Actual-File-Id')) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends REDACTED:336 — Here who is asking is taken from the 'x-actual-file-id' request header (const fileId = req.headers['x-actual-file-id']) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
  • Anyone can act as another user by changing what their browser sends REDACTED:347 — Here who is asking is taken from the 'x-actual-group-id' request header (const groupIdHeader = req.headers['x-actual-group-id']) and nothing checks it: no signature, no server-side session, no verified token. Cookies, headers and form or address values come from the visitor's browser and they can change them, so anyone can put another person's id there and be treated as that person — no password needed.
D10 · Test Quality · Skipped test · ×7
  • Skipped test: should always sync clients into the same state packages/loot-core/src/server/sync/sync.property.test.ts:316 — Skipped — switched off by it.skip
  • Skipped test: should run a counterexample that needs to be fixed packages/loot-core/src/server/sync/sync.property.test.ts:361 — Skipped — switched off by it.skip
  • Skipped test: dropdown invalid value resets correctly packages/desktop-client/src/components/transactions/TransactionsTable.test.tsx:1112 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) packages/desktop-client/e2e/storage.test.ts:100 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) packages/desktop-client/e2e/storage.test.ts:161 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) packages/desktop-client/e2e/storage.test.ts:197 — Skipped — switched off by test.skip
  • Skipped test: (unnamed test) packages/desktop-client/e2e/storage.test.ts:232 — Skipped — switched off by test.skip
D31 · IaC & Container Security · Medium IaC · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×7
  • Change-coupling hub: CustomReport.tsx → SaveReport.tsx, ReportTableHeader.tsx, ReportTableTotals.tsx, GetCardData.tsx, makeQuery.ts, useReports.ts packages/desktop-client/src/components/reports/reports/CustomReport.tsx — `packages/desktop-client/src/components/reports/reports/CustomReport.tsx` changes together with 6 other files — `packages/desktop-client/src/components/reports/SaveReport.tsx`, `packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx`, `packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx`, `packages/desktop-client/src/components/reports/reports/GetCardData.tsx`, `packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts`, `packages/desktop-client/src/hooks/useReports.ts` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
  • Change-coupling hub: ReportRouter.tsx → Overview.tsx, Experimental.tsx, useFeatureFlag.ts packages/desktop-client/src/components/reports/ReportRouter.tsx — `packages/desktop-client/src/components/reports/ReportRouter.tsx` changes together with 3 other files — `packages/desktop-client/src/components/reports/Overview.tsx`, `packages/desktop-client/src/components/settings/Experimental.tsx`, `packages/desktop-client/src/hooks/useFeatureFlag.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: EnvelopeBalanceMenuModal.tsx → BalanceWithCarryover.tsx, EnvelopeBudgetComponents.tsx, TrackingBudgetComponents.tsx, BudgetTable.tsx packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx — `packages/desktop-client/src/components/modals/EnvelopeBalanceMenuModal.tsx` changes together with 4 other files — `packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx`, `packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx`, `packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx`, `packages/desktop-client/src/components/mobile/budget/BudgetTable.tsx` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: AccountTransactions.tsx → CategoryTransactions.tsx, TransactionList.tsx, AccountMenuModal.tsx, useAccountPreviewTransactions.ts packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx — `packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx` changes together with 4 other files — `packages/desktop-client/src/components/mobile/budget/CategoryTransactions.tsx`, `packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx`, `packages/desktop-client/src/components/modals/AccountMenuModal.tsx`, `packages/desktop-client/src/hooks/useAccountPreviewTransactions.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: ReportSidebar.tsx → ReportTopbar.tsx, GetCardData.tsx, grouped-spreadsheet.ts, makeQuery.ts, useReports.ts packages/desktop-client/src/components/reports/ReportSidebar.tsx — `packages/desktop-client/src/components/reports/ReportSidebar.tsx` changes together with 5 other files — `packages/desktop-client/src/components/reports/ReportTopbar.tsx`, `packages/desktop-client/src/components/reports/reports/GetCardData.tsx`, `packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts`, `packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts`, `packages/desktop-client/src/hooks/useReports.ts` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 5.
  • Change-coupling hub: ChooseGraph.tsx → ReportTableHeader.tsx, ReportTableTotals.tsx, makeQuery.ts packages/desktop-client/src/components/reports/ChooseGraph.tsx — `packages/desktop-client/src/components/reports/ChooseGraph.tsx` changes together with 3 other files — `packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableHeader.tsx`, `packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableTotals.tsx`, `packages/desktop-client/src/components/reports/spreadsheets/makeQuery.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: AccountMenuModal.tsx → TransactionList.tsx, TransactionListItem.tsx, TransactionListWithBalances.tsx packages/desktop-client/src/components/modals/AccountMenuModal.tsx — `packages/desktop-client/src/components/modals/AccountMenuModal.tsx` changes together with 3 other files — `packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx`, `packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx`, `packages/desktop-client/src/components/mobile/transactions/TransactionListWithBalances.tsx` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D29 · Static Analysis (SAST) · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
P12 · CI test-gate honesty · Workspace package's tests never run by CI · ×5
  • Workspace package's tests never run by CI packages/cli/package.json:31 — `packages/cli` is a workspace package with 182 test(s) in 10 file(s) (e.g. `packages/cli/src/cache.test.ts`, `packages/cli/src/config.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
  • Workspace package's tests never run by CI packages/component-library/package.json:56 — `packages/component-library` is a workspace package with 37 test(s) in 5 file(s) (e.g. `packages/component-library/src/ComponentSize.web.test.tsx`, `packages/component-library/src/InitialFocus.web.test.tsx`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
  • Workspace package's tests never run by CI packages/desktop-electron/package.json:12 — `packages/desktop-electron` is a workspace package with 19 test(s) in 7 file(s) (e.g. `packages/desktop-electron/e2e/navigation-security.test.ts`, `packages/desktop-electron/e2e/onboarding.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
  • Workspace package's tests never run by CI packages/eslint-plugin-actual/package.json:8 — `packages/eslint-plugin-actual` is a workspace package with 9 test(s) in 9 file(s) (e.g. `packages/eslint-plugin-actual/lib/rules/__tests__/enforce-boundaries.test.js`, `packages/eslint-plugin-actual/lib/rules/__tests__/no-anchor-tag.test.js`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
  • Workspace package's tests never run by CI packages/sync-server/package.json:81 — `packages/sync-server` is a workspace package with 630 test(s) in 69 file(s) (e.g. `packages/sync-server/src/api-key-bank-sync.test.ts`, `packages/sync-server/src/api-key-budget-access.test.ts`), but no CI command runs them — no step names the package and no workspace-wide command reaches it, so its tests gate nothing. Run its tests in CI, or delete them.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×5
  • Outbound HTTP without resilience REDACTED:47 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:213 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:421 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:510 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience packages/sync-server/src/scripts/health-check.ts:23 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×5
  • Recursive walk over a caller-supplied document has no depth cap packages/loot-core/src/server/forecast/forecast-filters.ts:163 — `matchesAQLFilter` is exported, takes a document from its caller (line 266) and hands it to `evaluateClause`, which calls itself at line 163 (`evaluateClause`) with a piece of `clause` — and nowhere in `evaluateClause` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `evaluateClause` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/loot-core/src/server/forecast/forecast-filters.ts:274 — `matchesAQLFilter` is exported and takes `filter: Record<string, unknown>` from its caller, and it calls itself at line 274 (`matchesAQLFilter`) with a piece of `filter` (and at line 283) — and nowhere in `matchesAQLFilter` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `matchesAQLFilter` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/crdt/src/crdt/merkle.ts:64 — `insert` is exported, takes a document from its caller (line 48) and hands it to `insertKey`, which calls itself at line 64 (`insertKey`) with a piece of `trie` — and nowhere in `insertKey` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `insertKey` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/crdt/src/crdt/merkle.ts:160 — `prune` is exported and takes `trie: TrieNode` from its caller, and it calls itself at line 160 (`prune`) with a piece of `trie` — and nowhere in `prune` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `prune` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap packages/crdt/src/crdt/merkle.ts:177 — `debug` is exported and takes `trie: TrieNode` from its caller, and it calls itself at line 177 (`debug`) with a piece of `trie` — and nowhere in `debug` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `debug` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D17 · Explicit Debt · FixmeComment · ×4
  • FixmeComment REDACTED:133 — //FIXME: error code should be 404. Need to make sure frontend is ok with it. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment REDACTED:329 — // FIXME: Not sure how this cannot be a string when the header is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment REDACTED:449 — // FIXME: Not sure how this cannot be a string when the header is — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment REDACTED:569 — // FIXME: convert to boolean, make sure it works in the frontend — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D3 · God Classes · MethodTooLong · ×4
  • MethodTooLong: AccountInternal.render packages/desktop-client/src/components/accounts/Account.tsx:1853 — MethodTooLong — render runs 195 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 95 over it, 1.95× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Condition.eval REDACTED:239 — MethodTooLong — eval runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Action.exec packages/loot-core/src/server/rules/action.ts:99 — MethodTooLong — exec runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CategoryTemplateContext.runTemplatesForPriority packages/loot-core/src/server/budget/category-template-context.ts:160 — MethodTooLong — runTemplatesForPriority runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D10 · Test Quality · Fixed-sleep synchronisation · ×3
  • Fixed-sleep synchronisation: keeps an open waiting while a write replaces the file packages/loot-core/src/platform/server/sqlite/storage/opfs-sahpool.test.ts:626 — This test starts work it did not wait for (`writing`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 20))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: does not spin forever when unsubscribed during a refetch packages/desktop-client/src/queries/pagedQuery.test.ts:683 — This test starts work it did not wait for (`fetchNextPromise`, still running when the sleep starts) and then orders itself against it with `wait(1)` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
  • Fixed-sleep synchronisation: exclusive waits for active shared holders to release packages/cli/src/lock.test.ts:141 — This test starts work it did not wait for (`writerPromise`, still running when the sleep starts) and then orders itself against it with `new Promise(resolve => setTimeout(resolve, 150))` — a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer's box and random in CI. Wait for the event itself instead: the process's own exit or output, a completion handle, or a condition polled to a timeout.
D17 · Explicit Debt · HackComment · ×3
  • HackComment packages/desktop-client/src/hooks/useFormat.ts:127 — // Hack: keep the global number format in sync - update the settings when — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/desktop-client/src/components/rules/RuleEditor.tsx:1025 — // Hack for now, these ops should be the only ones available — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:931 — //hack: this is a workaround to forward the pointer events to the completion item. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · TransactionsTable.Transaction · ×3
  • TransactionsTable.Transaction::renderColumnCell (cognitive 61) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629 — TransactionsTable.Transaction::renderColumnCell has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 17 (49 pts), boolean chains 11, match/switch 1 (nesting depth added 32). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: 3 other methods here (TransactionsTable.Transaction, TransactionsTable.Transaction::onUpdate, TransactionsTable.Transaction::onUpdateAfterConfirm) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • TransactionsTable.Transaction::onUpdateAfterConfirm (cognitive 20) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1249 — TransactionsTable.Transaction::onUpdateAfterConfirm has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (TransactionsTable.Transaction, TransactionsTable.Transaction::onUpdate, TransactionsTable.Transaction::renderColumnCell) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • TransactionsTable.Transaction::onUpdate (cognitive 17) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1157 — TransactionsTable.Transaction::onUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (TransactionsTable.Transaction, TransactionsTable.Transaction::onUpdateAfterConfirm, TransactionsTable.Transaction::renderColumnCell) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: @actual-app/crdt — @actual-app/crdt: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: @actual-app/web — @actual-app/web: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: @actual-app/core — @actual-app/core: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
AC2 · Forms & labels · <Autocomplete> field component without a label · ×2
  • <Autocomplete> field component without a label packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:841 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
  • <Autocomplete> field component without a label packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:1216 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC6 · Visual & motion safety · Focus outline removed inline · ×2
  • Focus outline removed inline packages/desktop-client/src/components/formula/QueryManager.tsx:677 — <textarea> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
  • Focus outline removed inline packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:192 — <input> takes keyboard focus, and outline:none/0 in its inline style removes the focus ring with no chance of a :focus replacement (an inline style outranks every stylesheet rule). Keep a visible focus indicator.
D1 · Cyclomatic Complexity · TransactionsTable.Transaction · ×2
  • TransactionsTable.Transaction::renderColumnCell (cyclomatic 47) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629 — TransactionsTable.Transaction::renderColumnCell has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (TransactionsTable.Transaction, TransactionsTable.Transaction::onUpdateAfterConfirm) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • TransactionsTable.Transaction::onUpdateAfterConfirm (cyclomatic 20) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1249 — TransactionsTable.Transaction::onUpdateAfterConfirm has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (TransactionsTable.Transaction, TransactionsTable.Transaction::renderColumnCell) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · FiltersMenu.ConfigureField · ×2
  • FiltersMenu.ConfigureField::setOp (cyclomatic 36) packages/desktop-client/src/components/filters/FiltersMenu.tsx:232 — FiltersMenu.ConfigureField::setOp has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField, FiltersMenu.ConfigureField::resolveTextToId) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • FiltersMenu.ConfigureField::resolveTextToId (cyclomatic 17) packages/desktop-client/src/components/filters/FiltersMenu.tsx:196 — FiltersMenu.ConfigureField::resolveTextToId has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField, FiltersMenu.ConfigureField::setOp) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · monteCarloSimulation.runMonteCarloSimulation · ×2
  • monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots (cyclomatic 27) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1647 — monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation, monteCarloSimulation.runMonteCarloSimulation::settleYearFlows) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • monteCarloSimulation.runMonteCarloSimulation::settleYearFlows (cyclomatic 19) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:2067 — monteCarloSimulation.runMonteCarloSimulation::settleYearFlows has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation, monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D10 · Test Quality · No assertions · ×2
  • No assertions: Transfers are properly updated packages/loot-core/src/server/main.test.ts:215 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: transfers are properly de-categorized packages/loot-core/src/server/transactions/transfer.test.ts:134 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
D2 · Cognitive Complexity · monteCarloSimulation.runMonteCarloSimulation · ×2
  • monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots (cognitive 53) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1647 — monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (28 pts), loops 8 (17 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation, monteCarloSimulation.runMonteCarloSimulation::settleYearFlows) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • monteCarloSimulation.runMonteCarloSimulation::settleYearFlows (cognitive 29) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:2067 — monteCarloSimulation.runMonteCarloSimulation::settleYearFlows has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 7 (13 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation, monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · createOnce.Program · ×2
  • createOnce.Program:exit (cognitive 46) packages/eslint-plugin-actual/lib/rules/prefer-const.js:265 — createOnce.Program:exit has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (84 pts), loops 8 (28 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 90). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • createOnce.Program:exit::findIdentifier (cognitive 28) packages/eslint-plugin-actual/lib/rules/prefer-const.js:324 — createOnce.Program:exit::findIdentifier has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FiltersMenu.ConfigureField · ×2
  • FiltersMenu.ConfigureField::setOp (cognitive 44) packages/desktop-client/src/components/filters/FiltersMenu.tsx:232 — FiltersMenu.ConfigureField::setOp has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 12, ternaries 3 (9 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField, FiltersMenu.ConfigureField::resolveTextToId) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • FiltersMenu.ConfigureField::resolveTextToId (cognitive 26) packages/desktop-client/src/components/filters/FiltersMenu.tsx:196 — FiltersMenu.ConfigureField::resolveTextToId has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (8 pts), loops 2 (5 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField, FiltersMenu.ConfigureField::setOp) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: AccountInternal packages/desktop-client/src/components/accounts/Account.tsx:310 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Spreadsheet packages/loot-core/src/server/spreadsheet/spreadsheet.ts:29 — TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling clique · ×2
  • Change coupling clique: AreaGraph.tsx, BarGraph.tsx, DonutGraph.tsx, LineGraph.tsx, StackedBarGraph.tsx packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx — 5 files — `packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx`, `packages/desktop-client/src/components/reports/graphs/BarGraph.tsx`, `packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx`, `packages/desktop-client/src/components/reports/graphs/LineGraph.tsx`, `packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 10 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
  • Change coupling clique: CashFlowCard.tsx, NetWorthCard.tsx, SpendingCard.tsx packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx — 3 files — `packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx`, `packages/desktop-client/src/components/reports/reports/NetWorthCard.tsx`, `packages/desktop-client/src/components/reports/reports/SpendingCard.tsx` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: BudgetPage (LCOM4 4) packages/desktop-client/e2e/page-models/budget-page.ts:6 — BudgetPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: MobileBudgetPage (LCOM4 4) packages/desktop-client/e2e/page-models/mobile-budget-page.ts:12 — MobileBudgetPage's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
IC1 · Incompleteness & stubs · Guard cannot change the result · ×2
  • Guard cannot change the result — returns what the code already falls through to packages/eslint-plugin-actual/lib/rules/no-untranslated-strings.js:104 — The guard above `return false;` also returns `false`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
  • Guard cannot change the result — returns what the code already falls through to packages/loot-core/src/server/aql/compiler.ts:28 — The guard above `return whereStr;` also returns `whereStr`, so no input can make it matter. Implement the distinction that was intended, or delete the guard.
R10 · Code Duplication · Duplicated block with local edits (169 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (169 matched lines × 2 locations) packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx:54 — packages/desktop-client/src/components/mobile/budget/ExpenseCategoryListItem.tsx:54 · packages/desktop-client/src/components/mobile/budget/IncomeCategoryListItem.tsx:41 — the two spans are one implementation copied and then locally edited — 657 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (169 matched lines × 2 locations) packages/loot-core/src/server/budget/envelope.ts:48 — packages/loot-core/src/server/budget/envelope.ts:48 · packages/loot-core/src/server/budget/tracking.ts:23 — the two spans are one implementation copied and then locally edited — 997 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (101 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (101 matched lines × 2 locations) packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69 — packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69 · packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx:95 — the two spans are one implementation copied and then locally edited — 563 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (101 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:373 — packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:373 · packages/desktop-client/src/components/reports/reports/Spending.tsx:269 — the two spans are one implementation copied and then locally edited — 337 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (71 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (71 matched lines × 2 locations) packages/desktop-client/src/components/modals/CoverModal.tsx:31 — packages/desktop-client/src/components/modals/CoverModal.tsx:31 · packages/desktop-client/src/components/modals/TransferModal.tsx:30 — the two spans are one implementation copied and then locally edited — 355 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (71 matched lines × 2 locations) packages/loot-core/src/platform/client/connection/index.electron.ts:33 — packages/loot-core/src/platform/client/connection/index.electron.ts:33 · packages/loot-core/src/platform/client/connection/index.ts:42 — the two spans are one implementation copied and then locally edited — 455 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (65 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (65 matched lines × 2 locations) packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:21 — packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:21 · packages/desktop-client/src/components/modals/ConvertToScheduleModal.tsx:22 — the two spans are one implementation copied and then locally edited — 272 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (65 matched lines × 2 locations) packages/desktop-client/src/components/modals/manager/ImportYNAB4Modal.tsx:32 — packages/desktop-client/src/components/modals/manager/ImportYNAB4Modal.tsx:32 · packages/desktop-client/src/components/modals/manager/ImportYNAB5Modal.tsx:42 — the two spans are one implementation copied and then locally edited — 326 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R7 · Dead Code · Dead file (~66 LoC) · ×2
  • Dead file (~66 LoC) packages/sync-server/src/app-gocardless/banks/berliner_sparkasse_beladebexxx.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~66 LoC) packages/sync-server/src/app-gocardless/banks/spk_karlsruhe_karsde66.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~18 LoC) · ×2
  • Dead file (~18 LoC) packages/sync-server/src/app-gocardless/banks/direkt_heladef1822.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~18 LoC) packages/sync-server/src/app-gocardless/banks/isybank_itbbitmm.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@octokit/rest' · ×2
  • Unused dependency '@octokit/rest' package.json:73 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
  • Unused dependency '@octokit/rest' packages/ci-actions/package.json:11 — Declared in packages/ci-actions/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Password key derivation is priced too cheaply · ×2
  • Password key derivation is priced too cheaply packages/loot-core/src/server/encryption/encryption-internals.electron.ts:82 — This code fixes PBKDF2-SHA-512 at 10,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
  • Password key derivation is priced too cheaply packages/loot-core/src/server/encryption/encryption-internals.ts:75 — This code fixes PBKDF2-SHA-512 at 10,000 iterations. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) packages/desktop-client/src/hooks/useDragDrop.tsx:365 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) packages/desktop-client/src/components/mobile/tags/MobileTagsPage.tsx:69 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
AC2 · Forms & labels · <ResponsiveInput> field component without a label · ×1
  • <ResponsiveInput> field component without a label packages/desktop-client/src/components/manager/subscribe/Login.tsx:177 — This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark packages/desktop-electron/loading.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement packages/desktop-client/index.html:75 — `.recharts-wrapper:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · monteCarloSimulation.runMonteCarloSimulation (cyclomatic 169) · ×1
  • monteCarloSimulation.runMonteCarloSimulation (cyclomatic 169) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400 — monteCarloSimulation.runMonteCarloSimulation has cyclomatic complexity 169 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots, monteCarloSimulation.runMonteCarloSimulation::settleYearFlows) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TransactionsTable.TransactionTable (cyclomatic 121) · ×1
  • TransactionsTable.TransactionTable (cyclomatic 121) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:3140 — TransactionsTable.TransactionTable has cyclomatic complexity 121 (threshold 15). Of this number, 18 points are the body's own statements and 103 belong to 32 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BalanceForecast.BalanceForecastInner (cyclomatic 104) · ×1
  • BalanceForecast.BalanceForecastInner (cyclomatic 104) packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94 — BalanceForecast.BalanceForecastInner has cyclomatic complexity 104 (threshold 15). Of this number, 63 points are the body's own statements and 41 belong to 15 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomReport.CustomReportInner (cyclomatic 102) · ×1
  • CustomReport.CustomReportInner (cyclomatic 102) packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145 — CustomReport.CustomReportInner has cyclomatic complexity 102 (threshold 15). Of this number, 35 points are the body's own statements and 67 belong to 15 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · coordinator.createCoordinator.onconnect (cyclomatic 89) · ×1
  • coordinator.createCoordinator.onconnect (cyclomatic 89) packages/loot-core/src/platform/client/browser-server/coordinator.ts:546 — coordinator.createCoordinator.onconnect has cyclomatic complexity 89 (threshold 15). Of this number, 21 points are the body's own statements and 68 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Modals.Modals (cyclomatic 87) · ×1
  • Modals.Modals (cyclomatic 87) packages/desktop-client/src/components/Modals.tsx:96 — Modals.Modals has cyclomatic complexity 87 (threshold 15). Most of this is not in the body itself: 1 of the 87 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 113, 102). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TransactionEdit.TransactionEditInner (cyclomatic 68) · ×1
  • TransactionEdit.TransactionEditInner (cyclomatic 68) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:635 — TransactionEdit.TransactionEditInner has cyclomatic complexity 68 (threshold 15). Of this number, 30 points are the body's own statements and 38 belong to 18 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Overview.Overview (cyclomatic 68) · ×1
  • Overview.Overview (cyclomatic 68) packages/desktop-client/src/components/reports/Overview.tsx:104 — Overview.Overview has cyclomatic complexity 68 (threshold 15). Of this number, 27 points are the body's own statements and 41 belong to 14 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · opfs-sahpool.createOpfsStore (cyclomatic 67) · ×1
  • opfs-sahpool.createOpfsStore (cyclomatic 67) packages/loot-core/src/platform/server/sqlite/storage/opfs-sahpool.ts:79 — opfs-sahpool.createOpfsStore has cyclomatic complexity 67 (threshold 15). Of this number, 29 points are the body's own statements and 38 belong to 15 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionsTable.Transaction (cyclomatic 65) · ×1
  • TransactionsTable.Transaction (cyclomatic 65) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065 — TransactionsTable.Transaction has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (TransactionsTable.Transaction::onUpdateAfterConfirm, TransactionsTable.Transaction::renderColumnCell) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · Crossover.CrossoverInner (cyclomatic 63) · ×1
  • Crossover.CrossoverInner (cyclomatic 63) packages/desktop-client/src/components/reports/reports/Crossover.tsx:74 — Crossover.CrossoverInner has cyclomatic complexity 63 (threshold 15). Of this number, 26 points are the body's own statements and 37 belong to 18 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Autocomplete.SingleAutocomplete (cyclomatic 62) · ×1
  • Autocomplete.SingleAutocomplete (cyclomatic 62) packages/desktop-client/src/components/autocomplete/Autocomplete.tsx:214 — Autocomplete.SingleAutocomplete has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 10 of the 62 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 443, a function literal at line 551, a function literal at line 384, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Condition.eval (cyclomatic 61) · ×1
  • Condition.eval (cyclomatic 61) REDACTED:239 — Condition.eval has cyclomatic complexity 61 (threshold 15). Of this number, 60 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · idb-memory.createMemoryIdbStore (cyclomatic 60) · ×1
  • idb-memory.createMemoryIdbStore (cyclomatic 60) packages/loot-core/src/platform/server/sqlite/storage/idb-memory.ts:78 — idb-memory.createMemoryIdbStore has cyclomatic complexity 60 (threshold 15). Of this number, 29 points are the body's own statements and 31 belong to 16 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SelectedTransactionsButton.SelectedTransactionsButton (cyclomatic 57) · ×1
  • SelectedTransactionsButton.SelectedTransactionsButton (cyclomatic 57) packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:53 — SelectedTransactionsButton.SelectedTransactionsButton has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 9 of the 57 points are its own statements and the rest belongs to 18 function items inside it that branch (a function literal at line 412, a function literal at line 162, a function literal at line 116, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MonteCarlo.MonteCarlo (cyclomatic 56) · ×1
  • MonteCarlo.MonteCarlo (cyclomatic 56) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56 — MonteCarlo.MonteCarlo has cyclomatic complexity 56 (threshold 15). Of this number, 46 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BalanceForecastCard.BalanceForecastCard (cyclomatic 56) · ×1
  • BalanceForecastCard.BalanceForecastCard (cyclomatic 56) packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:54 — BalanceForecastCard.BalanceForecastCard has cyclomatic complexity 56 (threshold 15). Of this number, 41 points are the body's own statements and 15 belong to 5 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TransactionEdit.TransactionEditUnconnected (cyclomatic 55) · ×1
  • TransactionEdit.TransactionEditUnconnected (cyclomatic 55) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:1601 — TransactionEdit.TransactionEditUnconnected has cyclomatic complexity 55 (threshold 15). Most of this is not in the body itself: 6 of the 55 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1739, 1695, 1828, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DonutGraph.DonutGraph (cyclomatic 52) · ×1
  • DonutGraph.DonutGraph (cyclomatic 52) packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx:107 — DonutGraph.DonutGraph has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 4 of the 52 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 184, a function literal at line 430, a function literal at line 145, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · GenericInput.GenericInput (cyclomatic 48) · ×1
  • GenericInput.GenericInput (cyclomatic 48) packages/desktop-client/src/components/util/GenericInput.tsx:121 — GenericInput.GenericInput has cyclomatic complexity 48 (threshold 15). Of this number, 37 points are the body's own statements and 11 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionList.TransactionList (cyclomatic 47) · ×1
  • TransactionList.TransactionList (cyclomatic 47) packages/desktop-client/src/components/transactions/TransactionList.tsx:139 — TransactionList.TransactionList has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 4 of the 47 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 349, 205, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sync-events.listenForSyncEvent (cyclomatic 47) · ×1
  • sync-events.listenForSyncEvent (cyclomatic 47) packages/desktop-client/src/sync-events.ts:61 — sync-events.listenForSyncEvent has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 93, 80, 63). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Calendar.CalendarInner (cyclomatic 46) · ×1
  • Calendar.CalendarInner (cyclomatic 46) packages/desktop-client/src/components/reports/reports/Calendar.tsx:95 — Calendar.CalendarInner has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 13 of the 46 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 139, a function literal at line 252, a function literal at line 486, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · RuleEditor.ActionEditor (cyclomatic 46) · ×1
  • RuleEditor.ActionEditor (cyclomatic 46) packages/desktop-client/src/components/rules/RuleEditor.tsx:524 — RuleEditor.ActionEditor has cyclomatic complexity 46 (threshold 15). Of this number, 41 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Transaction.Transaction (cyclomatic 45) · ×1
  • Transaction.Transaction (cyclomatic 45) packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx:38 — Transaction.Transaction has cyclomatic complexity 45 (threshold 15). Of this number, 38 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transaction-rules.conditionsToAQL · ×1
  • transaction-rules.conditionsToAQL::mapConditionToActualQL (cyclomatic 45) packages/loot-core/src/server/transactions/transaction-rules.ts:534 — transaction-rules.conditionsToAQL::mapConditionToActualQL has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Spending.SpendingInternal (cyclomatic 43) · ×1
  • Spending.SpendingInternal (cyclomatic 43) packages/desktop-client/src/components/reports/reports/Spending.tsx:75 — Spending.SpendingInternal has cyclomatic complexity 43 (threshold 15). Of this number, 33 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionListItem.TransactionListItem (cyclomatic 43) · ×1
  • TransactionListItem.TransactionListItem (cyclomatic 43) packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx:79 — TransactionListItem.TransactionListItem has cyclomatic complexity 43 (threshold 15). Of this number, 42 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RuleEditor.RuleEditor (cyclomatic 43) · ×1
  • RuleEditor.RuleEditor (cyclomatic 43) packages/desktop-client/src/components/rules/RuleEditor.tsx:1087 — RuleEditor.RuleEditor has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 1215, addActionToSplitAfterIndex, onSave, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · forecast-filters.evaluateClause (cyclomatic 42) · ×1
  • forecast-filters.evaluateClause (cyclomatic 42) packages/loot-core/src/server/forecast/forecast-filters.ts:161 — forecast-filters.evaluateClause has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 4 of the 42 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ynab5.importScheduledTransactions (cyclomatic 41) · ×1
  • ynab5.importScheduledTransactions (cyclomatic 41) packages/loot-core/src/server/importers/ynab5.ts:872 — ynab5.importScheduledTransactions has cyclomatic complexity 41 (threshold 15). Of this number, 26 points are the body's own statements and 15 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Summary.SummaryInner (cyclomatic 40) · ×1
  • Summary.SummaryInner (cyclomatic 40) packages/desktop-client/src/components/reports/reports/Summary.tsx:71 — Summary.SummaryInner has cyclomatic complexity 40 (threshold 15). Of this number, 26 points are the body's own statements and 14 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ReportSidebar.ReportSidebar (cyclomatic 40) · ×1
  • ReportSidebar.ReportSidebar (cyclomatic 40) packages/desktop-client/src/components/reports/ReportSidebar.tsx:87 — ReportSidebar.ReportSidebar has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 14 of the 40 points are its own statements and the rest belongs to 7 function items inside it that branch (onChangeBalanceType, a function literal at line 457, a function literal at line 144, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · RuleEditor.ConditionsList (cyclomatic 40) · ×1
  • RuleEditor.ConditionsList (cyclomatic 40) packages/desktop-client/src/components/rules/RuleEditor.tsx:874 — RuleEditor.ConditionsList has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 2 of the 40 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 924, addCondition, a function literal at line 1022, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ynab5.importTransactions (cyclomatic 40) · ×1
  • ynab5.importTransactions (cyclomatic 40) packages/loot-core/src/server/importers/ynab5.ts:588 — ynab5.importTransactions has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 8 of the 40 points are its own statements and the rest belongs to 6 function items inside it that branch (orphanTransferComparator, a function literal at line 769, a function literal at line 709, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Menu.Menu (cyclomatic 38) · ×1
  • Menu.Menu (cyclomatic 38) packages/component-library/src/Menu.tsx:68 — Menu.Menu has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 169, selectItem, a function literal at line 141, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SelectLinkedAccountsModal.SelectLinkedAccountsModal (cyclomatic 38) · ×1
  • SelectLinkedAccountsModal.SelectLinkedAccountsModal (cyclomatic 38) packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:199 — SelectLinkedAccountsModal.SelectLinkedAccountsModal has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 300, a function literal at line 206, a function literal at line 512, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · schedule-template.buildMonthlyOutflow (cyclomatic 38) · ×1
  • schedule-template.buildMonthlyOutflow (cyclomatic 38) packages/loot-core/src/server/budget/schedule-template.ts:361 — schedule-template.buildMonthlyOutflow has cyclomatic complexity 38 (threshold 15). Of this number, 33 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Action.exec (cyclomatic 38) · ×1
  • Action.exec (cyclomatic 38) packages/loot-core/src/server/rules/action.ts:99 — Action.exec has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MonthPicker.MonthPicker (cyclomatic 37) · ×1
  • MonthPicker.MonthPicker (cyclomatic 37) packages/desktop-client/src/components/budget/MonthPicker.tsx:30 — MonthPicker.MonthPicker has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 1 of the 37 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 132, 67). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · validateAutomation.validateAutomation (cyclomatic 37) · ×1
  • validateAutomation.validateAutomation (cyclomatic 37) packages/desktop-client/src/components/budget/goals/validateAutomation.ts:48 — validateAutomation.validateAutomation has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FiltersMenu.ConfigureField (cyclomatic 37) · ×1
  • FiltersMenu.ConfigureField (cyclomatic 37) packages/desktop-client/src/components/filters/FiltersMenu.tsx:91 — FiltersMenu.ConfigureField has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField::resolveTextToId, FiltersMenu.ConfigureField::setOp) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · MobileTagEditPage.TagEditForm (cyclomatic 37) · ×1
  • MobileTagEditPage.TagEditForm (cyclomatic 37) packages/desktop-client/src/components/mobile/tags/MobileTagEditPage.tsx:100 — MobileTagEditPage.TagEditForm has cyclomatic complexity 37 (threshold 15). Of this number, 21 points are the body's own statements and 16 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · cleanup-template.processCleanup (cyclomatic 37) · ×1
  • cleanup-template.processCleanup (cyclomatic 37) packages/loot-core/src/server/budget/cleanup-template.ts:152 — cleanup-template.processCleanup has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync.reconcileTransactions (cyclomatic 36) · ×1
  • sync.reconcileTransactions (cyclomatic 36) packages/loot-core/src/server/accounts/sync.ts:641 — sync.reconcileTransactions has cyclomatic complexity 36 (threshold 15). Of this number, 34 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PayeeAutocomplete.PayeeAutocomplete (cyclomatic 35) · ×1
  • PayeeAutocomplete.PayeeAutocomplete (cyclomatic 35) packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:364 — PayeeAutocomplete.PayeeAutocomplete has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 5 of the 35 points are its own statements and the rest belongs to 10 function items inside it that branch (filterSuggestions, a function literal at line 578, a function literal at line 594, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · FormulaEditor.FormulaEditor (cyclomatic 35) · ×1
  • FormulaEditor.FormulaEditor (cyclomatic 35) packages/desktop-client/src/components/formula/FormulaEditor.tsx:63 — FormulaEditor.FormulaEditor has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 105, 210, 247, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · crossover-spreadsheet.recalculate (cyclomatic 35) · ×1
  • crossover-spreadsheet.recalculate (cyclomatic 35) packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:214 — crossover-spreadsheet.recalculate has cyclomatic complexity 35 (threshold 15). Of this number, 33 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DateRangePicker.DateRangePicker (cyclomatic 34) · ×1
  • DateRangePicker.DateRangePicker (cyclomatic 34) packages/component-library/src/DateRangePicker.tsx:71 — DateRangePicker.DateRangePicker has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 8 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ReportTableRow.ReportTableRow (cyclomatic 34) · ×1
  • ReportTableRow.ReportTableRow (cyclomatic 34) packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx:50 — ReportTableRow.ReportTableRow has cyclomatic complexity 34 (threshold 15). Of this number, 27 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · custom-spreadsheet.createCustomSpreadsheet.<returned closure> (cyclomatic 34) · ×1
  • custom-spreadsheet.createCustomSpreadsheet.<returned closure> (cyclomatic 34) packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts:111 — custom-spreadsheet.createCustomSpreadsheet.<returned closure> has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 238, 230, 250, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useTransactionBatchActions.useTransactionBatchActions.onBatchEdit (cyclomatic 34) · ×1
  • useTransactionBatchActions.useTransactionBatchActions.onBatchEdit (cyclomatic 34) packages/desktop-client/src/hooks/useTransactionBatchActions.ts:82 — useTransactionBatchActions.useTransactionBatchActions.onBatchEdit has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 113, openFieldEditor, pushEditField, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CategoryTemplateContext.runTemplatesForPriority (cyclomatic 34) · ×1
  • CategoryTemplateContext.runTemplatesForPriority (cyclomatic 34) packages/loot-core/src/server/budget/category-template-context.ts:160 — CategoryTemplateContext.runTemplatesForPriority has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImportTransactionsModal.ImportTransactionsModal · ×1
  • ImportTransactionsModal.ImportTransactionsModal::onImport (cyclomatic 33) packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:645 — ImportTransactionsModal.ImportTransactionsModal::onImport has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · table.Table (cyclomatic 33) · ×1
  • table.Table (cyclomatic 33) packages/desktop-client/src/components/table.tsx:970 — table.Table has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 8 of the 33 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 1205, a function literal at line 1072, renderRow, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · BudgetCategories.BudgetCategories (cyclomatic 33) · ×1
  • BudgetCategories.BudgetCategories (cyclomatic 33) packages/desktop-client/src/components/budget/BudgetCategories.tsx:64 — BudgetCategories.BudgetCategories has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 248, a function literal at line 91, a function literal at line 96, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AutomationEditorPane.AutomationEditorPane (cyclomatic 32) · ×1
  • AutomationEditorPane.AutomationEditorPane (cyclomatic 32) packages/desktop-client/src/components/modals/BudgetAutomationsModal/AutomationEditorPane.tsx:106 — AutomationEditorPane.AutomationEditorPane has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 162, 145, 185, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ScheduleEditForm.ScheduleEditForm (cyclomatic 32) · ×1
  • ScheduleEditForm.ScheduleEditForm (cyclomatic 32) packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx:103 — ScheduleEditForm.ScheduleEditForm has cyclomatic complexity 32 (threshold 15). Of this number, 17 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TagAutocomplete.TagAutocomplete (cyclomatic 32) · ×1
  • TagAutocomplete.TagAutocomplete (cyclomatic 32) packages/desktop-client/src/components/autocomplete/TagAutocomplete.tsx:32 — TagAutocomplete.TagAutocomplete has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 5 of the 32 points are its own statements and the rest belongs to 7 function items inside it that branch (handleKeyDown, a function literal at line 55, a function literal at line 82, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MonteCarloPotConfiguration.MonteCarloPotConfiguration (cyclomatic 32) · ×1
  • MonteCarloPotConfiguration.MonteCarloPotConfiguration (cyclomatic 32) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:73 — MonteCarloPotConfiguration.MonteCarloPotConfiguration has cyclomatic complexity 32 (threshold 15). Of this number, 21 points are the body's own statements and 11 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · useSelected.useSelected (cyclomatic 32) · ×1
  • useSelected.useSelected (cyclomatic 32) packages/desktop-client/src/hooks/useSelected.tsx:50 — useSelected.useSelected has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 1 of the 32 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 57, 165, 155, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · rule.friendlyOp (cyclomatic 32) · ×1
  • rule.friendlyOp (cyclomatic 32) packages/desktop-client/src/util/rule.ts:79 — rule.friendlyOp has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · schedule.getRecurringDescription (cyclomatic 32) · ×1
  • schedule.getRecurringDescription (cyclomatic 32) packages/desktop-client/src/util/schedule.ts:49 — schedule.getRecurringDescription has cyclomatic complexity 32 (threshold 15). Of this number, 29 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · enforce-doc-links.remarkEnforceDocLinks.transformer (cyclomatic 32) · ×1
  • enforce-doc-links.remarkEnforceDocLinks.transformer (cyclomatic 32) packages/docs/src/remark/enforce-doc-links.js:139 — enforce-doc-links.remarkEnforceDocLinks.transformer has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 12 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 161). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index._applyMessages (cyclomatic 32) · ×1
  • index._applyMessages (cyclomatic 32) packages/loot-core/src/server/sync/index.ts:402 — index._applyMessages has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (applyInTransaction, a function literal at line 452, a function literal at line 463, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ThemeInstaller.ThemeInstaller (cyclomatic 31) · ×1
  • ThemeInstaller.ThemeInstaller (cyclomatic 31) packages/desktop-client/src/components/settings/ThemeInstaller.tsx:46 — ThemeInstaller.ThemeInstaller has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 5 of the 31 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 284, 96, 171, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AccountSelector.AccountSelector (cyclomatic 30) · ×1
  • AccountSelector.AccountSelector (cyclomatic 30) packages/desktop-client/src/components/reports/AccountSelector.tsx:25 — AccountSelector.AccountSelector has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 14 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · showActivity.showActivity (cyclomatic 30) · ×1
  • showActivity.showActivity (cyclomatic 30) packages/desktop-client/src/components/reports/graphs/showActivity.ts:35 — showActivity.showActivity has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · compiler.castInput (cyclomatic 30) · ×1
  • compiler.castInput (cyclomatic 30) packages/loot-core/src/server/aql/compiler.ts:246 — compiler.castInput has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · template-notes.templateToLine (cyclomatic 30) · ×1
  • template-notes.templateToLine (cyclomatic 30) packages/loot-core/src/server/budget/template-notes.ts:169 — template-notes.templateToLine has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ynab5.importCategories (cyclomatic 30) · ×1
  • ynab5.importCategories (cyclomatic 30) packages/loot-core/src/server/importers/ynab5.ts:294 — ynab5.importCategories has cyclomatic complexity 30 (threshold 15). Of this number, 16 points are the body's own statements and 14 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.advanceSchedulesService (cyclomatic 30) · ×1
  • app.advanceSchedulesService (cyclomatic 30) packages/loot-core/src/server/schedules/app.ts:672 — app.advanceSchedulesService has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Account.Account (cyclomatic 29) · ×1
  • Account.Account (cyclomatic 29) packages/desktop-client/src/components/sidebar/Account.tsx:71 — Account.Account has cyclomatic complexity 29 (threshold 15). Of this number, 25 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EnableBankingExternalMsgModal.EnableBankingExternalMsgModal (cyclomatic 29) · ×1
  • EnableBankingExternalMsgModal.EnableBankingExternalMsgModal (cyclomatic 29) packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:126 — EnableBankingExternalMsgModal.EnableBankingExternalMsgModal has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 407, onJump, renderLinkButton, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Header.AccountHeader (cyclomatic 29) · ×1
  • Header.AccountHeader (cyclomatic 29) packages/desktop-client/src/components/accounts/Header.tsx:131 — Header.AccountHeader has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionList.SelectedTransactionsFloatingActionBar (cyclomatic 29) · ×1
  • TransactionList.SelectedTransactionsFloatingActionBar (cyclomatic 29) packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx:285 — TransactionList.SelectedTransactionsFloatingActionBar has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 496, 607, 368, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PayeeTableRow.PayeeTableRow (cyclomatic 29) · ×1
  • PayeeTableRow.PayeeTableRow (cyclomatic 29) packages/desktop-client/src/components/payees/PayeeTableRow.tsx:92 — PayeeTableRow.PayeeTableRow has cyclomatic complexity 29 (threshold 15). Of this number, 20 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · handlebars-helpers.registerHandlebarsHelpers (cyclomatic 29) · ×1
  • handlebars-helpers.registerHandlebarsHelpers (cyclomatic 29) packages/loot-core/src/server/rules/handlebars-helpers.ts:14 — handlebars-helpers.registerHandlebarsHelpers has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 28, 81, 82, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Sankey.SankeyInner (cyclomatic 28) · ×1
  • Sankey.SankeyInner (cyclomatic 28) packages/desktop-client/src/components/reports/reports/Sankey.tsx:440 — Sankey.SankeyInner has cyclomatic complexity 28 (threshold 15). Of this number, 16 points are the body's own statements and 12 belong to 9 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ConfigServer.ConfigServer (cyclomatic 28) · ×1
  • ConfigServer.ConfigServer (cyclomatic 28) packages/desktop-client/src/components/manager/ConfigServer.tsx:284 — ConfigServer.ConfigServer has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AutomationListRow.AutomationListRow (cyclomatic 28) · ×1
  • AutomationListRow.AutomationListRow (cyclomatic 28) packages/desktop-client/src/components/modals/BudgetAutomationsModal/AutomationListRow.tsx:31 — AutomationListRow.AutomationListRow has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · QueryManager.QueryItem (cyclomatic 28) · ×1
  • QueryManager.QueryItem (cyclomatic 28) packages/desktop-client/src/components/formula/QueryManager.tsx:289 — QueryManager.QueryItem has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 12 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (handleImport, a function literal at line 333, a function literal at line 425, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · AreaGraph.AreaGraph (cyclomatic 28) · ×1
  • AreaGraph.AreaGraph (cyclomatic 28) packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:203 — AreaGraph.AreaGraph has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 269, gradientOffset, a function literal at line 366, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · openid.loginWithOpenIdFinalize (cyclomatic 28) · ×1
  • openid.loginWithOpenIdFinalize (cyclomatic 28) packages/sync-server/src/accounts/openid.ts:185 — openid.loginWithOpenIdFinalize has cyclomatic complexity 28 (threshold 15). Of this number, 17 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createOnce.Program · ×1
  • createOnce.Program:exit (cyclomatic 28) packages/eslint-plugin-actual/lib/rules/prefer-const.js:265 — createOnce.Program:exit has cyclomatic complexity 28 (threshold 15). Of this number, 15 points are the body's own statements and 13 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CalculatorAmountInput.CalculatorAmountInput (cyclomatic 27) · ×1
  • CalculatorAmountInput.CalculatorAmountInput (cyclomatic 27) packages/desktop-client/src/components/mobile/transactions/CalculatorAmountInput.tsx:68 — CalculatorAmountInput.CalculatorAmountInput has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 9 of the 27 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 159, a function literal at line 118, valueIsNegative, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Notifications.Notification (cyclomatic 27) · ×1
  • Notifications.Notification (cyclomatic 27) packages/desktop-client/src/components/Notifications.tsx:91 — Notifications.Notification has cyclomatic complexity 27 (threshold 15). Of this number, 19 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Value.Value · ×1
  • Value.Value::formatValue (cyclomatic 27) packages/desktop-client/src/components/rules/Value.tsx:91 — Value.Value::formatValue has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BudgetTable.BudgetTable (cyclomatic 27) · ×1
  • BudgetTable.BudgetTable (cyclomatic 27) packages/desktop-client/src/components/budget/BudgetTable.tsx:61 — BudgetTable.BudgetTable has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (moveVertically, _onReorderCategory, onKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · FiltersMenu.FilterButton (cyclomatic 27) · ×1
  • FiltersMenu.FilterButton (cyclomatic 27) packages/desktop-client/src/components/filters/FiltersMenu.tsx:603 — FiltersMenu.FilterButton has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 5 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (onValidateAndApply, a function literal at line 786, a function literal at line 629, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · NetWorthGraph.NetWorthGraph (cyclomatic 27) · ×1
  • NetWorthGraph.NetWorthGraph (cyclomatic 27) packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx:245 — NetWorthGraph.NetWorthGraph has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 353, gradientOffset, a function literal at line 297, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> (cyclomatic 27) · ×1
  • budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> (cyclomatic 27) packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts:185 — budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 8 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 241, 226, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · spending-spreadsheet.createSpendingSpreadsheet.<returned closure> (cyclomatic 27) · ×1
  • spending-spreadsheet.createSpendingSpreadsheet.<returned closure> (cyclomatic 27) packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts:96 — spending-spreadsheet.createSpendingSpreadsheet.<returned closure> has cyclomatic complexity 27 (threshold 15). Of this number, 14 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AmountInput.AmountInput (cyclomatic 27) · ×1
  • AmountInput.AmountInput (cyclomatic 27) packages/desktop-client/src/components/util/AmountInput.tsx:46 — AmountInput.AmountInput has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 66, a function literal at line 108, onSwitch, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useDragDrop.useDrop (cyclomatic 27) · ×1
  • useDragDrop.useDrop (cyclomatic 27) packages/desktop-client/src/hooks/useDragDrop.tsx:289 — useDragDrop.useDrop has cyclomatic complexity 27 (threshold 15). Of this number, 17 points are the body's own statements and 10 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FocusableAmountInput.AmountInput (cyclomatic 26) · ×1
  • FocusableAmountInput.AmountInput (cyclomatic 26) packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:48 — FocusableAmountInput.AmountInput has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 87, onKeyUp, applyText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · formulaBadgeRanges.visitAstInSourceOrder (cyclomatic 26) · ×1
  • formulaBadgeRanges.visitAstInSourceOrder (cyclomatic 26) packages/desktop-client/src/components/formula/formulaBadgeRanges.ts:224 — formulaBadgeRanges.visitAstInSourceOrder has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MonteCarloConfiguration.MonteCarloConfiguration (cyclomatic 26) · ×1
  • MonteCarloConfiguration.MonteCarloConfiguration (cyclomatic 26) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx:73 — MonteCarloConfiguration.MonteCarloConfiguration has cyclomatic complexity 26 (threshold 15). Of this number, 17 points are the body's own statements and 9 belong to 5 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · global-events.handleGlobalEvents (cyclomatic 26) · ×1
  • global-events.handleGlobalEvents (cyclomatic 26) packages/desktop-client/src/global-events.ts:28 — global-events.handleGlobalEvents has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 7 function literals inside it that branch (lines 59, 120, 256, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useFormat.useFormat (cyclomatic 26) · ×1
  • useFormat.useFormat (cyclomatic 26) packages/desktop-client/src/hooks/useFormat.ts:105 — useFormat.useFormat has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 162, 235, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.batchUpdateTransactions (cyclomatic 26) · ×1
  • index.batchUpdateTransactions (cyclomatic 26) packages/loot-core/src/server/transactions/index.ts:40 — index.batchUpdateTransactions has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body's own statements and 8 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Themes.ThemeSettings (cyclomatic 25) · ×1
  • Themes.ThemeSettings (cyclomatic 25) packages/desktop-client/src/components/settings/Themes.tsx:41 — Themes.ThemeSettings has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 118, 164, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · updateFilterReducer.updateFilterReducer (cyclomatic 25) · ×1
  • updateFilterReducer.updateFilterReducer (cyclomatic 25) packages/desktop-client/src/components/filters/updateFilterReducer.ts:4 — updateFilterReducer.updateFilterReducer has cyclomatic complexity 25 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useScheduleEdit.createScheduleEditReducer.<returned closure> (cyclomatic 25) · ×1
  • useScheduleEdit.createScheduleEditReducer.<returned closure> (cyclomatic 25) packages/desktop-client/src/hooks/useScheduleEdit.ts:90 — useScheduleEdit.createScheduleEditReducer.<returned closure> has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useScrollListener.ScrollProvider (cyclomatic 25) · ×1
  • useScrollListener.ScrollProvider (cyclomatic 25) packages/desktop-client/src/hooks/useScrollListener.tsx:41 — useScrollListener.ScrollProvider has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 100, 58, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · app-cors-proxy.app.use("/") (cyclomatic 25) · ×1
  • app-cors-proxy.app.use("/") (cyclomatic 25) REDACTED:124 — app-cors-proxy.app.use("/") has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 25) · ×1
  • (anonymous) (cyclomatic 25) REDACTED:124 — (anonymous) has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · query.buildQueryFromFlags (cyclomatic 24) · ×1
  • query.buildQueryFromFlags (cyclomatic 24) packages/cli/src/commands/query.ts:144 — query.buildQueryFromFlags has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SchedulesTable.SchedulesTable (cyclomatic 24) · ×1
  • SchedulesTable.SchedulesTable (cyclomatic 24) packages/desktop-client/src/components/schedules/SchedulesTable.tsx:294 — SchedulesTable.SchedulesTable has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 325, a function literal at line 352, a function literal at line 319, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · useFormulaExecution.fetchBudgetDimensionValueDirect (cyclomatic 24) · ×1
  • useFormulaExecution.fetchBudgetDimensionValueDirect (cyclomatic 24) packages/desktop-client/src/hooks/useFormulaExecution.ts:631 — useFormulaExecution.fetchBudgetDimensionValueDirect has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · index._fullSync (cyclomatic 24) · ×1
  • index._fullSync (cyclomatic 24) packages/loot-core/src/server/sync/index.ts:965 — index._fullSync has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BudgetAnalysis.BudgetAnalysisInternal (cyclomatic 23) · ×1
  • BudgetAnalysis.BudgetAnalysisInternal (cyclomatic 23) packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:145 — BudgetAnalysis.BudgetAnalysisInternal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 203, onExportCsv, onSaveWidgetName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · NetWorth.NetWorthInner (cyclomatic 23) · ×1
  • NetWorth.NetWorthInner (cyclomatic 23) packages/desktop-client/src/components/reports/reports/NetWorth.tsx:69 — NetWorth.NetWorthInner has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 159, onSaveWidgetName, a function literal at line 76, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · LoggedInUser.LoggedInUser · ×1
  • LoggedInUser.LoggedInUser::getMenuItems (cyclomatic 23) packages/desktop-client/src/components/LoggedInUser.tsx:174 — LoggedInUser.LoggedInUser::getMenuItems has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · BudgetFileSelection.BudgetFileSelection (cyclomatic 23) · ×1
  • BudgetFileSelection.BudgetFileSelection (cyclomatic 23) packages/desktop-client/src/components/manager/BudgetFileSelection.tsx:535 — BudgetFileSelection.BudgetFileSelection has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 7 function items inside it that branch (onSelect, a function literal at line 556, a function literal at line 652, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · EditFieldModal.EditFieldModal (cyclomatic 23) · ×1
  • EditFieldModal.EditFieldModal (cyclomatic 23) packages/desktop-client/src/components/modals/EditFieldModal.tsx:51 — EditFieldModal.EditFieldModal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 10 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (onSelect, a function literal at line 218, a function literal at line 131, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DuplicateFileModal.DuplicateFileModal (cyclomatic 23) · ×1
  • DuplicateFileModal.DuplicateFileModal (cyclomatic 23) packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx:30 — DuplicateFileModal.DuplicateFileModal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 118, handleDuplicate, validateAndSetName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ScheduleEditModal.ScheduleEditModal (cyclomatic 23) · ×1
  • ScheduleEditModal.ScheduleEditModal (cyclomatic 23) packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx:32 — ScheduleEditModal.ScheduleEditModal has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 7 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (onSave, a function literal at line 41, a function literal at line 218, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · codeMirror-excelLanguage.excelFormulaAutocomplete (cyclomatic 23) · ×1
  • codeMirror-excelLanguage.excelFormulaAutocomplete (cyclomatic 23) packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:599 — codeMirror-excelLanguage.excelFormulaAutocomplete has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 5 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 635). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · BarGraph.BarGraph (cyclomatic 23) · ×1
  • BarGraph.BarGraph (cyclomatic 23) packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:221 — BarGraph.BarGraph has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 6 of the 23 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 271, a function literal at line 333, getVal, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · path-join.normalizeStringPosix (cyclomatic 23) · ×1
  • path-join.normalizeStringPosix (cyclomatic 23) packages/loot-core/src/platform/server/fs/path-join.ts:6 — path-join.normalizeStringPosix has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schedule-template.createScheduleList (cyclomatic 23) · ×1
  • schedule-template.createScheduleList (cyclomatic 23) packages/loot-core/src/server/budget/schedule-template.ts:41 — schedule-template.createScheduleList has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgeOfMoney.AgeOfMoneyInner (cyclomatic 22) · ×1
  • AgeOfMoney.AgeOfMoneyInner (cyclomatic 22) packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx:69 — AgeOfMoney.AgeOfMoneyInner has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CalendarCard.CalendarCard (cyclomatic 22) · ×1
  • CalendarCard.CalendarCard (cyclomatic 22) packages/desktop-client/src/components/reports/reports/CalendarCard.tsx:54 — CalendarCard.CalendarCard has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 8 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AccountRow.AccountRow (cyclomatic 22) · ×1
  • AccountRow.AccountRow (cyclomatic 22) packages/desktop-client/src/components/sidebar/redesign/AccountRow.tsx:39 — AccountRow.AccountRow has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · common.useBootstrapped (cyclomatic 22) · ×1
  • common.useBootstrapped (cyclomatic 22) packages/desktop-client/src/components/manager/subscribe/common.tsx:28 — common.useBootstrapped has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 40, 41). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CloseAccountModal.CloseAccountModal (cyclomatic 22) · ×1
  • CloseAccountModal.CloseAccountModal (cyclomatic 22) packages/desktop-client/src/components/modals/CloseAccountModal.tsx:47 — CloseAccountModal.CloseAccountModal has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (submit, a function literal at line 180, a function literal at line 258, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · reducer.changeType (cyclomatic 22) · ×1
  • reducer.changeType (cyclomatic 22) packages/desktop-client/src/components/budget/goals/reducer.ts:103 — reducer.changeType has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SidebarGroup.SidebarGroup (cyclomatic 22) · ×1
  • SidebarGroup.SidebarGroup (cyclomatic 22) packages/desktop-client/src/components/budget/SidebarGroup.tsx:48 — SidebarGroup.SidebarGroup has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CleanupGroupPicker.CleanupGroupPicker (cyclomatic 22) · ×1
  • CleanupGroupPicker.CleanupGroupPicker (cyclomatic 22) packages/desktop-client/src/components/budget/goals/editor/CleanupGroupPicker.tsx:19 — CleanupGroupPicker.CleanupGroupPicker has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 119, a function literal at line 86, a function literal at line 47, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · formulaBadgeRanges.getStringContextBadgeRangesFromAst (cyclomatic 22) · ×1
  • formulaBadgeRanges.getStringContextBadgeRangesFromAst (cyclomatic 22) packages/desktop-client/src/components/formula/formulaBadgeRanges.ts:368 — formulaBadgeRanges.getStringContextBadgeRangesFromAst has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 383, 454, 435). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AccountTransactions.TransactionListWithPreviews (cyclomatic 22) · ×1
  • AccountTransactions.TransactionListWithPreviews (cyclomatic 22) packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx:63 — AccountTransactions.TransactionListWithPreviews has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ChooseGraph.ChooseGraph (cyclomatic 22) · ×1
  • ChooseGraph.ChooseGraph (cyclomatic 22) packages/desktop-client/src/components/reports/ChooseGraph.tsx:38 — ChooseGraph.ChooseGraph has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SpendingGraph.SpendingGraph (cyclomatic 22) · ×1
  • SpendingGraph.SpendingGraph (cyclomatic 22) packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx:157 — SpendingGraph.SpendingGraph has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 231, gradientOffset, getVal, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · net-worth-spreadsheet.createSpreadsheet.<returned closure> (cyclomatic 22) · ×1
  • net-worth-spreadsheet.createSpreadsheet.<returned closure> (cyclomatic 22) packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts:56 — net-worth-spreadsheet.createSpreadsheet.<returned closure> has cyclomatic complexity 22 (threshold 15). Of this number, 14 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sankey-spreadsheet.sortGraph (cyclomatic 22) · ×1
  • sankey-spreadsheet.sortGraph (cyclomatic 22) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1362 — sankey-spreadsheet.sortGraph has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1375, 1466, 1386, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · compiler.compileOp (cyclomatic 22) · ×1
  • compiler.compileOp (cyclomatic 22) packages/loot-core/src/server/aql/compiler.ts:647 — compiler.compileOp has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · merge.mergeTransactionsNoTransfer (cyclomatic 22) · ×1
  • merge.mergeTransactionsNoTransfer (cyclomatic 22) packages/loot-core/src/server/transactions/merge.ts:110 — merge.mergeTransactionsNoTransfer has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · customThemes.splitDeclarations (cyclomatic 21) · ×1
  • customThemes.splitDeclarations (cyclomatic 21) packages/desktop-client/src/style/customThemes.ts:307 — customThemes.splitDeclarations has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Titlebar.ServerSyncButton (cyclomatic 21) · ×1
  • Titlebar.ServerSyncButton (cyclomatic 21) packages/desktop-client/src/components/Titlebar.tsx:127 — Titlebar.ServerSyncButton has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GoCardlessExternalMsgModal.GoCardlessExternalMsgModal (cyclomatic 21) · ×1
  • GoCardlessExternalMsgModal.GoCardlessExternalMsgModal (cyclomatic 21) packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx:106 — GoCardlessExternalMsgModal.GoCardlessExternalMsgModal has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 305, renderLinkButton, onJump). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · CategoryAutomationButton.CategoryAutomationButton (cyclomatic 21) · ×1
  • CategoryAutomationButton.CategoryAutomationButton (cyclomatic 21) packages/desktop-client/src/components/budget/goals/CategoryAutomationButton.tsx:74 — CategoryAutomationButton.CategoryAutomationButton has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · budgetDataQuery.filterCategoriesByConditions · ×1
  • budgetDataQuery.filterCategoriesByConditions::evaluateCondition (cyclomatic 21) REDACTED:114 — budgetDataQuery.filterCategoriesByConditions::evaluateCondition has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sankey-spreadsheet.getLayersByStronglyConnectedComponents (cyclomatic 21) · ×1
  • sankey-spreadsheet.getLayersByStronglyConnectedComponents (cyclomatic 21) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1049 — sankey-spreadsheet.getLayersByStronglyConnectedComponents has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 2 function items inside it that branch (strongConnect, resolveComponentLayer). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · util.calculateHasWarning (cyclomatic 21) · ×1
  • util.calculateHasWarning (cyclomatic 21) packages/desktop-client/src/components/reports/util.ts:47 — util.calculateHasWarning has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkerBridge._onSharedMessage (cyclomatic 21) · ×1
  • WorkerBridge._onSharedMessage (cyclomatic 21) packages/loot-core/src/platform/client/browser-preload/worker-bridge.ts:178 — WorkerBridge._onSharedMessage has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · app._loadBudget (cyclomatic 21) · ×1
  • app._loadBudget (cyclomatic 21) REDACTED:624 — app._loadBudget has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.loadGlobalPrefs (cyclomatic 21) · ×1
  • app.loadGlobalPrefs (cyclomatic 21) packages/loot-core/src/server/preferences/app.ts:151 — app.loadGlobalPrefs has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Action.executeFormulaSync (cyclomatic 21) · ×1
  • Action.executeFormulaSync (cyclomatic 21) packages/loot-core/src/server/rules/action.ts:308 — Action.executeFormulaSync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qif2json.qif2json (cyclomatic 21) · ×1
  • qif2json.qif2json (cyclomatic 21) packages/loot-core/src/server/transactions/import/qif2json.ts:22 — qif2json.qif2json has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · xmlcamt2json.xmlCAMT2json (cyclomatic 21) · ×1
  • xmlcamt2json.xmlCAMT2json (cyclomatic 21) packages/loot-core/src/server/transactions/import/xmlcamt2json.ts:120 — xmlcamt2json.xmlCAMT2json has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app-sync.app.post("/upload-user-file") (cyclomatic 21) · ×1
  • app-sync.app.post("/upload-user-file") (cyclomatic 21) REDACTED:327 — app-sync.app.post("/upload-user-file") has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 21) · ×1
  • (anonymous) (cyclomatic 21) REDACTED:142 — (anonymous) has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · customThemes.embedThemeFonts (cyclomatic 20) · ×1
  • customThemes.embedThemeFonts (cyclomatic 20) packages/desktop-client/src/style/customThemes.ts:524 — customThemes.embedThemeFonts has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Modal.Modal (cyclomatic 20) · ×1
  • Modal.Modal (cyclomatic 20) packages/desktop-client/src/components/common/Modal.tsx:106 — Modal.Modal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 227, handleOnClose, a function literal at line 140, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ApiKeyModal.ApiKeyModal (cyclomatic 20) · ×1
  • ApiKeyModal.ApiKeyModal (cyclomatic 20) packages/desktop-client/src/components/modals/ApiKeyModal.tsx:17 — ApiKeyModal.ApiKeyModal has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 58, submit, a function literal at line 69). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · BuiltInProviders.BuiltInProviders (cyclomatic 20) · ×1
  • BuiltInProviders.BuiltInProviders (cyclomatic 20) packages/desktop-client/src/components/banksync/BuiltInProviders.tsx:32 — BuiltInProviders.BuiltInProviders has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 127, 220). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TrackingBudgetComponents.CategoryMonth (cyclomatic 20) · ×1
  • TrackingBudgetComponents.CategoryMonth (cyclomatic 20) packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx:196 — TrackingBudgetComponents.CategoryMonth has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · sankey-spreadsheet.addHiddenNodes (cyclomatic 20) · ×1
  • sankey-spreadsheet.addHiddenNodes (cyclomatic 20) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1663 — sankey-spreadsheet.addHiddenNodes has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · replay.replayPendingMessages (cyclomatic 20) · ×1
  • replay.replayPendingMessages (cyclomatic 20) packages/loot-core/src/server/sync/replay.ts:52 — replay.replayPendingMessages has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (replay::applyOne, replay, replay::processPass). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · rule-utils.iterateIds (cyclomatic 20) · ×1
  • rule-utils.iterateIds (cyclomatic 20) packages/loot-core/src/server/rules/rule-utils.ts:163 — rule-utils.iterateIds has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · schema-diff.findAdditiveViolations (cyclomatic 20) · ×1
  • schema-diff.findAdditiveViolations (cyclomatic 20) packages/loot-core/src/server/migrate/schema-diff.ts:165 — schema-diff.findAdditiveViolations has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · account-db.bootstrap (cyclomatic 20) · ×1
  • account-db.bootstrap (cyclomatic 20) packages/sync-server/src/account-db.js:86 — account-db.bootstrap has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · createOnce.isJSXContent (cyclomatic 20) · ×1
  • createOnce.isJSXContent (cyclomatic 20) packages/eslint-plugin-actual/lib/rules/prefer-trans-over-t.js:31 — createOnce.isJSXContent has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mutations.useSyncAccountsMutation (cyclomatic 19) · ×1
  • mutations.useSyncAccountsMutation (cyclomatic 19) packages/desktop-client/src/accounts/mutations.ts:596 — mutations.useSyncAccountsMutation has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 605, 626, 637, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · FatalError.FatalError (cyclomatic 19) · ×1
  • FatalError.FatalError (cyclomatic 19) packages/desktop-client/src/components/FatalError.tsx:330 — FatalError.FatalError has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Formula.FormulaInner (cyclomatic 19) · ×1
  • Formula.FormulaInner (cyclomatic 19) packages/desktop-client/src/components/reports/reports/Formula.tsx:56 — Formula.FormulaInner has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · accountTreeMoves.computeAccountMove (cyclomatic 19) · ×1
  • accountTreeMoves.computeAccountMove (cyclomatic 19) packages/desktop-client/src/components/sidebar/redesign/accountTreeMoves.ts:23 — accountTreeMoves.computeAccountMove has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Login.OpenIdLogin (cyclomatic 19) · ×1
  • Login.OpenIdLogin (cyclomatic 19) packages/desktop-client/src/components/manager/subscribe/Login.tsx:111 — Login.OpenIdLogin has cyclomatic complexity 19 (threshold 15). Of this number, 13 points are the body's own statements and 6 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Login.Login (cyclomatic 19) · ×1
  • Login.Login (cyclomatic 19) packages/desktop-client/src/components/manager/subscribe/Login.tsx:316 — Login.Login has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 3 function items inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BudgetAutomationsModal.BudgetAutomationsModal (cyclomatic 19) · ×1
  • BudgetAutomationsModal.BudgetAutomationsModal (cyclomatic 19) packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsModal.tsx:26 — BudgetAutomationsModal.BudgetAutomationsModal has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardShortcutModal.KeyboardShortcutModal (cyclomatic 19) · ×1
  • KeyboardShortcutModal.KeyboardShortcutModal (cyclomatic 19) packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx:148 — KeyboardShortcutModal.KeyboardShortcutModal has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 488, 443, 532, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RuleRow.RuleRow (cyclomatic 19) · ×1
  • RuleRow.RuleRow (cyclomatic 19) packages/desktop-client/src/components/rules/RuleRow.tsx:35 — RuleRow.RuleRow has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BalanceHistoryGraph.BalanceHistoryGraph (cyclomatic 19) · ×1
  • BalanceHistoryGraph.BalanceHistoryGraph (cyclomatic 19) packages/desktop-client/src/components/accounts/BalanceHistoryGraph.tsx:30 — BalanceHistoryGraph.BalanceHistoryGraph has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 206, 51, 126, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PayeeAutocomplete.PayeeList (cyclomatic 19) · ×1
  • PayeeAutocomplete.PayeeList (cyclomatic 19) packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:171 — PayeeAutocomplete.PayeeList has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 193, 190, 273, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · donutColors.parseColor (cyclomatic 19) · ×1
  • donutColors.parseColor (cyclomatic 19) packages/desktop-client/src/components/reports/graphs/donutColors.ts:22 — donutColors.parseColor has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SaveReport.SaveReport (cyclomatic 19) · ×1
  • SaveReport.SaveReport (cyclomatic 19) packages/desktop-client/src/components/reports/SaveReport.tsx:77 — SaveReport.SaveReport has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 6 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (onMenuSelect, onAddUpdate, onApply, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MonteCarloRunDetailTable.MonteCarloRunDetailTable (cyclomatic 19) · ×1
  • MonteCarloRunDetailTable.MonteCarloRunDetailTable (cyclomatic 19) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:76 — MonteCarloRunDetailTable.MonteCarloRunDetailTable has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · TagRow.TagRow (cyclomatic 19) · ×1
  • TagRow.TagRow (cyclomatic 19) packages/desktop-client/src/components/tags/TagRow.tsx:40 — TagRow.TagRow has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TransactionsTable.TransactionTableInner · ×1
  • TransactionsTable.TransactionTableInner::renderRow (cyclomatic 19) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:2808 — TransactionsTable.TransactionTableInner::renderRow has cyclomatic complexity 19 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · error.getDownloadError (cyclomatic 19) · ×1
  • error.getDownloadError (cyclomatic 19) packages/desktop-client/src/util/error.ts:98 — error.getDownloadError has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · schema-helpers.convertInputType (cyclomatic 19) · ×1
  • schema-helpers.convertInputType (cyclomatic 19) packages/loot-core/src/server/aql/schema-helpers.ts:11 — schema-helpers.convertInputType has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · template-notes.getCategoriesWithTemplates (cyclomatic 19) · ×1
  • template-notes.getCategoriesWithTemplates (cyclomatic 19) packages/loot-core/src/server/budget/template-notes.ts:72 — template-notes.getCategoriesWithTemplates has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 89, 78). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · errors.getDownloadError (cyclomatic 19) · ×1
  • errors.getDownloadError (cyclomatic 19) packages/loot-core/src/shared/errors.ts:90 — errors.getDownloadError has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CashFlow.CashFlowInner (cyclomatic 18) · ×1
  • CashFlow.CashFlowInner (cyclomatic 18) packages/desktop-client/src/components/reports/reports/CashFlow.tsx:70 — CashFlow.CashFlowInner has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AllAccountTransactions.TransactionListWithPreviews (cyclomatic 18) · ×1
  • AllAccountTransactions.TransactionListWithPreviews (cyclomatic 18) packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx:44 — AllAccountTransactions.TransactionListWithPreviews has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MobileRuleEditPage.MobileRuleEditPage (cyclomatic 18) · ×1
  • MobileRuleEditPage.MobileRuleEditPage (cyclomatic 18) packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx:22 — MobileRuleEditPage.MobileRuleEditPage has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 6 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LineGraph.LineGraph (cyclomatic 18) · ×1
  • LineGraph.LineGraph (cyclomatic 18) packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:159 — LineGraph.LineGraph has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 220, 184, 277, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MonteCarloRunDetailTable.MonteCarloRunDetailTable · ×1
  • MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence (cyclomatic 18) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:331 — MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MonteCarloRunDetailTable.MonteCarloRunDetailTable) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · calendar-spreadsheet.recalculate.getDaysArray (cyclomatic 18) · ×1
  • calendar-spreadsheet.recalculate.getDaysArray (cyclomatic 18) packages/desktop-client/src/components/reports/spreadsheets/calendar-spreadsheet.ts:173 — calendar-spreadsheet.recalculate.getDaysArray has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · sankey-spreadsheet.filterCategoryGroups · ×1
  • sankey-spreadsheet.filterCategoryGroups::matchesStringCondition (cyclomatic 18) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:443 — sankey-spreadsheet.filterCategoryGroups::matchesStringCondition has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · summary-spreadsheet.summarySpreadsheet.<returned closure> (cyclomatic 18) · ×1
  • summary-spreadsheet.summarySpreadsheet.<returned closure> (cyclomatic 18) packages/desktop-client/src/components/reports/spreadsheets/summary-spreadsheet.ts:22 — summary-spreadsheet.summarySpreadsheet.<returned closure> has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · TagCreationRow.TagCreationRow (cyclomatic 18) · ×1
  • TagCreationRow.TagCreationRow (cyclomatic 18) packages/desktop-client/src/components/tags/TagCreationRow.tsx:23 — TagCreationRow.TagCreationRow has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · useTransactionRowContextActions.useTransactionRowContextActions (cyclomatic 18) · ×1
  • useTransactionRowContextActions.useTransactionRowContextActions (cyclomatic 18) packages/desktop-client/src/components/transactions/useTransactionRowContextActions.ts:36 — useTransactionRowContextActions.useTransactionRowContextActions has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 121, onViewSchedule, a function literal at line 52, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · schedule-actions.createSingleTimeScheduleFromTransaction (cyclomatic 18) · ×1
  • schedule-actions.createSingleTimeScheduleFromTransaction (cyclomatic 18) packages/desktop-client/src/util/schedule-actions.ts:32 — schedule-actions.createSingleTimeScheduleFromTransaction has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cleanup-template.applyGroupCleanups (cyclomatic 18) · ×1
  • cleanup-template.applyGroupCleanups (cyclomatic 18) packages/loot-core/src/server/budget/cleanup-template.ts:19 — cleanup-template.applyGroupCleanups has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ynab4.importTransactions (cyclomatic 18) · ×1
  • ynab4.importTransactions (cyclomatic 18) packages/loot-core/src/server/importers/ynab4.ts:141 — ynab4.importTransactions has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 192, getCategory, a function literal at line 199, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · app.saveGlobalPrefs (cyclomatic 18) · ×1
  • app.saveGlobalPrefs (cyclomatic 18) packages/loot-core/src/server/preferences/app.ts:79 — app.saveGlobalPrefs has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · enablebanking-service.normalizeTransaction (cyclomatic 18) · ×1
  • enablebanking-service.normalizeTransaction (cyclomatic 18) packages/sync-server/src/app-enablebanking/services/enablebanking-service.ts:279 — enablebanking-service.normalizeTransaction has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · errors.handleEnableBankingError (cyclomatic 18) · ×1
  • errors.handleEnableBankingError (cyclomatic 18) packages/sync-server/src/app-enablebanking/utils/errors.ts:19 — errors.handleEnableBankingError has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · bundle-stats-comment.parseMapping (cyclomatic 17) · ×1
  • bundle-stats-comment.parseMapping (cyclomatic 17) packages/ci-actions/bin/bundle-stats-comment.mjs:63 — bundle-stats-comment.parseMapping has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SpendingCard.SpendingCard (cyclomatic 17) · ×1
  • SpendingCard.SpendingCard (cyclomatic 17) packages/desktop-client/src/components/reports/reports/SpendingCard.tsx:35 — SpendingCard.SpendingCard has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CategoryGroupMenuModal.CategoryGroupMenuModal (cyclomatic 17) · ×1
  • CategoryGroupMenuModal.CategoryGroupMenuModal (cyclomatic 17) packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx:22 — CategoryGroupMenuModal.CategoryGroupMenuModal has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 77, 61). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TransferOwnership.TransferOwnership (cyclomatic 17) · ×1
  • TransferOwnership.TransferOwnership (cyclomatic 17) packages/desktop-client/src/components/modals/TransferOwnership.tsx:31 — TransferOwnership.TransferOwnership has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 102, onSave, a function literal at line 43, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · table.CellButton (cyclomatic 17) · ×1
  • table.CellButton (cyclomatic 17) packages/desktop-client/src/components/table.tsx:540 — table.CellButton has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CategoryAutocomplete.CategoryItem (cyclomatic 17) · ×1
  • CategoryAutocomplete.CategoryItem (cyclomatic 17) packages/desktop-client/src/components/autocomplete/CategoryAutocomplete.tsx:346 — CategoryAutocomplete.CategoryItem has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SidebarCategory.SidebarCategory (cyclomatic 17) · ×1
  • SidebarCategory.SidebarCategory (cyclomatic 17) packages/desktop-client/src/components/budget/SidebarCategory.tsx:46 — SidebarCategory.SidebarCategory has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ActionableGridListItem.ActionableGridListItem (cyclomatic 17) · ×1
  • ActionableGridListItem.ActionableGridListItem (cyclomatic 17) packages/desktop-client/src/components/mobile/ActionableGridListItem.tsx:22 — ActionableGridListItem.ActionableGridListItem has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 49, handleAction). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MobileScheduleEditPage.MobileScheduleEditPage (cyclomatic 17) · ×1
  • MobileScheduleEditPage.MobileScheduleEditPage (cyclomatic 17) packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:29 — MobileScheduleEditPage.MobileScheduleEditPage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (onSave). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MobileSchedulesPage.MobileSchedulesPage (cyclomatic 17) · ×1
  • MobileSchedulesPage.MobileSchedulesPage (cyclomatic 17) packages/desktop-client/src/components/mobile/schedules/MobileSchedulesPage.tsx:30 — MobileSchedulesPage.MobileSchedulesPage has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 57, filterIncludes, a function literal at line 98). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Header.Header (cyclomatic 17) · ×1
  • Header.Header (cyclomatic 17) packages/desktop-client/src/components/reports/Header.tsx:75 — Header.Header has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · reportCategoryLists.reportCategoryLists (cyclomatic 17) · ×1
  • reportCategoryLists.reportCategoryLists (cyclomatic 17) packages/desktop-client/src/components/reports/spreadsheets/reportCategoryLists.ts:9 — reportCategoryLists.reportCategoryLists has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (isEligible, a function literal at line 41, a function literal at line 64). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · net-worth-spreadsheet.recalculate.graphData (cyclomatic 17) · ×1
  • net-worth-spreadsheet.recalculate.graphData (cyclomatic 17) packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts:418 — net-worth-spreadsheet.recalculate.graphData has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RuleEditor.ConditionEditor (cyclomatic 17) · ×1
  • RuleEditor.ConditionEditor (cyclomatic 17) packages/desktop-client/src/components/rules/RuleEditor.tsx:296 — RuleEditor.ConditionEditor has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DateSelect.DateSelectDesktop · ×1
  • DateSelect.DateSelectDesktop::onKeyDown (cyclomatic 17) packages/desktop-client/src/components/select/DateSelect.tsx:391 — DateSelect.DateSelectDesktop::onKeyDown has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RecurringSchedulePicker.RecurringScheduleTooltip (cyclomatic 17) · ×1
  • RecurringSchedulePicker.RecurringScheduleTooltip (cyclomatic 17) packages/desktop-client/src/components/select/RecurringSchedulePicker.tsx:371 — RecurringSchedulePicker.RecurringScheduleTooltip has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · columns.parseTransactionTableColumns (cyclomatic 17) · ×1
  • columns.parseTransactionTableColumns (cyclomatic 17) packages/desktop-client/src/components/transactions/table/columns.ts:98 — columns.parseTransactionTableColumns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · useFormulaExecution.getCategoriesFromConditions (cyclomatic 17) · ×1
  • useFormulaExecution.getCategoriesFromConditions (cyclomatic 17) packages/desktop-client/src/hooks/useFormulaExecution.ts:463 — useFormulaExecution.getCategoriesFromConditions has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 487, 471, 484, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useScheduleEdit.useScheduleEdit (cyclomatic 17) · ×1
  • useScheduleEdit.useScheduleEdit (cyclomatic 17) packages/desktop-client/src/hooks/useScheduleEdit.ts:244 — useScheduleEdit.useScheduleEdit has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 307, 360, 335, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · window-state.validateState (cyclomatic 17) · ×1
  • window-state.validateState (cyclomatic 17) packages/desktop-electron/window-state.ts:86 — window-state.validateState has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync.normalizeBankSyncTransactions (cyclomatic 17) · ×1
  • sync.normalizeBankSyncTransactions (cyclomatic 17) packages/loot-core/src/server/accounts/sync.ts:516 — sync.normalizeBankSyncTransactions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · cloud-storage.importBuffer (cyclomatic 17) · ×1
  • cloud-storage.importBuffer (cyclomatic 17) packages/loot-core/src/server/cloud-storage.ts:212 — cloud-storage.importBuffer has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CategoryTemplateContext.checkLimit (cyclomatic 17) · ×1
  • CategoryTemplateContext.checkLimit (cyclomatic 17) packages/loot-core/src/server/budget/category-template-context.ts:570 — CategoryTemplateContext.checkLimit has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.updateSchedule (cyclomatic 17) · ×1
  • app.updateSchedule (cyclomatic 17) packages/loot-core/src/server/schedules/app.ts:404 — app.updateSchedule has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · transaction-rules.runRules (cyclomatic 17) · ×1
  • transaction-rules.runRules (cyclomatic 17) packages/loot-core/src/server/transactions/transaction-rules.ts:333 — transaction-rules.runRules has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · createOnce.extractVariableNames (cyclomatic 17) · ×1
  • createOnce.extractVariableNames (cyclomatic 17) packages/eslint-plugin-actual/lib/rules/prefer-const.js:127 — createOnce.extractVariableNames has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FocusableAmountInput.FocusableAmountInput (cyclomatic 16) · ×1
  • FocusableAmountInput.FocusableAmountInput (cyclomatic 16) packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:263 — FocusableAmountInput.FocusableAmountInput has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CrossoverCard.CrossoverCard (cyclomatic 16) · ×1
  • CrossoverCard.CrossoverCard (cyclomatic 16) packages/desktop-client/src/components/reports/reports/CrossoverCard.tsx:38 — CrossoverCard.CrossoverCard has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 60, 94, 137, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RepairTransactions.useRenderResults.renderResults (cyclomatic 16) · ×1
  • RepairTransactions.useRenderResults.renderResults (cyclomatic 16) packages/desktop-client/src/components/settings/RepairTransactions.tsx:19 — RepairTransactions.useRenderResults.renderResults has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · migrateTemplatesToAutomations.migrateTemplatesToAutomations (cyclomatic 16) · ×1
  • migrateTemplatesToAutomations.migrateTemplatesToAutomations (cyclomatic 16) packages/desktop-client/src/components/modals/BudgetAutomationsModal/migrateTemplatesToAutomations.ts:70 — migrateTemplatesToAutomations.migrateTemplatesToAutomations has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 76). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · utils.parseAmountFields (cyclomatic 16) · ×1
  • utils.parseAmountFields (cyclomatic 16) packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts:206 — utils.parseAmountFields has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SimpleFinInitialiseModal.SimpleFinInitialiseModal · ×1
  • SimpleFinInitialiseModal.SimpleFinInitialiseModal::onSubmit (cyclomatic 16) packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx:44 — SimpleFinInitialiseModal.SimpleFinInitialiseModal::onSubmit has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal (cyclomatic 16) · ×1
  • UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal (cyclomatic 16) packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx:37 — UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 85, 66, 56, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · AccountInternal.render (cyclomatic 16) · ×1
  • AccountInternal.render (cyclomatic 16) packages/desktop-client/src/components/accounts/Account.tsx:1853 — AccountInternal.render has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · NoteTagAutocomplete.NoteTagAutocomplete (cyclomatic 16) · ×1
  • NoteTagAutocomplete.NoteTagAutocomplete (cyclomatic 16) packages/desktop-client/src/components/autocomplete/NoteTagAutocomplete.tsx:23 — NoteTagAutocomplete.NoteTagAutocomplete has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BalanceWithCarryover.BalanceWithCarryover (cyclomatic 16) · ×1
  • BalanceWithCarryover.BalanceWithCarryover (cyclomatic 16) packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx:92 — BalanceWithCarryover.BalanceWithCarryover has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 151, getHave, getRingProgress, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · SavedFilterMenuButton.SavedFilterMenuButton (cyclomatic 16) · ×1
  • SavedFilterMenuButton.SavedFilterMenuButton (cyclomatic 16) packages/desktop-client/src/components/filters/SavedFilterMenuButton.tsx:26 — SavedFilterMenuButton.SavedFilterMenuButton has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (onFilterMenuSelect, onAddUpdate). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ManagePayees.ManagePayees (cyclomatic 16) · ×1
  • ManagePayees.ManagePayees (cyclomatic 16) packages/desktop-client/src/components/payees/ManagePayees.tsx:70 — ManagePayees.ManagePayees has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 86, a function literal at line 112, a function literal at line 89, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · StackedBarGraph.StackedBarGraph (cyclomatic 16) · ×1
  • StackedBarGraph.StackedBarGraph (cyclomatic 16) packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx:202 — StackedBarGraph.StackedBarGraph has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 240, 229, 300, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · CalendarGraph.CalendarGraph (cyclomatic 16) · ×1
  • CalendarGraph.CalendarGraph (cyclomatic 16) packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx:38 — CalendarGraph.CalendarGraph has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 108, 205, 218, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MonteCarloLumpSums.MonteCarloLumpSums (cyclomatic 16) · ×1
  • MonteCarloLumpSums.MonteCarloLumpSums (cyclomatic 16) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloLumpSums.tsx:49 — MonteCarloLumpSums.MonteCarloLumpSums has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 182, 64, 92, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · useCategoryScheduleGoalTemplateIndicator.useCategoryScheduleGoalTemplateIndicator (cyclomatic 16) · ×1
  • useCategoryScheduleGoalTemplateIndicator.useCategoryScheduleGoalTemplateIndicator (cyclomatic 16) packages/desktop-client/src/hooks/useCategoryScheduleGoalTemplateIndicator.ts:36 — useCategoryScheduleGoalTemplateIndicator.useCategoryScheduleGoalTemplateIndicator has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 69, 52, 54, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · coordinator.createCoordinator.resumePort (cyclomatic 16) · ×1
  • coordinator.createCoordinator.resumePort (cyclomatic 16) packages/loot-core/src/platform/client/browser-server/coordinator.ts:171 — coordinator.createCoordinator.resumePort has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index.electron.connectSocket (cyclomatic 16) · ×1
  • index.electron.connectSocket (cyclomatic 16) packages/loot-core/src/platform/client/connection/index.electron.ts:25 — index.electron.connectSocket has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 27, 26). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · sync.downloadSimpleFinTransactions (cyclomatic 16) · ×1
  • sync.downloadSimpleFinTransactions (cyclomatic 16) packages/loot-core/src/server/accounts/sync.ts:189 — sync.downloadSimpleFinTransactions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · sync.processBankSyncDownload (cyclomatic 16) · ×1
  • sync.processBankSyncDownload (cyclomatic 16) packages/loot-core/src/server/accounts/sync.ts:1108 — sync.processBankSyncDownload has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · app.getBankSyncStatusFromError (cyclomatic 16) · ×1
  • app.getBankSyncStatusFromError (cyclomatic 16) packages/loot-core/src/server/accounts/app.ts:1397 — app.getBankSyncStatusFromError has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · goal-template.computeTemplates (cyclomatic 16) · ×1
  • goal-template.computeTemplates (cyclomatic 16) packages/loot-core/src/server/budget/goal-template.ts:245 — goal-template.computeTemplates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · base.triggerBudgetChanges (cyclomatic 16) · ×1
  • base.triggerBudgetChanges (cyclomatic 16) packages/loot-core/src/server/budget/base.ts:280 — base.triggerBudgetChanges has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 293). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · createOnce.check (cyclomatic 16) · ×1
  • createOnce.check (cyclomatic 16) packages/eslint-plugin-actual/lib/rules/typography.js:27 — createOnce.check has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · monteCarloSimulation.runMonteCarloSimulation (cognitive 479) · ×1
  • monteCarloSimulation.runMonteCarloSimulation (cognitive 479) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400 — monteCarloSimulation.runMonteCarloSimulation has cognitive complexity 479 (threshold 15). Drivers by points: if/else 114 (374 pts), loops 53 (121 pts), ternaries 32 (93 pts), boolean chains 57 (nesting depth added 389). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: 2 other methods here (monteCarloSimulation.runMonteCarloSimulation::splitAcrossPots, monteCarloSimulation.runMonteCarloSimulation::settleYearFlows) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TransactionsTable.TransactionTable (cognitive 166) · ×1
  • TransactionsTable.TransactionTable (cognitive 166) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:3140 — TransactionsTable.TransactionTable has cognitive complexity 166 (threshold 15). Drivers by points: if/else 68 (98 pts), boolean chains 33, ternaries 12 (21 pts), loops 5 (10 pts), error handling 1 (3 pts), match/switch 1 (nesting depth added 46). Of this number, 35 points are the body's own statements and 131 belong to 32 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BalanceForecast.BalanceForecastInner (cognitive 150) · ×1
  • BalanceForecast.BalanceForecastInner (cognitive 150) packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94 — BalanceForecast.BalanceForecastInner has cognitive complexity 150 (threshold 15). Drivers by points: ternaries 48 (99 pts), if/else 18 (27 pts), boolean chains 24 (nesting depth added 60). Of this number, 81 points are the body's own statements and 69 belong to 15 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomReport.CustomReportInner (cognitive 102) · ×1
  • CustomReport.CustomReportInner (cognitive 102) packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145 — CustomReport.CustomReportInner has cognitive complexity 102 (threshold 15). Drivers by points: boolean chains 38, ternaries 23 (32 pts), if/else 25 (29 pts), match/switch 3 (nesting depth added 13). Of this number, 32 points are the body's own statements and 70 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ynab5.importScheduledTransactions (cognitive 84) · ×1
  • ynab5.importScheduledTransactions (cognitive 84) packages/loot-core/src/server/importers/ynab5.ts:872 — ynab5.importScheduledTransactions has cognitive complexity 84 (threshold 15). Drivers by points: if/else 26 (58 pts), ternaries 4 (14 pts), loops 4 (6 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 45). Of this number, 48 points are the body's own statements and 36 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Condition.eval (cognitive 81) · ×1
  • Condition.eval (cognitive 81) REDACTED:239 — Condition.eval has cognitive complexity 81 (threshold 15). Drivers by points: if/else 35 (66 pts), boolean chains 6, match/switch 2 (6 pts), error handling 1 (2 pts), ternaries 1 (nesting depth added 36). Of this number, 80 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BalanceForecastCard.BalanceForecastCard (cognitive 79) · ×1
  • BalanceForecastCard.BalanceForecastCard (cognitive 79) packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:54 — BalanceForecastCard.BalanceForecastCard has cognitive complexity 79 (threshold 15). Drivers by points: ternaries 24 (52 pts), boolean chains 17, if/else 3 (10 pts) (nesting depth added 35). Of this number, 37 points are the body's own statements and 42 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · TransactionEdit.TransactionEditInner (cognitive 78) · ×1
  • TransactionEdit.TransactionEditInner (cognitive 78) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:635 — TransactionEdit.TransactionEditInner has cognitive complexity 78 (threshold 15). Drivers by points: if/else 27 (32 pts), boolean chains 24, ternaries 15 (19 pts), error handling 2, match/switch 1 (nesting depth added 9). Of this number, 30 points are the body's own statements and 48 belong to 18 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Autocomplete.SingleAutocomplete (cognitive 78) · ×1
  • Autocomplete.SingleAutocomplete (cognitive 78) packages/desktop-client/src/components/autocomplete/Autocomplete.tsx:214 — Autocomplete.SingleAutocomplete has cognitive complexity 78 (threshold 15). Drivers by points: if/else 35 (46 pts), boolean chains 18, ternaries 10 (14 pts) (nesting depth added 15). Most of this is not in the body itself: 8 of the 78 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 551, a function literal at line 443, a function literal at line 384, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · opfs-sahpool.createOpfsStore (cognitive 76) · ×1
  • opfs-sahpool.createOpfsStore (cognitive 76) packages/loot-core/src/platform/server/sqlite/storage/opfs-sahpool.ts:79 — opfs-sahpool.createOpfsStore has cognitive complexity 76 (threshold 15). Drivers by points: if/else 36 (46 pts), loops 11 (12 pts), error handling 7 (8 pts), boolean chains 7, ternaries 2 (3 pts) (nesting depth added 13). Of this number, 33 points are the body's own statements and 43 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TransactionsTable.Transaction (cognitive 72) · ×1
  • TransactionsTable.Transaction (cognitive 72) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065 — TransactionsTable.Transaction has cognitive complexity 72 (threshold 15). Drivers by points: ternaries 54 (118 pts), boolean chains 71, if/else 39 (61 pts), match/switch 1 (nesting depth added 86). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 3 other methods here (TransactionsTable.Transaction::onUpdate, TransactionsTable.Transaction::onUpdateAfterConfirm, TransactionsTable.Transaction::renderColumnCell) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · TransactionEdit.TransactionEditUnconnected (cognitive 66) · ×1
  • TransactionEdit.TransactionEditUnconnected (cognitive 66) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:1601 — TransactionEdit.TransactionEditUnconnected has cognitive complexity 66 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 18, ternaries 3 (4 pts), error handling 1, loops 1 (nesting depth added 14). Most of this is not in the body itself: 5 of the 66 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 1739, 1828, 1695, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Action.exec (cognitive 66) · ×1
  • Action.exec (cognitive 66) packages/loot-core/src/server/rules/action.ts:99 — Action.exec has cognitive complexity 66 (threshold 15). Drivers by points: if/else 15 (34 pts), ternaries 4 (15 pts), match/switch 4 (9 pts), error handling 2 (6 pts), boolean chains 2 (nesting depth added 39). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · app.advanceSchedulesService (cognitive 64) · ×1
  • app.advanceSchedulesService (cognitive 64) packages/loot-core/src/server/schedules/app.ts:672 — app.advanceSchedulesService has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (53 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ynab5.importCategories (cognitive 62) · ×1
  • ynab5.importCategories (cognitive 62) packages/loot-core/src/server/importers/ynab5.ts:294 — ynab5.importCategories has cognitive complexity 62 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 4 (6 pts), ternaries 4 (6 pts), match/switch 1 (5 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 36). Of this number, 38 points are the body's own statements and 24 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MonteCarlo.MonteCarlo (cognitive 61) · ×1
  • MonteCarlo.MonteCarlo (cognitive 61) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56 — MonteCarlo.MonteCarlo has cognitive complexity 61 (threshold 15). Drivers by points: ternaries 23 (37 pts), boolean chains 19, if/else 5 (nesting depth added 14). Of this number, 51 points are the body's own statements and 10 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RuleEditor.RuleEditor (cognitive 61) · ×1
  • RuleEditor.RuleEditor (cognitive 61) packages/desktop-client/src/components/rules/RuleEditor.tsx:1087 — RuleEditor.RuleEditor has cognitive complexity 61 (threshold 15). Drivers by points: if/else 27 (38 pts), boolean chains 11, ternaries 7 (10 pts), loops 1 (2 pts) (nesting depth added 15). Most of this is not in the body itself: 6 of the 61 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 1215, onSave, addActionToSplitAfterIndex, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · sync.reconcileTransactions (cognitive 61) · ×1
  • sync.reconcileTransactions (cognitive 61) packages/loot-core/src/server/accounts/sync.ts:641 — sync.reconcileTransactions has cognitive complexity 61 (threshold 15). Drivers by points: if/else 17 (42 pts), boolean chains 14, loops 2 (5 pts) (nesting depth added 28). Of this number, 57 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schedule-template.buildMonthlyOutflow (cognitive 60) · ×1
  • schedule-template.buildMonthlyOutflow (cognitive 60) packages/loot-core/src/server/budget/schedule-template.ts:361 — schedule-template.buildMonthlyOutflow has cognitive complexity 60 (threshold 15). Drivers by points: if/else 13 (26 pts), ternaries 9 (16 pts), loops 7 (11 pts), boolean chains 7 (nesting depth added 24). Of this number, 53 points are the body's own statements and 7 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useSelected.useSelected (cognitive 59) · ×1
  • useSelected.useSelected (cognitive 59) packages/desktop-client/src/hooks/useSelected.tsx:50 — useSelected.useSelected has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 9, ternaries 2 (3 pts), match/switch 1 (nesting depth added 26). None of this is in the body itself: all 59 points belong to 6 function literals inside it that branch (lines 57, 165, 155, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · idb-memory.createMemoryIdbStore (cognitive 59) · ×1
  • idb-memory.createMemoryIdbStore (cognitive 59) packages/loot-core/src/platform/server/sqlite/storage/idb-memory.ts:78 — idb-memory.createMemoryIdbStore has cognitive complexity 59 (threshold 15). Drivers by points: if/else 35 (38 pts), boolean chains 10, loops 7, error handling 2, ternaries 2 (nesting depth added 3). Of this number, 29 points are the body's own statements and 30 belong to 16 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TransactionList.TransactionList (cognitive 58) · ×1
  • TransactionList.TransactionList (cognitive 58) packages/desktop-client/src/components/transactions/TransactionList.tsx:139 — TransactionList.TransactionList has cognitive complexity 58 (threshold 15). Drivers by points: if/else 26 (35 pts), boolean chains 14, ternaries 6 (9 pts) (nesting depth added 12). Most of this is not in the body itself: 3 of the 58 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 349, 205, 270, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · path-join.normalizeStringPosix (cognitive 58) · ×1
  • path-join.normalizeStringPosix (cognitive 58) packages/loot-core/src/platform/server/fs/path-join.ts:6 — path-join.normalizeStringPosix has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (52 pts), boolean chains 5, loops 1 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · rule-utils.iterateIds (cognitive 58) · ×1
  • rule-utils.iterateIds (cognitive 58) packages/loot-core/src/server/rules/rule-utils.ts:163 — rule-utils.iterateIds has cognitive complexity 58 (threshold 15). Drivers by points: if/else 8 (37 pts), loops 5 (15 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Crossover.CrossoverInner (cognitive 53) · ×1
  • Crossover.CrossoverInner (cognitive 53) packages/desktop-client/src/components/reports/reports/Crossover.tsx:74 — Crossover.CrossoverInner has cognitive complexity 53 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 15, ternaries 13 (14 pts) (nesting depth added 5). Of this number, 17 points are the body's own statements and 36 belong to 18 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ThemeInstaller.ThemeInstaller (cognitive 53) · ×1
  • ThemeInstaller.ThemeInstaller (cognitive 53) packages/desktop-client/src/components/settings/ThemeInstaller.tsx:46 — ThemeInstaller.ThemeInstaller has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 15 (33 pts), boolean chains 7, if/else 4 (7 pts), error handling 3, loops 1 (3 pts) (nesting depth added 23). Most of this is not in the body itself: 5 of the 53 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 96, 284, 171, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · schedule.getRecurringDescription (cognitive 52) · ×1
  • schedule.getRecurringDescription (cognitive 52) packages/desktop-client/src/util/schedule.ts:49 — schedule.getRecurringDescription has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (35 pts), ternaries 4 (9 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (nesting depth added 26). Of this number, 49 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cleanup-template.processCleanup (cognitive 52) · ×1
  • cleanup-template.processCleanup (cognitive 52) packages/loot-core/src/server/budget/cleanup-template.ts:152 — cleanup-template.processCleanup has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 7, loops 5 (6 pts) (nesting depth added 16). Of this number, 50 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · crossover-spreadsheet.recalculate (cognitive 51) · ×1
  • crossover-spreadsheet.recalculate (cognitive 51) packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:214 — crossover-spreadsheet.recalculate has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 9, loops 5 (9 pts), ternaries 3 (nesting depth added 18). Of this number, 49 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync-events.listenForSyncEvent (cognitive 51) · ×1
  • sync-events.listenForSyncEvent (cognitive 51) packages/desktop-client/src/sync-events.ts:61 — sync-events.listenForSyncEvent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 18). None of this is in the body itself: all 51 points belong to 3 function literals inside it that branch (lines 93, 80, 63). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Calendar.CalendarInner (cognitive 50) · ×1
  • Calendar.CalendarInner (cognitive 50) packages/desktop-client/src/components/reports/reports/Calendar.tsx:95 — Calendar.CalendarInner has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 16 (18 pts), if/else 16 (17 pts), boolean chains 15 (nesting depth added 3). Most of this is not in the body itself: 13 of the 50 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 486, a function literal at line 139, a function literal at line 252, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · transaction-rules.conditionsToAQL · ×1
  • transaction-rules.conditionsToAQL::mapConditionToActualQL (cognitive 50) packages/loot-core/src/server/transactions/transaction-rules.ts:534 — transaction-rules.conditionsToAQL::mapConditionToActualQL has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 2 (6 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · validateAutomation.validateAutomation (cognitive 49) · ×1
  • validateAutomation.validateAutomation (cognitive 49) packages/desktop-client/src/components/budget/goals/validateAutomation.ts:48 — validateAutomation.validateAutomation has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 8, ternaries 1 (2 pts), match/switch 1 (nesting depth added 21). Of this number, 47 points are the body's own statements and 2 belong to 2 function literals inside it that branch. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> (cognitive 49) · ×1
  • budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> (cognitive 49) packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts:185 — budget-analysis-spreadsheet.createBudgetAnalysisSpreadsheet.<returned closure> has cognitive complexity 49 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 3 (10 pts), boolean chains 7, ternaries 3 (6 pts), error handling 1 (3 pts) (nesting depth added 21). Of this number, 25 points are the body's own statements and 24 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Transaction.Transaction (cognitive 48) · ×1
  • Transaction.Transaction (cognitive 48) packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx:38 — Transaction.Transaction has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 18 (31 pts), boolean chains 16, if/else 1 (nesting depth added 13). Of this number, 35 points are the body's own statements and 13 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schema-diff.findAdditiveViolations (cognitive 47) · ×1
  • schema-diff.findAdditiveViolations (cognitive 47) packages/loot-core/src/server/migrate/schema-diff.ts:165 — schema-diff.findAdditiveViolations has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (33 pts), loops 6 (12 pts), boolean chains 2 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ynab5.importTransactions (cognitive 46) · ×1
  • ynab5.importTransactions (cognitive 46) packages/loot-core/src/server/importers/ynab5.ts:588 — ynab5.importTransactions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 9, ternaries 5, loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 13 of the 46 points are its own statements and the rest belongs to 6 function items inside it that branch (orphanTransferComparator, a function literal at line 769, a function literal at line 709, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ReportSidebar.ReportSidebar (cognitive 45) · ×1
  • ReportSidebar.ReportSidebar (cognitive 45) packages/desktop-client/src/components/reports/ReportSidebar.tsx:87 — ReportSidebar.ReportSidebar has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 14, ternaries 5 (6 pts) (nesting depth added 7). Most of this is not in the body itself: 12 of the 45 points are its own statements and the rest belongs to 7 function items inside it that branch (onChangeBalanceType, a function literal at line 457, onChangeMode, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · RuleEditor.ActionEditor (cognitive 45) · ×1
  • RuleEditor.ActionEditor (cognitive 45) packages/desktop-client/src/components/rules/RuleEditor.tsx:524 — RuleEditor.ActionEditor has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 9 (24 pts), boolean chains 21 (nesting depth added 15). Of this number, 44 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RuleEditor.ConditionsList (cognitive 45) · ×1
  • RuleEditor.ConditionsList (cognitive 45) packages/desktop-client/src/components/rules/RuleEditor.tsx:874 — RuleEditor.ConditionsList has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 17, ternaries 3 (7 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 45 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 924, addCondition, a function literal at line 1022, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SelectedTransactionsButton.SelectedTransactionsButton (cognitive 43) · ×1
  • SelectedTransactionsButton.SelectedTransactionsButton (cognitive 43) packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:53 — SelectedTransactionsButton.SelectedTransactionsButton has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 22, ternaries 7 (12 pts), if/else 8, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 13 of the 43 points are its own statements and the rest belongs to 18 function items inside it that branch (onViewSchedule, a function literal at line 116, a function literal at line 162, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Summary.SummaryInner (cognitive 42) · ×1
  • Summary.SummaryInner (cognitive 42) packages/desktop-client/src/components/reports/reports/Summary.tsx:71 — Summary.SummaryInner has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 23 (25 pts), boolean chains 8, if/else 7, error handling 1 (2 pts) (nesting depth added 3). Of this number, 27 points are the body's own statements and 15 belong to 6 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · util.calculateHasWarning (cognitive 42) · ×1
  • util.calculateHasWarning (cognitive 42) packages/desktop-client/src/components/reports/util.ts:47 — util.calculateHasWarning has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (36 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compiler.castInput (cognitive 42) · ×1
  • compiler.castInput (cognitive 42) packages/loot-core/src/server/aql/compiler.ts:246 — compiler.castInput has cognitive complexity 42 (threshold 15). Drivers by points: if/else 26 (37 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOnce.isJSXContent (cognitive 41) · ×1
  • createOnce.isJSXContent (cognitive 41) packages/eslint-plugin-actual/lib/rules/prefer-trans-over-t.js:31 — createOnce.isJSXContent has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 23). Of this number, 38 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Spending.SpendingInternal (cognitive 40) · ×1
  • Spending.SpendingInternal (cognitive 40) packages/desktop-client/src/components/reports/reports/Spending.tsx:75 — Spending.SpendingInternal has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 15 (20 pts), boolean chains 13, if/else 7 (nesting depth added 5). Of this number, 30 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · common.useBootstrapped (cognitive 40) · ×1
  • common.useBootstrapped (cognitive 40) packages/desktop-client/src/components/manager/subscribe/common.tsx:28 — common.useBootstrapped has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (34 pts), boolean chains 6 (nesting depth added 15). None of this is in the body itself: all 40 points belong to 2 function literals inside it that branch (lines 40, 41). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SelectLinkedAccountsModal.SelectLinkedAccountsModal (cognitive 40) · ×1
  • SelectLinkedAccountsModal.SelectLinkedAccountsModal (cognitive 40) packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:199 — SelectLinkedAccountsModal.SelectLinkedAccountsModal has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 12 (17 pts), if/else 15, boolean chains 7, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 300, a function literal at line 512, a function literal at line 483, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · TransactionListItem.TransactionListItem (cognitive 39) · ×1
  • TransactionListItem.TransactionListItem (cognitive 39) packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx:79 — TransactionListItem.TransactionListItem has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 14 (19 pts), boolean chains 18, if/else 2 (nesting depth added 5). Of this number, 38 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · schedule-template.createScheduleList (cognitive 39) · ×1
  • schedule-template.createScheduleList (cognitive 39) packages/loot-core/src/server/budget/schedule-template.ts:41 — schedule-template.createScheduleList has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 9 (21 pts), if/else 3 (8 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openid.loginWithOpenIdFinalize (cognitive 39) · ×1
  • openid.loginWithOpenIdFinalize (cognitive 39) packages/sync-server/src/accounts/openid.ts:185 — openid.loginWithOpenIdFinalize has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 5, error handling 4, ternaries 2 (4 pts) (nesting depth added 8). Of this number, 20 points are the body's own statements and 19 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PayeeAutocomplete.PayeeAutocomplete (cognitive 38) · ×1
  • PayeeAutocomplete.PayeeAutocomplete (cognitive 38) packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:364 — PayeeAutocomplete.PayeeAutocomplete has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 7, ternaries 3 (4 pts), error handling 1 (nesting depth added 5). Most of this is not in the body itself: 4 of the 38 points are its own statements and the rest belongs to 10 function items inside it that branch (filterSuggestions, handleSelect, a function literal at line 578, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Overview.Overview (cognitive 36) · ×1
  • Overview.Overview (cognitive 36) packages/desktop-client/src/components/reports/Overview.tsx:104 — Overview.Overview has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 13, ternaries 5, match/switch 1 (2 pts), error handling 1 (nesting depth added 2). Of this number, 16 points are the body's own statements and 20 belong to 14 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BudgetTable.BudgetTable (cognitive 36) · ×1
  • BudgetTable.BudgetTable (cognitive 36) packages/desktop-client/src/components/budget/BudgetTable.tsx:61 — BudgetTable.BudgetTable has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 10, ternaries 4 (7 pts), loops 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to 8 function items inside it that branch (moveVertically, _onReorderCategory, onKeyDown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · spending-spreadsheet.createSpendingSpreadsheet.<returned closure> (cognitive 36) · ×1
  • spending-spreadsheet.createSpendingSpreadsheet.<returned closure> (cognitive 36) packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts:96 — spending-spreadsheet.createSpendingSpreadsheet.<returned closure> has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 10 (11 pts), boolean chains 8 (nesting depth added 9). Most of this is not in the body itself: 13 of the 36 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 262, 180, 191, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index._fullSync (cognitive 36) · ×1
  • index._fullSync (cognitive 36) packages/loot-core/src/server/sync/index.ts:965 — index._fullSync has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (19 pts), ternaries 3 (8 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · index.batchUpdateTransactions (cognitive 36) · ×1
  • index.batchUpdateTransactions (cognitive 36) packages/loot-core/src/server/transactions/index.ts:40 — index.batchUpdateTransactions has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 6 (8 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 12). Of this number, 26 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · customThemes.embedThemeFonts (cognitive 35) · ×1
  • customThemes.embedThemeFonts (cognitive 35) packages/desktop-client/src/style/customThemes.ts:524 — customThemes.embedThemeFonts has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 4 (5 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImportTransactionsModal.ImportTransactionsModal · ×1
  • ImportTransactionsModal.ImportTransactionsModal::onImport (cognitive 35) packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:645 — ImportTransactionsModal.ImportTransactionsModal::onImport has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 11, ternaries 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · table.Table (cognitive 35) · ×1
  • table.Table (cognitive 35) packages/desktop-client/src/components/table.tsx:970 — table.Table has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 14, ternaries 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 6 of the 35 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 1205, a function literal at line 1011, a function literal at line 1072, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · xmlcamt2json.xmlCAMT2json (cognitive 35) · ×1
  • xmlcamt2json.xmlCAMT2json (cognitive 35) packages/loot-core/src/server/transactions/import/xmlcamt2json.ts:120 — xmlcamt2json.xmlCAMT2json has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 4 (10 pts), boolean chains 6, loops 1 (nesting depth added 17). Of this number, 28 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnableBankingExternalMsgModal.EnableBankingExternalMsgModal (cognitive 34) · ×1
  • EnableBankingExternalMsgModal.EnableBankingExternalMsgModal (cognitive 34) packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:126 — EnableBankingExternalMsgModal.EnableBankingExternalMsgModal has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 7 (15 pts), if/else 9 (10 pts), boolean chains 9 (nesting depth added 9). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 407, onJump, renderLinkButton, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · donutColors.parseColor (cognitive 34) · ×1
  • donutColors.parseColor (cognitive 34) packages/desktop-client/src/components/reports/graphs/donutColors.ts:22 — donutColors.parseColor has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), ternaries 4 (9 pts), boolean chains 2 (nesting depth added 17). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 3 function items inside it that branch (hueToRgb, parseChannel, a function literal at line 47). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useFormulaExecution.fetchBudgetDimensionValueDirect (cognitive 34) · ×1
  • useFormulaExecution.fetchBudgetDimensionValueDirect (cognitive 34) packages/desktop-client/src/hooks/useFormulaExecution.ts:631 — useFormulaExecution.fetchBudgetDimensionValueDirect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 10, loops 5 (10 pts) (nesting depth added 11). Of this number, 31 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CategoryTemplateContext.runTemplatesForPriority (cognitive 34) · ×1
  • CategoryTemplateContext.runTemplatesForPriority (cognitive 34) packages/loot-core/src/server/budget/category-template-context.ts:160 — CategoryTemplateContext.runTemplatesForPriority has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 5, match/switch 1 (2 pts), ternaries 2, loops 1 (nesting depth added 10). Of this number, 30 points are the body's own statements and 4 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · template-notes.templateToLine (cognitive 34) · ×1
  • template-notes.templateToLine (cognitive 34) packages/loot-core/src/server/budget/template-notes.ts:169 — template-notes.templateToLine has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cleanup-template.applyGroupCleanups (cognitive 34) · ×1
  • cleanup-template.applyGroupCleanups (cognitive 34) packages/loot-core/src/server/budget/cleanup-template.ts:19 — cleanup-template.applyGroupCleanups has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 5 (13 pts), boolean chains 5 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOnce.markAsReassigned (cognitive 34) · ×1
  • createOnce.markAsReassigned (cognitive 34) packages/eslint-plugin-actual/lib/rules/prefer-const.js:59 — createOnce.markAsReassigned has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), ternaries 2 (6 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 21). Of this number, 33 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · validate-publish-imports.main (cognitive 33) · ×1
  • validate-publish-imports.main (cognitive 33) bin/validate-publish-imports.mts:155 — validate-publish-imports.main has cognitive complexity 33 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 6 (14 pts), boolean chains 1, ternaries 1 (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ScheduleEditForm.ScheduleEditForm (cognitive 33) · ×1
  • ScheduleEditForm.ScheduleEditForm (cognitive 33) packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx:103 — ScheduleEditForm.ScheduleEditForm has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 13 (18 pts), boolean chains 12, match/switch 2 (3 pts) (nesting depth added 6). Of this number, 18 points are the body's own statements and 15 belong to 4 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Value.Value · ×1
  • Value.Value::formatValue (cognitive 33) packages/desktop-client/src/components/rules/Value.tsx:91 — Value.Value::formatValue has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), ternaries 3 (8 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DonutGraph.DonutGraph (cognitive 33) · ×1
  • DonutGraph.DonutGraph (cognitive 33) packages/desktop-client/src/components/reports/graphs/DonutGraph.tsx:107 — DonutGraph.DonutGraph has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 26, ternaries 4, if/else 3. Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 184, a function literal at line 145, getVal, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MonteCarloConfiguration.MonteCarloConfiguration (cognitive 33) · ×1
  • MonteCarloConfiguration.MonteCarloConfiguration (cognitive 33) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx:73 — MonteCarloConfiguration.MonteCarloConfiguration has cognitive complexity 33 (threshold 15). Drivers by points: ternaries 7 (18 pts), boolean chains 11, if/else 4 (nesting depth added 11). Of this number, 25 points are the body's own statements and 8 belong to 5 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sankey-spreadsheet.sortGraph (cognitive 33) · ×1
  • sankey-spreadsheet.sortGraph (cognitive 33) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1362 — sankey-spreadsheet.sortGraph has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (24 pts), ternaries 5, boolean chains 2, loops 1 (2 pts) (nesting depth added 10). Most of this is not in the body itself: 12 of the 33 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1375, 1466, 1386, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AmountInput.AmountInput (cognitive 33) · ×1
  • AmountInput.AmountInput (cognitive 33) packages/desktop-client/src/components/util/AmountInput.tsx:46 — AmountInput.AmountInput has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 7 (10 pts), boolean chains 6 (nesting depth added 5). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 10 function items inside it that branch (onInputTextChange, fireUpdate, a function literal at line 66, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · GenericInput.GenericInput (cognitive 33) · ×1
  • GenericInput.GenericInput (cognitive 33) packages/desktop-client/src/components/util/GenericInput.tsx:121 — GenericInput.GenericInput has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (12 pts), ternaries 4 (8 pts), if/else 4 (7 pts), boolean chains 6 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · enforce-doc-links.remarkEnforceDocLinks.transformer (cognitive 33) · ×1
  • enforce-doc-links.remarkEnforceDocLinks.transformer (cognitive 33) packages/docs/src/remark/enforce-doc-links.js:139 — enforce-doc-links.remarkEnforceDocLinks.transformer has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 9, ternaries 3 (nesting depth added 3). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 161). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BudgetCategories.BudgetCategories (cognitive 32) · ×1
  • BudgetCategories.BudgetCategories (cognitive 32) packages/desktop-client/src/components/budget/BudgetCategories.tsx:64 — BudgetCategories.BudgetCategories has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 7 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 5). None of this is in the body itself: all 32 points belong to 8 function items inside it that branch (a function literal at line 91, a function literal at line 248, onDragChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MobileTagEditPage.TagEditForm (cognitive 32) · ×1
  • MobileTagEditPage.TagEditForm (cognitive 32) packages/desktop-client/src/components/mobile/tags/MobileTagEditPage.tsx:100 — MobileTagEditPage.TagEditForm has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 12, ternaries 4, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 14 of the 32 points are its own statements and the rest belongs to 6 function items inside it that branch (onSave, withUndoReturningTo, a function literal at line 219, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MonteCarloPotConfiguration.MonteCarloPotConfiguration (cognitive 32) · ×1
  • MonteCarloPotConfiguration.MonteCarloPotConfiguration (cognitive 32) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:73 — MonteCarloPotConfiguration.MonteCarloPotConfiguration has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 14 (19 pts), boolean chains 9, if/else 4 (nesting depth added 5). Of this number, 20 points are the body's own statements and 12 belong to 8 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · CategoryTemplateContext.checkLimit (cognitive 32) · ×1
  • CategoryTemplateContext.checkLimit (cognitive 32) packages/loot-core/src/server/budget/category-template-context.ts:570 — CategoryTemplateContext.checkLimit has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 15). Of this number, 31 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app._loadBudget (cognitive 32) · ×1
  • app._loadBudget (cognitive 32) REDACTED:624 — app._loadBudget has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (26 pts), error handling 5, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DateRangePicker.DateRangePicker (cognitive 31) · ×1
  • DateRangePicker.DateRangePicker (cognitive 31) packages/component-library/src/DateRangePicker.tsx:71 — DateRangePicker.DateRangePicker has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 11 (12 pts), boolean chains 11, if/else 8 (nesting depth added 1). Of this number, 17 points are the body's own statements and 14 belong to 8 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Account.Account (cognitive 31) · ×1
  • Account.Account (cognitive 31) packages/desktop-client/src/components/sidebar/Account.tsx:71 — Account.Account has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 12, if/else 2 (3 pts) (nesting depth added 5). Of this number, 27 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReportTableRow.ReportTableRow (cognitive 31) · ×1
  • ReportTableRow.ReportTableRow (cognitive 31) packages/desktop-client/src/components/reports/graphs/tableGraph/ReportTableRow.tsx:50 — ReportTableRow.ReportTableRow has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 14 (16 pts), boolean chains 15 (nesting depth added 2). Of this number, 22 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · FormulaEditor.FormulaEditor (cognitive 30) · ×1
  • FormulaEditor.FormulaEditor (cognitive 30) packages/desktop-client/src/components/formula/FormulaEditor.tsx:63 — FormulaEditor.FormulaEditor has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, boolean chains 9, ternaries 4 (5 pts) (nesting depth added 1). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 105, 220, 87, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · QueryManager.QueryItem (cognitive 30) · ×1
  • QueryManager.QueryItem (cognitive 30) packages/desktop-client/src/components/formula/QueryManager.tsx:289 — QueryManager.QueryItem has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 11, ternaries 7 (9 pts), if/else 7 (8 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 11 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (handleImport, a function literal at line 333, a function literal at line 425, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · global-events.handleGlobalEvents (cognitive 30) · ×1
  • global-events.handleGlobalEvents (cognitive 30) packages/desktop-client/src/global-events.ts:28 — global-events.handleGlobalEvents has cognitive complexity 30 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 4 (nesting depth added 5). None of this is in the body itself: all 30 points belong to 7 function literals inside it that branch (lines 59, 120, 256, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · window-state.validateState (cognitive 30) · ×1
  • window-state.validateState (cognitive 30) packages/desktop-electron/window-state.ts:86 — window-state.validateState has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 4 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · (anonymous) (cognitive 30) · ×1
  • (anonymous) (cognitive 30) REDACTED:142 — (anonymous) has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 4, other 2, error handling 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CalendarCard.CalendarCard (cognitive 29) · ×1
  • CalendarCard.CalendarCard (cognitive 29) packages/desktop-client/src/components/reports/reports/CalendarCard.tsx:54 — CalendarCard.CalendarCard has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 11 (18 pts), if/else 8, boolean chains 3 (nesting depth added 7). Of this number, 17 points are the body's own statements and 12 belong to 8 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfirmTransactionEditModal.ConfirmTransactionEditModal (cognitive 29) · ×1
  • ConfirmTransactionEditModal.ConfirmTransactionEditModal (cognitive 29) packages/desktop-client/src/components/modals/ConfirmTransactionEditModal.tsx:20 — ConfirmTransactionEditModal.ConfirmTransactionEditModal has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (29 pts) (nesting depth added 21). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to one function literal inside it that branches (line 39). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · GoCardlessExternalMsgModal.GoCardlessExternalMsgModal (cognitive 29) · ×1
  • GoCardlessExternalMsgModal.GoCardlessExternalMsgModal (cognitive 29) packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx:106 — GoCardlessExternalMsgModal.GoCardlessExternalMsgModal has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (20 pts), boolean chains 8, if/else 1 (nesting depth added 11). Most of this is not in the body itself: 2 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 305, renderLinkButton, onJump). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Header.AccountHeader (cognitive 29) · ×1
  • Header.AccountHeader (cognitive 29) packages/desktop-client/src/components/accounts/Header.tsx:131 — Header.AccountHeader has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (12 pts), boolean chains 11, if/else 5 (6 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · custom-spreadsheet.createCustomSpreadsheet.<returned closure> (cognitive 29) · ×1
  • custom-spreadsheet.createCustomSpreadsheet.<returned closure> (cognitive 29) packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts:111 — custom-spreadsheet.createCustomSpreadsheet.<returned closure> has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 13, if/else 11, ternaries 5. Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 238, 250, 267, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · net-worth-spreadsheet.createSpreadsheet.<returned closure> (cognitive 29) · ×1
  • net-worth-spreadsheet.createSpreadsheet.<returned closure> (cognitive 29) packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts:56 — net-worth-spreadsheet.createSpreadsheet.<returned closure> has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (17 pts), ternaries 6 (8 pts), boolean chains 4 (nesting depth added 5). Of this number, 18 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.electron.connectSocket (cognitive 29) · ×1
  • index.electron.connectSocket (cognitive 29) packages/loot-core/src/platform/client/connection/index.electron.ts:25 — index.electron.connectSocket has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 13). None of this is in the body itself: all 29 points belong to 2 function literals inside it that branch (lines 27, 26). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · bundle-stats-comment.parseMapping (cognitive 28) · ×1
  • bundle-stats-comment.parseMapping (cognitive 28) packages/ci-actions/bin/bundle-stats-comment.mjs:63 — bundle-stats-comment.parseMapping has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (4 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (nesting depth added 13). Of this number, 25 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FocusableAmountInput.AmountInput (cognitive 28) · ×1
  • FocusableAmountInput.AmountInput (cognitive 28) packages/desktop-client/src/components/mobile/transactions/FocusableAmountInput.tsx:48 — FocusableAmountInput.AmountInput has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 5 (6 pts), loops 1 (nesting depth added 3). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 87, onKeyUp, applyText, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Titlebar.ServerSyncButton (cognitive 28) · ×1
  • Titlebar.ServerSyncButton (cognitive 28) packages/desktop-client/src/components/Titlebar.tsx:127 — Titlebar.ServerSyncButton has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 16 (26 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AutomationListRow.AutomationListRow (cognitive 28) · ×1
  • AutomationListRow.AutomationListRow (cognitive 28) packages/desktop-client/src/components/modals/BudgetAutomationsModal/AutomationListRow.tsx:31 — AutomationListRow.AutomationListRow has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 16 (21 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · TagAutocomplete.TagAutocomplete (cognitive 28) · ×1
  • TagAutocomplete.TagAutocomplete (cognitive 28) packages/desktop-client/src/components/autocomplete/TagAutocomplete.tsx:32 — TagAutocomplete.TagAutocomplete has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12, boolean chains 11, ternaries 5. Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (handleKeyDown, a function literal at line 55, handleSelect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · showActivity.showActivity (cognitive 28) · ×1
  • showActivity.showActivity (cognitive 28) packages/desktop-client/src/components/reports/graphs/showActivity.ts:35 — showActivity.showActivity has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, ternaries 10 (14 pts) (nesting depth added 4). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · sankey-spreadsheet.addHiddenNodes (cognitive 28) · ×1
  • sankey-spreadsheet.addHiddenNodes (cognitive 28) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1663 — sankey-spreadsheet.addHiddenNodes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (6 pts), boolean chains 4 (nesting depth added 10). Of this number, 18 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useScheduleEdit.createScheduleEditReducer.<returned closure> (cognitive 28) · ×1
  • useScheduleEdit.createScheduleEditReducer.<returned closure> (cognitive 28) packages/desktop-client/src/hooks/useScheduleEdit.ts:90 — useScheduleEdit.createScheduleEditReducer.<returned closure> has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 5, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · replay.replayPendingMessages (cognitive 28) · ×1
  • replay.replayPendingMessages (cognitive 28) packages/loot-core/src/server/sync/replay.ts:52 — replay.replayPendingMessages has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 3 (5 pts), ternaries 2 (4 pts), error handling 3 (nesting depth added 8). Most of this is not in the body itself: 6 of the 28 points are its own statements and the rest belongs to 3 function items inside it that branch (replay::applyOne, replay, replay::processPass). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index._applyMessages · ×1
  • index._applyMessages::applyInTransaction (cognitive 28) packages/loot-core/src/server/sync/index.ts:443 — index._applyMessages::applyInTransaction has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (index._applyMessages) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · handlebars-helpers.registerHandlebarsHelpers (cognitive 28) · ×1
  • handlebars-helpers.registerHandlebarsHelpers (cognitive 28) packages/loot-core/src/server/rules/handlebars-helpers.ts:14 — handlebars-helpers.registerHandlebarsHelpers has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 14, if/else 13, loops 1. Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 14 function literals inside it that branch (lines 28, 82, 86, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transaction-rules.runRules (cognitive 28) · ×1
  • transaction-rules.runRules (cognitive 28) packages/loot-core/src/server/transactions/transaction-rules.ts:333 — transaction-rules.runRules has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (24 pts), loops 3, boolean chains 1 (nesting depth added 10). Of this number, 26 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOnce.extractVariableNames (cognitive 28) · ×1
  • createOnce.extractVariableNames (cognitive 28) packages/eslint-plugin-actual/lib/rules/prefer-const.js:127 — createOnce.extractVariableNames has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Menu.Menu (cognitive 27) · ×1
  • Menu.Menu (cognitive 27) packages/component-library/src/Menu.tsx:68 — Menu.Menu has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 16, if/else 7, ternaries 3, match/switch 1. Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 169, selectItem, a function literal at line 141, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Sankey.SankeyInner (cognitive 27) · ×1
  • Sankey.SankeyInner (cognitive 27) packages/desktop-client/src/components/reports/reports/Sankey.tsx:440 — Sankey.SankeyInner has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, ternaries 9 (10 pts), if/else 6 (nesting depth added 1). Of this number, 15 points are the body's own statements and 12 belong to 9 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardShortcutModal.KeyboardShortcutModal (cognitive 27) · ×1
  • KeyboardShortcutModal.KeyboardShortcutModal (cognitive 27) packages/desktop-client/src/components/modals/KeyboardShortcutModal.tsx:148 — KeyboardShortcutModal.KeyboardShortcutModal has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 10 (17 pts), if/else 4 (6 pts), boolean chains 4 (nesting depth added 9). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 488, 443, 532, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal (cognitive 27) · ×1
  • UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal (cognitive 27) packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx:37 — UnmigrateBudgetAutomationsModal.UnmigrateBudgetAutomationsModal has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (13 pts), ternaries 3 (8 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 27 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 85, 66, 56, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MonthPicker.MonthPicker (cognitive 27) · ×1
  • MonthPicker.MonthPicker (cognitive 27) packages/desktop-client/src/components/budget/MonthPicker.tsx:30 — MonthPicker.MonthPicker has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 20, ternaries 6, if/else 1. None of this is in the body itself: all 27 points belong to 2 function literals inside it that branch (lines 132, 67). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · formulaBadgeRanges.getStringContextBadgeRangesFromAst (cognitive 27) · ×1
  • formulaBadgeRanges.getStringContextBadgeRangesFromAst (cognitive 27) packages/desktop-client/src/components/formula/formulaBadgeRanges.ts:368 — formulaBadgeRanges.getStringContextBadgeRangesFromAst has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 3, ternaries 1 (nesting depth added 8). None of this is in the body itself: all 27 points belong to 3 function literals inside it that branch (lines 383, 435, 454). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MonteCarloRunDetailTable.MonteCarloRunDetailTable · ×1
  • MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence (cognitive 27) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:331 — MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (MonteCarloRunDetailTable.MonteCarloRunDetailTable) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · schedule-actions.createSingleTimeScheduleFromTransaction (cognitive 27) · ×1
  • schedule-actions.createSingleTimeScheduleFromTransaction (cognitive 27) packages/desktop-client/src/util/schedule-actions.ts:32 — schedule-actions.createSingleTimeScheduleFromTransaction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 4 (nesting depth added 9). Of this number, 20 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.normalizeTransactions (cognitive 27) · ×1
  • sync.normalizeTransactions (cognitive 27) packages/loot-core/src/server/accounts/sync.ts:442 — sync.normalizeTransactions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forecast-schedules.buildFutureScheduleOccurrences (cognitive 27) · ×1
  • forecast-schedules.buildFutureScheduleOccurrences (cognitive 27) packages/loot-core/src/server/forecast/forecast-schedules.ts:200 — forecast-schedules.buildFutureScheduleOccurrences has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 14). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transaction-rules.updateCategoryRules (cognitive 27) · ×1
  • transaction-rules.updateCategoryRules (cognitive 27) packages/loot-core/src/server/transactions/transaction-rules.ts:969 — transaction-rules.updateCategoryRules has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 13). Of this number, 16 points are the body's own statements and 11 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Notifications.Notification (cognitive 26) · ×1
  • Notifications.Notification (cognitive 26) packages/desktop-client/src/components/Notifications.tsx:91 — Notifications.Notification has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 12 (15 pts), boolean chains 6, if/else 5 (nesting depth added 3). Of this number, 17 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · codeMirror-excelLanguage.excelFormulaAutocomplete (cognitive 26) · ×1
  • codeMirror-excelLanguage.excelFormulaAutocomplete (cognitive 26) packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:599 — codeMirror-excelLanguage.excelFormulaAutocomplete has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 12 (16 pts), boolean chains 9, if/else 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 635). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useTransactionBatchActions.useTransactionBatchActions.onBatchEdit (cognitive 26) · ×1
  • useTransactionBatchActions.useTransactionBatchActions.onBatchEdit (cognitive 26) packages/desktop-client/src/hooks/useTransactionBatchActions.ts:82 — useTransactionBatchActions.useTransactionBatchActions.onBatchEdit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 6, ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 113, openFieldEditor, pushCategoryAutocompleteModal, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.handleMessage (cognitive 26) · ×1
  • index.handleMessage (cognitive 26) packages/loot-core/src/platform/client/connection/index.ts:41 — index.handleMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.matchTransactions (cognitive 26) · ×1
  • sync.matchTransactions (cognitive 26) packages/loot-core/src/server/accounts/sync.ts:837 — sync.matchTransactions has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, ternaries 3 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · goal-template.computeTemplates (cognitive 26) · ×1
  • goal-template.computeTemplates (cognitive 26) packages/loot-core/src/server/budget/goal-template.ts:245 — goal-template.computeTemplates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (4 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · enforceConsistentDependencies (cognitive 26) · ×1
  • enforceConsistentDependencies (cognitive 26) yarn.config.cjs:13 — enforceConsistentDependencies has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 6 (12 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CalculatorAmountInput.CalculatorAmountInput (cognitive 25) · ×1
  • CalculatorAmountInput.CalculatorAmountInput (cognitive 25) packages/desktop-client/src/components/mobile/transactions/CalculatorAmountInput.tsx:68 — CalculatorAmountInput.CalculatorAmountInput has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12, boolean chains 7, ternaries 6. Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 159, a function literal at line 118, valueIsNegative, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Themes.ThemeSettings (cognitive 25) · ×1
  • Themes.ThemeSettings (cognitive 25) packages/desktop-client/src/components/settings/Themes.tsx:41 — Themes.ThemeSettings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 118, 164, 63, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ApiKeyModal.ApiKeyModal (cognitive 25) · ×1
  • ApiKeyModal.ApiKeyModal (cognitive 25) packages/desktop-client/src/components/modals/ApiKeyModal.tsx:17 — ApiKeyModal.ApiKeyModal has cognitive complexity 25 (threshold 15). Drivers by points: ternaries 8 (12 pts), if/else 5 (7 pts), boolean chains 5, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 58, submit, a function literal at line 69). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ScheduleEditModal.ScheduleEditModal (cognitive 25) · ×1
  • ScheduleEditModal.ScheduleEditModal (cognitive 25) packages/desktop-client/src/components/schedules/ScheduleEditModal.tsx:32 — ScheduleEditModal.ScheduleEditModal has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 9 (11 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (onSave, a function literal at line 41, a function literal at line 218, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PayeeTableRow.PayeeTableRow (cognitive 25) · ×1
  • PayeeTableRow.PayeeTableRow (cognitive 25) packages/desktop-client/src/components/payees/PayeeTableRow.tsx:92 — PayeeTableRow.PayeeTableRow has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 12, ternaries 9 (12 pts), if/else 1 (nesting depth added 3). Of this number, 17 points are the body's own statements and 8 belong to 6 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · useFormat.useFormat (cognitive 25) · ×1
  • useFormat.useFormat (cognitive 25) packages/desktop-client/src/hooks/useFormat.ts:105 — useFormat.useFormat has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, ternaries 4 (5 pts) (nesting depth added 2). None of this is in the body itself: all 25 points belong to 5 function literals inside it that branch (lines 162, 235, 136, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BudgetAnalysis.BudgetAnalysisInternal (cognitive 24) · ×1
  • BudgetAnalysis.BudgetAnalysisInternal (cognitive 24) packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:145 — BudgetAnalysis.BudgetAnalysisInternal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 8, ternaries 7 (8 pts), if/else 7, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 203, onExportCsv, onSaveWidgetName, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · BudgetFileSelection.BudgetFileSelection (cognitive 24) · ×1
  • BudgetFileSelection.BudgetFileSelection (cognitive 24) packages/desktop-client/src/components/manager/BudgetFileSelection.tsx:535 — BudgetFileSelection.BudgetFileSelection has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 9, ternaries 3, error handling 1 (nesting depth added 1). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 7 function items inside it that branch (onSelect, a function literal at line 652, a function literal at line 556, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · migrateTemplatesToAutomations.migrateTemplatesToAutomations (cognitive 24) · ×1
  • migrateTemplatesToAutomations.migrateTemplatesToAutomations (cognitive 24) packages/desktop-client/src/components/modals/BudgetAutomationsModal/migrateTemplatesToAutomations.ts:70 — migrateTemplatesToAutomations.migrateTemplatesToAutomations has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 3 (8 pts), boolean chains 6 (nesting depth added 9). None of this is in the body itself: all 24 points belong to one function literal inside it that branches (line 76). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · codeMirror-excelLanguage.getActiveFunctionArgumentContext (cognitive 24) · ×1
  • codeMirror-excelLanguage.getActiveFunctionArgumentContext (cognitive 24) packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:464 — codeMirror-excelLanguage.getActiveFunctionArgumentContext has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), ternaries 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · budgetDataQuery.filterCategoriesByConditions · ×1
  • budgetDataQuery.filterCategoriesByConditions::evaluateCondition (cognitive 24) REDACTED:114 — budgetDataQuery.filterCategoriesByConditions::evaluateCondition has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 5 (8 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.downloadSimpleFinTransactions (cognitive 24) · ×1
  • sync.downloadSimpleFinTransactions (cognitive 24) packages/loot-core/src/server/accounts/sync.ts:189 — sync.downloadSimpleFinTransactions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (5 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.normalizeBankSyncTransactions (cognitive 24) · ×1
  • sync.normalizeBankSyncTransactions (cognitive 24) packages/loot-core/src/server/accounts/sync.ts:516 — sync.normalizeBankSyncTransactions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (7 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sync.processBankSyncDownload (cognitive 24) · ×1
  • sync.processBankSyncDownload (cognitive 24) packages/loot-core/src/server/accounts/sync.ts:1108 — sync.processBankSyncDownload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 5 (11 pts), boolean chains 1 (nesting depth added 8). Of this number, 15 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · forecast-filters.evaluateClause (cognitive 24) · ×1
  • forecast-filters.evaluateClause (cognitive 24) packages/loot-core/src/server/forecast/forecast-filters.ts:161 — forecast-filters.evaluateClause has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 17, if/else 3 (4 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 176). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · undo.undoMessage (cognitive 24) · ×1
  • undo.undoMessage (cognitive 24) packages/loot-core/src/server/undo.ts:161 — undo.undoMessage has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · forecast-contributors.summarizeForecastContributors (cognitive 24) · ×1
  • forecast-contributors.summarizeForecastContributors (cognitive 24) packages/loot-core/src/shared/forecast-contributors.ts:32 — forecast-contributors.summarizeForecastContributors has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AgeOfMoney.AgeOfMoneyInner (cognitive 23) · ×1
  • AgeOfMoney.AgeOfMoneyInner (cognitive 23) packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx:69 — AgeOfMoney.AgeOfMoneyInner has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (12 pts), boolean chains 6, if/else 5 (nesting depth added 2). Of this number, 13 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · NetWorth.NetWorthInner (cognitive 23) · ×1
  • NetWorth.NetWorthInner (cognitive 23) packages/desktop-client/src/components/reports/reports/NetWorth.tsx:69 — NetWorth.NetWorthInner has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, ternaries 7 (8 pts), if/else 7 (nesting depth added 1). Most of this is not in the body itself: 11 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 159, onSaveWidgetName, a function literal at line 76, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AccountRow.AccountRow (cognitive 23) · ×1
  • AccountRow.AccountRow (cognitive 23) packages/desktop-client/src/components/sidebar/redesign/AccountRow.tsx:39 — AccountRow.AccountRow has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts), ternaries 7 (nesting depth added 2). Of this number, 13 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BalanceHistoryGraph.BalanceHistoryGraph (cognitive 23) · ×1
  • BalanceHistoryGraph.BalanceHistoryGraph (cognitive 23) packages/desktop-client/src/components/accounts/BalanceHistoryGraph.tsx:30 — BalanceHistoryGraph.BalanceHistoryGraph has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 4 (5 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 23 points belong to 8 function literals inside it that branch (lines 206, 161, 51, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · AllAccountTransactions.TransactionListWithPreviews (cognitive 23) · ×1
  • AllAccountTransactions.TransactionListWithPreviews (cognitive 23) packages/desktop-client/src/components/mobile/accounts/AllAccountTransactions.tsx:44 — AllAccountTransactions.TransactionListWithPreviews has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 6 (9 pts), boolean chains 4 (nesting depth added 5). Of this number, 12 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CalendarGraph.CalendarGraph (cognitive 23) · ×1
  • CalendarGraph.CalendarGraph (cognitive 23) packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx:38 — CalendarGraph.CalendarGraph has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 4 (8 pts), boolean chains 4 (nesting depth added 9). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 108, 58, 205, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · budgetDataQuery.fetchBudgetData (cognitive 23) · ×1
  • budgetDataQuery.fetchBudgetData (cognitive 23) REDACTED:189 — budgetDataQuery.fetchBudgetData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 4 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sankey-spreadsheet.createTransactionsGraph (cognitive 23) · ×1
  • sankey-spreadsheet.createTransactionsGraph (cognitive 23) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:856 — sankey-spreadsheet.createTransactionsGraph has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4 (nesting depth added 8). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 877, addAccountNode). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DateSelect.DateSelectDesktop · ×1
  • DateSelect.DateSelectDesktop::onKeyDown (cognitive 23) packages/desktop-client/src/components/select/DateSelect.tsx:391 — DateSelect.DateSelectDesktop::onKeyDown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · template-notes.getCategoriesWithTemplates (cognitive 23) · ×1
  • template-notes.getCategoriesWithTemplates (cognitive 23) packages/loot-core/src/server/budget/template-notes.ts:72 — template-notes.getCategoriesWithTemplates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 3 (4 pts), error handling 1 (nesting depth added 5). None of this is in the body itself: all 23 points belong to 2 function literals inside it that branch (lines 89, 78). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ynab4.importCategories (cognitive 23) · ×1
  • ynab4.importCategories (cognitive 23) packages/loot-core/src/server/importers/ynab4.ts:40 — ynab4.importCategories has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 15). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 48). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · merge.mergeTransactionsNoTransfer (cognitive 23) · ×1
  • merge.mergeTransactionsNoTransfer (cognitive 23) packages/loot-core/src/server/transactions/merge.ts:110 — merge.mergeTransactionsNoTransfer has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 pts), loops 1 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · app-sync.app.post("/upload-user-file") (cognitive 23) · ×1
  • app-sync.app.post("/upload-user-file") (cognitive 23) REDACTED:327 — app-sync.app.post("/upload-user-file") has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, error handling 2, ternaries 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · query.buildQueryFromFlags (cognitive 22) · ×1
  • query.buildQueryFromFlags (cognitive 22) packages/cli/src/commands/query.ts:144 — query.buildQueryFromFlags has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.FloatableSidebar (cognitive 22) · ×1
  • index.FloatableSidebar (cognitive 22) packages/desktop-client/src/components/sidebar/index.tsx:14 — index.FloatableSidebar has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 10 (19 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConfigServer.ConfigServer (cognitive 22) · ×1
  • ConfigServer.ConfigServer (cognitive 22) packages/desktop-client/src/components/manager/ConfigServer.tsx:284 — ConfigServer.ConfigServer has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 7, match/switch 1. Of this number, 12 points are the body's own statements and 10 belong to 5 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · BudgetAutomationsModal.BudgetAutomationsModal (cognitive 22) · ×1
  • BudgetAutomationsModal.BudgetAutomationsModal (cognitive 22) packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsModal.tsx:26 — BudgetAutomationsModal.BudgetAutomationsModal has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 6). Of this number, 12 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloseAccountModal.CloseAccountModal (cognitive 22) · ×1
  • CloseAccountModal.CloseAccountModal (cognitive 22) packages/desktop-client/src/components/modals/CloseAccountModal.tsx:47 — CloseAccountModal.CloseAccountModal has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, if/else 6 (7 pts), ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 8 function items inside it that branch (submit, a function literal at line 180, a function literal at line 258, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · table.CellButton (cognitive 22) · ×1
  • table.CellButton (cognitive 22) packages/desktop-client/src/components/table.tsx:540 — table.CellButton has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (15 pts), if/else 3 (5 pts), boolean chains 2 (nesting depth added 8). Of this number, 15 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FiltersMenu.ConfigureField (cognitive 22) · ×1
  • FiltersMenu.ConfigureField (cognitive 22) packages/desktop-client/src/components/filters/FiltersMenu.tsx:91 — FiltersMenu.ConfigureField has cognitive complexity 22 (threshold 15). Drivers by points: if/else 41 (57 pts), boolean chains 44, ternaries 10 (20 pts), loops 3 (7 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FiltersMenu.ConfigureField::resolveTextToId, FiltersMenu.ConfigureField::setOp) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AccountTransactions.TransactionListWithPreviews (cognitive 22) · ×1
  • AccountTransactions.TransactionListWithPreviews (cognitive 22) packages/desktop-client/src/components/mobile/accounts/AccountTransactions.tsx:63 — AccountTransactions.TransactionListWithPreviews has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 6. Of this number, 12 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ReportSummary.ReportSummary (cognitive 22) · ×1
  • ReportSummary.ReportSummary (cognitive 22) packages/desktop-client/src/components/reports/ReportSummary.tsx:31 — ReportSummary.ReportSummary has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · columns.parseTransactionTableColumns (cognitive 22) · ×1
  • columns.parseTransactionTableColumns (cognitive 22) packages/desktop-client/src/components/transactions/table/columns.ts:98 — columns.parseTransactionTableColumns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionsTable.StatusCell (cognitive 22) · ×1
  • TransactionsTable.StatusCell (cognitive 22) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:482 — TransactionsTable.StatusCell has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (18 pts), boolean chains 3, if/else 1 (nesting depth added 10). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · useDragDrop.useDrop (cognitive 22) · ×1
  • useDragDrop.useDrop (cognitive 22) packages/desktop-client/src/hooks/useDragDrop.tsx:289 — useDragDrop.useDrop has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, ternaries 6, boolean chains 5, error handling 1. Of this number, 14 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useFormulaExecution.getCategoriesFromConditions (cognitive 22) · ×1
  • useFormulaExecution.getCategoriesFromConditions (cognitive 22) packages/desktop-client/src/hooks/useFormulaExecution.ts:463 — useFormulaExecution.getCategoriesFromConditions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 1 (2 pts), loops 1 (2 pts), ternaries 2, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 487, 471, 484, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · WorkerBridge._onSharedMessage (cognitive 22) · ×1
  • WorkerBridge._onSharedMessage (cognitive 22) packages/loot-core/src/platform/client/browser-preload/worker-bridge.ts:178 — WorkerBridge._onSharedMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Action.executeFormulaSync (cognitive 22) · ×1
  • Action.executeFormulaSync (cognitive 22) packages/loot-core/src/server/rules/action.ts:308 — Action.executeFormulaSync has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, error handling 2, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.init (cognitive 22) · ×1
  • main.init (cognitive 22) packages/loot-core/src/server/main.ts:323 — main.init has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app-cors-proxy.app.use("/") (cognitive 22) · ×1
  • app-cors-proxy.app.use("/") (cognitive 22) REDACTED:124 — app-cors-proxy.app.use("/") has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 7, error handling 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) REDACTED:124 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 7, error handling 4 (5 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · accountTreeMoves.computeAccountMove (cognitive 21) · ×1
  • accountTreeMoves.computeAccountMove (cognitive 21) packages/desktop-client/src/components/sidebar/redesign/accountTreeMoves.ts:23 — accountTreeMoves.computeAccountMove has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 5). Of this number, 18 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditFieldModal.EditFieldModal (cognitive 21) · ×1
  • EditFieldModal.EditFieldModal (cognitive 21) packages/desktop-client/src/components/modals/EditFieldModal.tsx:51 — EditFieldModal.EditFieldModal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 7, match/switch 1, ternaries 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 5 function items inside it that branch (onSelect, a function literal at line 301, onSelectNote, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ActionExpression.ActionExpression (cognitive 21) · ×1
  • ActionExpression.ActionExpression (cognitive 21) packages/desktop-client/src/components/rules/ActionExpression.tsx:31 — ActionExpression.ActionExpression has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (21 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · reducer.changeType (cognitive 21) · ×1
  • reducer.changeType (cognitive 21) packages/desktop-client/src/components/budget/goals/reducer.ts:103 — reducer.changeType has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · TransactionList.SelectedTransactionsFloatingActionBar (cognitive 21) · ×1
  • TransactionList.SelectedTransactionsFloatingActionBar (cognitive 21) packages/desktop-client/src/components/mobile/transactions/TransactionList.tsx:285 — TransactionList.SelectedTransactionsFloatingActionBar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 4, match/switch 2. Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 607, 368, 296, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · net-worth-spreadsheet.recalculate.graphData (cognitive 21) · ×1
  • net-worth-spreadsheet.recalculate.graphData (cognitive 21) packages/desktop-client/src/components/reports/spreadsheets/net-worth-spreadsheet.ts:418 — net-worth-spreadsheet.recalculate.graphData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, ternaries 5 (8 pts), boolean chains 4 (nesting depth added 3). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sankey-spreadsheet.filterCategoryGroups · ×1
  • sankey-spreadsheet.filterCategoryGroups::matchesStringCondition (cognitive 21) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:443 — sankey-spreadsheet.filterCategoryGroups::matchesStringCondition has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · sankey-spreadsheet.ensureCategoryGroupsFollowAccountLayers (cognitive 21) · ×1
  • sankey-spreadsheet.ensureCategoryGroupsFollowAccountLayers (cognitive 21) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1754 — sankey-spreadsheet.ensureCategoryGroupsFollowAccountLayers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · linkParser.parseNotes (cognitive 21) · ×1
  • linkParser.parseNotes (cognitive 21) packages/desktop-client/src/notes/linkParser.ts:117 — linkParser.parseNotes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cloud-storage.importBuffer (cognitive 21) · ×1
  • cloud-storage.importBuffer (cognitive 21) packages/loot-core/src/server/cloud-storage.ts:212 — cloud-storage.importBuffer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 2 (3 pts), error handling 2 (nesting depth added 5). Of this number, 19 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · base.triggerBudgetChanges (cognitive 21) · ×1
  • base.triggerBudgetChanges (cognitive 21) packages/loot-core/src/server/budget/base.ts:280 — base.triggerBudgetChanges has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 293). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ynab4.importTransactions (cognitive 21) · ×1
  • ynab4.importTransactions (cognitive 21) packages/loot-core/src/server/importers/ynab4.ts:141 — ynab4.importTransactions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, loops 2 (4 pts), ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 192, getCategory, a function literal at line 199, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · account-db.bootstrap (cognitive 21) · ×1
  • account-db.bootstrap (cognitive 21) packages/sync-server/src/account-db.js:86 — account-db.bootstrap has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, error handling 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · mutations.useSyncAccountsMutation (cognitive 20) · ×1
  • mutations.useSyncAccountsMutation (cognitive 20) packages/desktop-client/src/accounts/mutations.ts:596 — mutations.useSyncAccountsMutation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 5). None of this is in the body itself: all 20 points belong to 5 function literals inside it that branch (lines 605, 650, 626, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Modal.Modal (cognitive 20) · ×1
  • Modal.Modal (cognitive 20) packages/desktop-client/src/components/common/Modal.tsx:106 — Modal.Modal has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8, boolean chains 6, if/else 6. Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 227, handleOnClose, handleOnClose::finishClose, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · FatalError.FatalError (cognitive 20) · ×1
  • FatalError.FatalError (cognitive 20) packages/desktop-client/src/components/FatalError.tsx:330 — FatalError.FatalError has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 7 (11 pts), boolean chains 7, if/else 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransactionEdit.Footer (cognitive 20) · ×1
  • TransactionEdit.Footer (cognitive 20) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:255 — TransactionEdit.Footer has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 9). Of this number, 15 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sidebarMenu.parseSidebarMenuItems (cognitive 20) · ×1
  • sidebarMenu.parseSidebarMenuItems (cognitive 20) packages/desktop-client/src/components/sidebar/sidebarMenu.ts:64 — sidebarMenu.parseSidebarMenuItems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.parseAmountFields (cognitive 20) · ×1
  • utils.parseAmountFields (cognitive 20) packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts:206 — utils.parseAmountFields has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RuleRow.RuleRow (cognitive 20) · ×1
  • RuleRow.RuleRow (cognitive 20) packages/desktop-client/src/components/rules/RuleRow.tsx:35 — RuleRow.RuleRow has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 9 (nesting depth added 3). Of this number, 10 points are the body's own statements and 10 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SidebarGroup.SidebarGroup (cognitive 20) · ×1
  • SidebarGroup.SidebarGroup (cognitive 20) packages/desktop-client/src/components/budget/SidebarGroup.tsx:48 — SidebarGroup.SidebarGroup has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (6 pts), ternaries 1 (nesting depth added 1). Of this number, 14 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · useScheduleEdit.useScheduleEdit (cognitive 20) · ×1
  • useScheduleEdit.useScheduleEdit (cognitive 20) packages/desktop-client/src/hooks/useScheduleEdit.ts:244 — useScheduleEdit.useScheduleEdit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 307, 360, 335, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · coordinator.createCoordinator.onconnect (cognitive 20) · ×1
  • coordinator.createCoordinator.onconnect (cognitive 20) packages/loot-core/src/platform/client/browser-server/coordinator.ts:546 — coordinator.createCoordinator.onconnect has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 20. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · engine.sqljs.legacy.openDatabase (cognitive 20) · ×1
  • engine.sqljs.legacy.openDatabase (cognitive 20) packages/loot-core/src/platform/server/sqlite/engine.sqljs.legacy.ts:168 — engine.sqljs.legacy.openDatabase has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), error handling 1 (4 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · app.closeAccount (cognitive 20) · ×1
  • app.closeAccount (cognitive 20) packages/loot-core/src/server/accounts/app.ts:596 — app.closeAccount has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3 (nesting depth added 7). None of this is in the body itself: all 20 points belong to 2 function literals inside it that branch (lines 612, 654). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.compareMessages (cognitive 20) · ×1
  • index.compareMessages (cognitive 20) packages/loot-core/src/server/sync/index.ts:294 — index.compareMessages has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sort.shoveSortOrdersDescending (cognitive 20) · ×1
  • sort.shoveSortOrdersDescending (cognitive 20) packages/loot-core/src/server/db/sort.ts:111 — sort.shoveSortOrdersDescending has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 5). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CategoryTemplateContext.runBy (cognitive 20) · ×1
  • CategoryTemplateContext.runBy (cognitive 20) packages/loot-core/src/server/budget/category-template-context.ts:919 — CategoryTemplateContext.runBy has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 5, ternaries 2 (5 pts), loops 3 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.updateSchedule (cognitive 20) · ×1
  • app.updateSchedule (cognitive 20) packages/loot-core/src/server/schedules/app.ts:404 — app.updateSchedule has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransferOwnership.TransferOwnership (cognitive 19) · ×1
  • TransferOwnership.TransferOwnership (cognitive 19) packages/desktop-client/src/components/modals/TransferOwnership.tsx:31 — TransferOwnership.TransferOwnership has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 2 (3 pts), error handling 1 (nesting depth added 2). None of this is in the body itself: all 19 points belong to 7 function items inside it that branch (onSave, a function literal at line 102, a function literal at line 51, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · FiltersMenu.FilterButton · ×1
  • FiltersMenu.FilterButton::onValidateAndApply (cognitive 19) packages/desktop-client/src/components/filters/FiltersMenu.tsx:664 — FiltersMenu.FilterButton::onValidateAndApply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MobileRuleEditPage.MobileRuleEditPage (cognitive 19) · ×1
  • MobileRuleEditPage.MobileRuleEditPage (cognitive 19) packages/desktop-client/src/components/mobile/rules/MobileRuleEditPage.tsx:22 — MobileRuleEditPage.MobileRuleEditPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 9 of the 19 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 52, a function literal at line 56, handleDelete, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MonteCarloRunDetailTable.MonteCarloRunDetailTable (cognitive 19) · ×1
  • MonteCarloRunDetailTable.MonteCarloRunDetailTable (cognitive 19) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:76 — MonteCarloRunDetailTable.MonteCarloRunDetailTable has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 47, if/else 30 (37 pts), ternaries 15 (21 pts), loops 1 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: one other method here (MonteCarloRunDetailTable.MonteCarloRunDetailTable::getRuleExplanationSentence) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · app.getBankSyncStatusFromError (cognitive 19) · ×1
  • app.getBankSyncStatusFromError (cognitive 19) packages/loot-core/src/server/accounts/app.ts:1397 — app.getBankSyncStatusFromError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compiler.compileOp (cognitive 19) · ×1
  • compiler.compileOp (cognitive 19) packages/loot-core/src/server/aql/compiler.ts:647 — compiler.compileOp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 8). Of this number, 11 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · compiler.compileQuery (cognitive 19) · ×1
  • compiler.compileQuery (cognitive 19) packages/loot-core/src/server/aql/compiler.ts:1080 — compiler.compileQuery has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, error handling 1, loops 1, ternaries 1 (nesting depth added 5). Of this number, 12 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · executors.execTransactionsGrouped (cognitive 19) · ×1
  • executors.execTransactionsGrouped (cognitive 19) packages/loot-core/src/server/aql/schema/executors.ts:97 — executors.execTransactionsGrouped has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 7 (8 pts), boolean chains 2 (nesting depth added 5). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app-simplefin.getAccounts (cognitive 19) · ×1
  • app-simplefin.getAccounts (cognitive 19) REDACTED:462 — app-simplefin.getAccounts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · createOnce.isInsideTrans (cognitive 19) · ×1
  • createOnce.isInsideTrans (cognitive 19) packages/eslint-plugin-actual/lib/rules/no-untranslated-strings.js:50 — createOnce.isInsideTrans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 5, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · (anonymous) (cognitive 19) · ×1
  • (anonymous) (cognitive 19) REDACTED:153 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 4 (5 pts), boolean chains 2, loops 1 (2 pts), error handling 1 (nesting depth added 3). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · getAccountResponse (cognitive 19) · ×1
  • getAccountResponse (cognitive 19) REDACTED:233 — getAccountResponse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 1, loops 1, other 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CashFlow.CashFlowInner (cognitive 18) · ×1
  • CashFlow.CashFlowInner (cognitive 18) packages/desktop-client/src/components/reports/reports/CashFlow.tsx:70 — CashFlow.CashFlowInner has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 5, if/else 4 (nesting depth added 1). Of this number, 9 points are the body's own statements and 9 belong to 4 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Formula.FormulaInner (cognitive 18) · ×1
  • Formula.FormulaInner (cognitive 18) packages/desktop-client/src/components/reports/reports/Formula.tsx:56 — Formula.FormulaInner has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 4 (5 pts), if/else 2 (nesting depth added 1). Of this number, 13 points are the body's own statements and 5 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CalendarCard.CalendarCardInner (cognitive 18) · ×1
  • CalendarCard.CalendarCardInner (cognitive 18) packages/desktop-client/src/components/reports/reports/CalendarCard.tsx:337 — CalendarCard.CalendarCardInner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 3 (nesting depth added 3). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 364, 532, 374, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · RepairTransactions.useRenderResults.renderResults (cognitive 18) · ×1
  • RepairTransactions.useRenderResults.renderResults (cognitive 18) packages/desktop-client/src/components/settings/RepairTransactions.tsx:19 — RepairTransactions.useRenderResults.renderResults has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · useBudgetAutomationsEditor.useBudgetAutomationsEditor (cognitive 18) · ×1
  • useBudgetAutomationsEditor.useBudgetAutomationsEditor (cognitive 18) packages/desktop-client/src/components/modals/BudgetAutomationsModal/useBudgetAutomationsEditor.ts:63 — useBudgetAutomationsEditor.useBudgetAutomationsEditor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (6 pts), error handling 1, ternaries 1 (nesting depth added 7). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchedulesTable.SchedulesTable (cognitive 18) · ×1
  • SchedulesTable.SchedulesTable (cognitive 18) packages/desktop-client/src/components/schedules/SchedulesTable.tsx:294 — SchedulesTable.SchedulesTable has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 3. Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 325, a function literal at line 352, a function literal at line 319, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · updateFilterReducer.updateFilterReducer (cognitive 18) · ×1
  • updateFilterReducer.updateFilterReducer (cognitive 18) packages/desktop-client/src/components/filters/updateFilterReducer.ts:4 — updateFilterReducer.updateFilterReducer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ManagePayees.ManagePayees (cognitive 18) · ×1
  • ManagePayees.ManagePayees (cognitive 18) packages/desktop-client/src/components/payees/ManagePayees.tsx:70 — ManagePayees.ManagePayees has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, ternaries 3 (4 pts), boolean chains 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 86, a function literal at line 112, onFavorite, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AreaGraph.AreaGraph (cognitive 18) · ×1
  • AreaGraph.AreaGraph (cognitive 18) packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:203 — AreaGraph.AreaGraph has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, ternaries 4, if/else 3. Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 269, gradientOffset, tickFormatter, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · ChooseGraph.ChooseGraph (cognitive 18) · ×1
  • ChooseGraph.ChooseGraph (cognitive 18) packages/desktop-client/src/components/reports/ChooseGraph.tsx:38 — ChooseGraph.ChooseGraph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 5, ternaries 3. Of this number, 11 points are the body's own statements and 7 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · reportRanges.calculateTimeRange (cognitive 18) · ×1
  • reportRanges.calculateTimeRange (cognitive 18) packages/desktop-client/src/components/reports/reportRanges.ts:266 — reportRanges.calculateTimeRange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NetWorthGraph.NetWorthGraph (cognitive 18) · ×1
  • NetWorthGraph.NetWorthGraph (cognitive 18) packages/desktop-client/src/components/reports/graphs/NetWorthGraph.tsx:245 — NetWorthGraph.NetWorthGraph has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 2. Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 353, gradientOffset, a function literal at line 297, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SpendingGraph.SpendingGraph (cognitive 18) · ×1
  • SpendingGraph.SpendingGraph (cognitive 18) packages/desktop-client/src/components/reports/graphs/SpendingGraph.tsx:157 — SpendingGraph.SpendingGraph has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 7, ternaries 5 (6 pts), if/else 5 (nesting depth added 1). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 9 function items inside it that branch (gradientOffset, getVal, a function literal at line 231, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · monteCarloYearStory.getRuleDecisionSentence (cognitive 18) · ×1
  • monteCarloYearStory.getRuleDecisionSentence (cognitive 18) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloYearStory.ts:145 — monteCarloYearStory.getRuleDecisionSentence has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (3 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · calculateLegend.calculateLegend · ×1
  • calculateLegend.calculateLegend::getColor (cognitive 18) packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts:28 — calculateLegend.calculateLegend::getColor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · calendar-spreadsheet.recalculate.getDaysArray (cognitive 18) · ×1
  • calendar-spreadsheet.recalculate.getDaysArray (cognitive 18) packages/desktop-client/src/components/reports/spreadsheets/calendar-spreadsheet.ts:173 — calendar-spreadsheet.recalculate.getDaysArray has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 5 (7 pts), boolean chains 3, loops 1 (nesting depth added 3). Of this number, 9 points are the body's own statements and 9 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sankey-spreadsheet.moveToOther (cognitive 18) · ×1
  • sankey-spreadsheet.moveToOther (cognitive 18) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1247 — sankey-spreadsheet.moveToOther has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 pts) (nesting depth added 7). Of this number, 12 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sankey-spreadsheet.getNodeValue (cognitive 18) · ×1
  • sankey-spreadsheet.getNodeValue (cognitive 18) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1541 — sankey-spreadsheet.getNodeValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (18 pts) (nesting depth added 10). Of this number, 9 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RuleEditor.ConditionEditor (cognitive 18) · ×1
  • RuleEditor.ConditionEditor (cognitive 18) packages/desktop-client/src/components/rules/RuleEditor.tsx:296 — RuleEditor.ConditionEditor has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 2 (nesting depth added 1). Of this number, 16 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TagRow.TagRow (cognitive 18) · ×1
  • TagRow.TagRow (cognitive 18) packages/desktop-client/src/components/tags/TagRow.tsx:40 — TagRow.TagRow has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 10 (11 pts), boolean chains 5, if/else 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · useTransactionRowContextActions.useTransactionRowContextActions (cognitive 18) · ×1
  • useTransactionRowContextActions.useTransactionRowContextActions (cognitive 18) packages/desktop-client/src/components/transactions/useTransactionRowContextActions.ts:36 — useTransactionRowContextActions.useTransactionRowContextActions has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 11, if/else 5, ternaries 2. Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (onViewSchedule, a function literal at line 121, a function literal at line 52, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · TransactionsTable.PayeeCell (cognitive 18) · ×1
  • TransactionsTable.PayeeCell (cognitive 18) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:653 — TransactionsTable.PayeeCell has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 2 (4 pts), boolean chains 3 (nesting depth added 7). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 793, 803, 809, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · coordinator.createCoordinator.resumePort (cognitive 18) · ×1
  • coordinator.createCoordinator.resumePort (cognitive 18) packages/loot-core/src/platform/client/browser-server/coordinator.ts:171 — coordinator.createCoordinator.resumePort has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.runFullSync (cognitive 18) · ×1
  • index.runFullSync (cognitive 18) packages/loot-core/src/server/sync/index.ts:892 — index.runFullSync has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cloud-storage.upload (cognitive 18) · ×1
  • cloud-storage.upload (cognitive 18) packages/loot-core/src/server/cloud-storage.ts:298 — cloud-storage.upload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · schema-helpers.convertInputType (cognitive 18) · ×1
  • schema-helpers.convertInputType (cognitive 18) packages/loot-core/src/server/aql/schema-helpers.ts:11 — schema-helpers.convertInputType has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.getBudgets (cognitive 18) · ×1
  • app.getBudgets (cognitive 18) REDACTED:116 — app.getBudgets has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (12 pts), if/else 2 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 10). None of this is in the body itself: all 18 points belong to one function literal inside it that branches (line 119). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · app.loadGlobalPrefs (cognitive 18) · ×1
  • app.loadGlobalPrefs (cognitive 18) packages/loot-core/src/server/preferences/app.ts:151 — app.loadGlobalPrefs has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 14, ternaries 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · qif2json.qif2json (cognitive 18) · ×1
  • qif2json.qif2json (cognitive 18) packages/loot-core/src/server/transactions/import/qif2json.ts:22 — qif2json.qif2json has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · customThemes.splitDeclarations (cognitive 17) · ×1
  • customThemes.splitDeclarations (cognitive 17) packages/desktop-client/src/style/customThemes.ts:307 — customThemes.splitDeclarations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Login.OpenIdLogin (cognitive 17) · ×1
  • Login.OpenIdLogin (cognitive 17) packages/desktop-client/src/components/manager/subscribe/Login.tsx:111 — Login.OpenIdLogin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 8 (nesting depth added 1). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (onSubmitOpenId, onSetOpenId, a function literal at line 138, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Login.Login (cognitive 17) · ×1
  • Login.Login (cognitive 17) packages/desktop-client/src/components/manager/subscribe/Login.tsx:316 — Login.Login has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 7, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 338, a function literal at line 336, getErrorMessage). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AutomationEditorPane.AutomationEditorPane (cognitive 17) · ×1
  • AutomationEditorPane.AutomationEditorPane (cognitive 17) packages/desktop-client/src/components/modals/BudgetAutomationsModal/AutomationEditorPane.tsx:106 — AutomationEditorPane.AutomationEditorPane has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 4, ternaries 3 (4 pts), match/switch 1 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · table.Cell (cognitive 17) · ×1
  • table.Cell (cognitive 17) packages/desktop-client/src/components/table.tsx:167 — table.Cell has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (11 pts), if/else 1 (4 pts), boolean chains 2 (nesting depth added 8). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 203, 235). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PayeeAutocomplete.PayeeList (cognitive 17) · ×1
  • PayeeAutocomplete.PayeeList (cognitive 17) packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:171 — PayeeAutocomplete.PayeeList has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 5. Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 193, 190, 273, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · CategoryAutomationButton.CategoryAutomationButton (cognitive 17) · ×1
  • CategoryAutomationButton.CategoryAutomationButton (cognitive 17) packages/desktop-client/src/components/budget/goals/CategoryAutomationButton.tsx:74 — CategoryAutomationButton.CategoryAutomationButton has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 3, ternaries 2, loops 1. Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SidebarCategory.SidebarCategory (cognitive 17) · ×1
  • SidebarCategory.SidebarCategory (cognitive 17) packages/desktop-client/src/components/budget/SidebarCategory.tsx:46 — SidebarCategory.SidebarCategory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, ternaries 2 (nesting depth added 2). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MobileScheduleEditPage.MobileScheduleEditPage (cognitive 17) · ×1
  • MobileScheduleEditPage.MobileScheduleEditPage (cognitive 17) packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:29 — MobileScheduleEditPage.MobileScheduleEditPage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 5, boolean chains 3 (nesting depth added 1). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (onSave). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · BarGraph.BarGraph (cognitive 17) · ×1
  • BarGraph.BarGraph (cognitive 17) packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:221 — BarGraph.BarGraph has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 6, if/else 1. Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 271, getVal, a function literal at line 256, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · useSplitsExpanded.SplitsExpandedProvider (cognitive 17) · ×1
  • useSplitsExpanded.SplitsExpandedProvider (cognitive 17) packages/desktop-client/src/hooks/useSplitsExpanded.tsx:96 — useSplitsExpanded.SplitsExpandedProvider has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 103, 127, 169, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · useSwipeToDismiss.useSwipeToDismiss (cognitive 17) · ×1
  • useSwipeToDismiss.useSwipeToDismiss (cognitive 17) packages/desktop-client/src/hooks/useSwipeToDismiss.ts:23 — useSwipeToDismiss.useSwipeToDismiss has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). None of this is in the body itself: all 17 points belong to 5 function literals inside it that branch (lines 75, 101, 57, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.init (cognitive 17) · ×1
  • index.init (cognitive 17) packages/loot-core/src/platform/server/connection/index.ts:29 — index.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 39, 67, 58, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · engine.wasm.runQuery (cognitive 17) · ×1
  • engine.wasm.runQuery (cognitive 17) packages/loot-core/src/platform/server/sqlite/engine.wasm.ts:88 — engine.wasm.runQuery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (5 pts), boolean chains 1, error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · compiler.compileExpr (cognitive 17) · ×1
  • compiler.compileExpr (cognitive 17) packages/loot-core/src/server/aql/compiler.ts:487 — compiler.compileExpr has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.createBudget (cognitive 17) · ×1
  • app.createBudget (cognitive 17) REDACTED:487 — app.createBudget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.saveGlobalPrefs (cognitive 17) · ×1
  • app.saveGlobalPrefs (cognitive 17) packages/loot-core/src/server/preferences/app.ts:79 — app.saveGlobalPrefs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · app.validateRule (cognitive 17) · ×1
  • app.validateRule (cognitive 17) packages/loot-core/src/server/rules/app.ts:17 — app.validateRule has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 2 (3 pts), boolean chains 2, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 44, a function literal at line 21, runValidation). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · app.onRuleUpdate (cognitive 17) · ×1
  • app.onRuleUpdate (cognitive 17) packages/loot-core/src/server/schedules/app.ts:543 — app.onRuleUpdate has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · transaction-rules.finalizeTransactionForRules (cognitive 17) · ×1
  • transaction-rules.finalizeTransactionForRules (cognitive 17) packages/loot-core/src/server/transactions/transaction-rules.ts:1275 — transaction-rules.finalizeTransactionForRules has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts) (nesting depth added 6). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 1311). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.browser.listenForPageLifecycle (cognitive 16) · ×1
  • index.browser.listenForPageLifecycle (cognitive 16) packages/api/index.browser.ts:55 — index.browser.listenForPageLifecycle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 4 function items inside it that branch (reopenBudget, onPageShow, onVisibilityChange, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · config.validateConfigFileContent (cognitive 16) · ×1
  • config.validateConfigFileContent (cognitive 16) packages/cli/src/config.ts:70 — config.validateConfigFileContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · customThemes.validateRootContent (cognitive 16) · ×1
  • customThemes.validateRootContent (cognitive 16) packages/desktop-client/src/style/customThemes.ts:351 — customThemes.validateRootContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Modal.ModalContentContainer (cognitive 16) · ×1
  • Modal.ModalContentContainer (cognitive 16) packages/desktop-client/src/components/common/Modal.tsx:307 — Modal.ModalContentContainer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 317, 322, 342, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · LoggedInUser.LoggedInUser · ×1
  • LoggedInUser.LoggedInUser::getMenuItems (cognitive 16) packages/desktop-client/src/components/LoggedInUser.tsx:174 — LoggedInUser.LoggedInUser::getMenuItems has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TourHost.TourHost (cognitive 16) · ×1
  • TourHost.TourHost (cognitive 16) packages/desktop-client/src/components/tour/TourHost.ts:28 — TourHost.TourHost has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 3 (nesting depth added 2). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 96, handleEvent). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · AccountGroupsModal.AccountGroupsModal (cognitive 16) · ×1
  • AccountGroupsModal.AccountGroupsModal (cognitive 16) packages/desktop-client/src/components/modals/AccountGroupsModal/AccountGroupsModal.tsx:38 — AccountGroupsModal.AccountGroupsModal has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (6 pts), boolean chains 4, error handling 1 (3 pts), if/else 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 87, 131, 61). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · BudgetAutomationsBodyMobile.BudgetAutomationsBodyMobile (cognitive 16) · ×1
  • BudgetAutomationsBodyMobile.BudgetAutomationsBodyMobile (cognitive 16) packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBodyMobile.tsx:99 — BudgetAutomationsBodyMobile.BudgetAutomationsBodyMobile has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CategoryGroupMenuModal.CategoryGroupMenuModal (cognitive 16) · ×1
  • CategoryGroupMenuModal.CategoryGroupMenuModal (cognitive 16) packages/desktop-client/src/components/modals/CategoryGroupMenuModal.tsx:22 — CategoryGroupMenuModal.CategoryGroupMenuModal has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, ternaries 2 (3 pts), if/else 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 77, 61). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DuplicateFileModal.DuplicateFileModal · ×1
  • DuplicateFileModal.DuplicateFileModal::handleDuplicate (cognitive 16) packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx:68 — DuplicateFileModal.DuplicateFileModal::handleDuplicate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimpleFinInitialiseModal.SimpleFinInitialiseModal · ×1
  • SimpleFinInitialiseModal.SimpleFinInitialiseModal::onSubmit (cognitive 16) packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx:44 — SimpleFinInitialiseModal.SimpleFinInitialiseModal::onSubmit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Balance.SelectedBalance (cognitive 16) · ×1
  • Balance.SelectedBalance (cognitive 16) packages/desktop-client/src/components/accounts/Balance.tsx:63 — Balance.SelectedBalance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cleanupModel.cleanupDefToEditor (cognitive 16) · ×1
  • cleanupModel.cleanupDefToEditor (cognitive 16) packages/desktop-client/src/components/budget/goals/cleanupModel.ts:52 — cleanupModel.cleanupDefToEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FiltersMenu.FilterEditor (cognitive 16) · ×1
  • FiltersMenu.FilterEditor (cognitive 16) packages/desktop-client/src/components/filters/FiltersMenu.tsx:839 — FiltersMenu.FilterEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 871, 851). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · RulesListItem.RulesListItem (cognitive 16) · ×1
  • RulesListItem.RulesListItem (cognitive 16) packages/desktop-client/src/components/mobile/rules/RulesListItem.tsx:22 — RulesListItem.RulesListItem has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 10 (16 pts) (nesting depth added 6). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sankey-spreadsheet.getLayersByStronglyConnectedComponents · ×1
  • sankey-spreadsheet.getLayersByStronglyConnectedComponents::strongConnect (cognitive 16) packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1060 — sankey-spreadsheet.getLayersByStronglyConnectedComponents::strongConnect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TagCreationRow.TagCreationRow (cognitive 16) · ×1
  • TagCreationRow.TagCreationRow (cognitive 16) packages/desktop-client/src/components/tags/TagCreationRow.tsx:23 — TagCreationRow.TagCreationRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 5, ternaries 3. Of this number, 8 points are the body's own statements and 8 belong to 4 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TransactionsTable.TransactionTableInner · ×1
  • TransactionsTable.TransactionTableInner::renderRow (cognitive 16) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:2808 — TransactionsTable.TransactionTableInner::renderRow has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, ternaries 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · index._applyMessages (cognitive 16) · ×1
  • index._applyMessages (cognitive 16) packages/loot-core/src/server/sync/index.ts:402 — index._applyMessages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 4, loops 2 (4 pts), ternaries 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (index._applyMessages::applyInTransaction) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · schedule-template.runScheduleForecast (cognitive 16) · ×1
  • schedule-template.runScheduleForecast (cognitive 16) packages/loot-core/src/server/budget/schedule-template.ts:744 — schedule-template.runScheduleForecast has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (9 pts), boolean chains 5, if/else 1, loops 1 (nesting depth added 3). Of this number, 10 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph-data-structure.Graph (cognitive 16) · ×1
  • graph-data-structure.Graph (cognitive 16) packages/loot-core/src/server/spreadsheet/graph-data-structure.ts:2 — graph-data-structure.Graph has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 7 function items inside it that branch (topologicalSortIterable, removeEdge, removeIncomingEdges, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · rule-utils.migrateIds (cognitive 16) · ×1
  • rule-utils.migrateIds (cognitive 16) packages/loot-core/src/server/rules/rule-utils.ts:112 — rule-utils.migrateIds has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, match/switch 1 (3 pts), loops 2 (nesting depth added 6). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · app.revertStorage (cognitive 16) · ×1
  • app.revertStorage (cognitive 16) packages/loot-core/src/server/storage/app.ts:63 — app.revertStorage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · export-to-csv.exportQueryToCSV (cognitive 16) · ×1
  • export-to-csv.exportQueryToCSV (cognitive 16) packages/loot-core/src/server/transactions/export/export-to-csv.ts:69 — export-to-csv.exportQueryToCSV has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 3, if/else 1 (2 pts), loops 1 (nesting depth added 4). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 106). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · errors.handleEnableBankingError (cognitive 16) · ×1
  • errors.handleEnableBankingError (cognitive 16) packages/sync-server/src/app-enablebanking/utils/errors.ts:19 — errors.handleEnableBankingError has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 5 (6 pts), ternaries 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the repository root runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan.
R10 · Code Duplication · Duplication concentrated across 21 sibling directories (106 clone groups) · ×1
  • Duplication concentrated across 21 sibling directories (106 clone groups) packages/desktop-client/src/components/mobile/schedules/MobileScheduleEditPage.tsx:69 — 106 duplicated blocks under packages/desktop-client/src/components/ have copies in at least two of the sibling directories accounts, admin, autocomplete, banksync, budget, common (+15 more sibling(s) not listed) — 55 of them are reported below, and 51 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 106 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 106 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 106 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 11 sibling directories (30 clone groups) · ×1
  • Duplication concentrated across 11 sibling directories (30 clone groups) packages/desktop-client/src/components/schedules/ScheduleEditForm.tsx:50 — 30 duplicated blocks under packages/desktop-client/src/ have copies in at least two of the sibling directories account-groups, accounts, budget, components, hooks, notifications (+5 more sibling(s) not listed) — 16 of them are reported below, and 14 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 30 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 30 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 30 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 8 sibling directories (22 clone groups) · ×1
  • Duplication concentrated across 8 sibling directories (22 clone groups) packages/desktop-client/src/components/mobile/rules/RulesList.tsx:27 — 22 duplicated blocks under packages/desktop-client/src/components/mobile/ have copies in at least two of the sibling directories accounts, banksync, budget, payees, rules, schedules (+2 more sibling(s) not listed) — 21 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 22 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 22 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 22 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (21 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (21 clone groups) packages/api/app/query.ts:62 — 21 duplicated blocks under packages/ have copies in at least two of the sibling directories api, ci-actions, component-library, desktop-client, desktop-electron, loot-core (+1 more sibling(s) not listed) — 14 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 21 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 21 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 21 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (17 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (17 clone groups) packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353 — 17 duplicated blocks under packages/desktop-client/src/components/budget/ have copies in at least two of the sibling directories envelope, tracking — 14 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 17 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 17 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 17 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 18 sibling directories (13 clone groups) · ×1
  • Duplication concentrated across 18 sibling directories (13 clone groups) packages/loot-core/src/server/accounts/app.ts:84 — 13 duplicated blocks under packages/loot-core/src/server/ have copies in at least two of the sibling directories account-groups, accounts, admin, auth, budget, budgetfiles (+12 more sibling(s) not listed) — 5 of them are reported below, and 8 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 13 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 13 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 13 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 4 sibling directories (7 clone groups) · ×1
  • Duplication concentrated across 4 sibling directories (7 clone groups) packages/component-library/src/icons/v1/LockClosed.tsx:3 — 7 duplicated blocks under packages/component-library/src/icons/ have copies in at least two of the sibling directories logo, v0, v1, v2 — 4 of them are reported below, and 3 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 7 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 7 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 7 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (236 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (236 matched lines × 2 locations) packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:93 — packages/desktop-client/src/components/modals/EnableBankingExternalMsgModal.tsx:93 · packages/desktop-client/src/components/modals/GoCardlessExternalMsgModal.tsx:73 — the two spans are one implementation copied and then locally edited — 1122 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (177 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (177 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:27 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:27 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloLumpSums.tsx:37 — the two spans are one implementation copied and then locally edited — 1016 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (151 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (151 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:219 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:219 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloLumpSums.tsx:195 — the two spans are one implementation copied and then locally edited — 695 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (150 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (150 matched lines × 2 locations) packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:60 — packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:60 · packages/desktop-client/src/components/reports/graphs/StackedBarGraph.tsx:62 — the two spans are one implementation copied and then locally edited — 795 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (138 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (138 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:360 — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:360 · packages/desktop-client/src/components/reports/reports/BalanceForecastCard.tsx:118 — the two spans are one implementation copied and then locally edited — 645 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (130 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (130 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/CashFlow.tsx:147 — packages/desktop-client/src/components/reports/reports/CashFlow.tsx:147 · packages/desktop-client/src/components/reports/reports/Sankey.tsx:682 — the two spans are one implementation copied and then locally edited — 536 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (125 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (125 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:50 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx:50 · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloIncomeStreams.tsx:34 — the two spans are one implementation copied and then locally edited — 765 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (121 lines × 2 locations) · ×1
  • Duplicated block (121 lines × 2 locations) packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353 — packages/desktop-client/src/components/budget/envelope/EnvelopeBudgetComponents.tsx:353 · packages/desktop-client/src/components/budget/tracking/TrackingBudgetComponents.tsx:318 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block with local edits (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:76 — packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:76 · packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBodyMobile.tsx:56 — the two spans are one implementation copied and then locally edited — 501 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (116 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (116 matched lines × 2 locations) packages/loot-core/src/platform/server/fs/fs.legacy.ts:122 — packages/loot-core/src/platform/server/fs/fs.legacy.ts:122 · packages/loot-core/src/platform/server/fs/fs.web.ts:84 — the two spans are one implementation copied and then locally edited — 730 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (98 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (98 matched lines × 2 locations) packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx:56 — packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx:56 · packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx:96 — the two spans are one implementation copied and then locally edited — 444 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Wholesale file copy (95 identical lines × 2 files) · ×1
  • Wholesale file copy (95 identical lines × 2 files) packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx:1 — packages/desktop-client/src/components/mobile/accounts/OffBudgetAccountTransactions.tsx:1 · packages/desktop-client/src/components/mobile/accounts/OnBudgetAccountTransactions.tsx:1 — these 2 files are line-for-line copies of one another — 95 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Wholesale file copy (94 identical lines × 2 files) · ×1
  • Wholesale file copy (94 identical lines × 2 files) packages/loot-core/src/platform/server/fs/index.api.ts:2 — packages/loot-core/src/platform/server/fs/index.api.ts:2 · packages/loot-core/src/platform/server/fs/index.electron.ts:2 — these 2 files are line-for-line copies of one another — 94 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block (91 lines × 2 locations) · ×1
  • Duplicated block (91 lines × 2 locations) packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:134 — packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx:134 · packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx:128 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (90 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (90 matched lines × 2 locations) packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx:75 — packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx:75 · packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx:49 — the two spans are one implementation copied and then locally edited — 433 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (89 lines × 2 locations) · ×1
  • Duplicated block (89 lines × 2 locations) packages/desktop-client/src/components/reports/AccountSelector.tsx:63 — packages/desktop-client/src/components/reports/AccountSelector.tsx:63 · packages/desktop-client/src/components/reports/CategorySelector.tsx:61 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (87 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (87 matched lines × 2 locations) packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:127 — packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:127 · packages/desktop-client/src/components/reports/reports/CashFlow.tsx:52 — the two spans are one implementation copied and then locally edited — 522 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (86 lines × 2 locations) · ×1
  • Duplicated block (86 lines × 2 locations) packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:63 — packages/desktop-client/src/components/reports/graphs/AreaGraph.tsx:63 · packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:81 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (80 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (80 matched lines × 2 locations) packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx:26 — packages/desktop-client/src/components/modals/PluggyAiInitialiseModal.tsx:26 · packages/desktop-client/src/components/modals/SimpleFinInitialiseModal.tsx:25 — the two spans are one implementation copied and then locally edited — 413 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (76 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (76 matched lines × 2 locations) packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:66 — packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:66 · packages/desktop-client/src/components/modals/FixEncryptionKeyModal.tsx:59 — the two spans are one implementation copied and then locally edited — 365 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (75 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (75 matched lines × 2 locations) packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:282 — packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx:282 · packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBodyMobile.tsx:355 — the two spans are one implementation copied and then locally edited — 390 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (74 lines × 2 locations) · ×1
  • Duplicated block (74 lines × 2 locations) packages/cli/src/commands/categories.ts:8 — packages/cli/src/commands/categories.ts:8 · packages/cli/src/commands/category-groups.ts:8 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:231 — packages/desktop-client/src/components/reports/graphs/BarGraph.tsx:231 · packages/desktop-client/src/components/reports/graphs/LineGraph.tsx:170 — the two spans are one implementation copied and then locally edited — 372 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (64 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (64 matched lines × 2 locations) packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:217 — packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:217 · packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:699 — the two spans are one implementation copied and then locally edited — 512 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (64 lines × 2 locations) · ×1
  • Duplicated block (64 lines × 2 locations) packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx:32 — packages/desktop-client/src/components/modals/CategoryAutocompleteModal.tsx:32 · packages/desktop-client/src/components/modals/CategoryGroupAutocompleteModal.tsx:30 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function runMonteCarloSimulation (cyclomatic 179, cognitive 544) · ×1
  • Complex function runMonteCarloSimulation (cyclomatic 179, cognitive 544) packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1400 — runMonteCarloSimulation has cyclomatic complexity 179 and cognitive complexity 544; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onmessage (cyclomatic 89, cognitive 147) · ×1
  • Complex function onmessage (cyclomatic 89, cognitive 147) packages/loot-core/src/platform/client/browser-server/coordinator.ts:552 — onmessage has cyclomatic complexity 89 and cognitive complexity 147; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 86, cognitive 9) · ×1
  • Complex function (anonymous) (cyclomatic 86, cognitive 9) packages/desktop-client/src/components/Modals.tsx:113 — (anonymous) has cyclomatic complexity 86 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function BalanceForecastInner (cyclomatic 74, cognitive 67) · ×1
  • Complex function BalanceForecastInner (cyclomatic 74, cognitive 67) packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:94 — BalanceForecastInner has cyclomatic complexity 74 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Transaction (cyclomatic 65, cognitive 57) · ×1
  • Complex function Transaction (cyclomatic 65, cognitive 57) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1065 — Transaction has cyclomatic complexity 65 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function eval (cyclomatic 60, cognitive 80) · ×1
  • Complex function eval (cyclomatic 60, cognitive 80) REDACTED:239 — eval has cyclomatic complexity 60 and cognitive complexity 80; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderColumnCell (cyclomatic 50, cognitive 63) · ×1
  • Complex function renderColumnCell (cyclomatic 50, cognitive 63) packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1629 — renderColumnCell has cyclomatic complexity 50 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function MonteCarlo (cyclomatic 50, cognitive 48) · ×1
  • Complex function MonteCarlo (cyclomatic 50, cognitive 48) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:56 — MonteCarlo has cyclomatic complexity 50 and cognitive complexity 48; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mapConditionToActualQL (cyclomatic 45, cognitive 50) · ×1
  • Complex function mapConditionToActualQL (cyclomatic 45, cognitive 50) packages/loot-core/src/server/transactions/transaction-rules.ts:534 — mapConditionToActualQL has cyclomatic complexity 45 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ActionEditor (cyclomatic 44, cognitive 41) · ×1
  • Complex function ActionEditor (cyclomatic 44, cognitive 41) packages/desktop-client/src/components/rules/RuleEditor.tsx:524 — ActionEditor has cyclomatic complexity 44 and cognitive complexity 41; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 42, cognitive 40) · ×1
  • Complex function (anonymous) (cyclomatic 42, cognitive 40) packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:634 — (anonymous) has cyclomatic complexity 42 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function TransactionListItem (cyclomatic 42, cognitive 39) · ×1
  • Complex function TransactionListItem (cyclomatic 42, cognitive 39) packages/desktop-client/src/components/mobile/transactions/TransactionListItem.tsx:79 — TransactionListItem has cyclomatic complexity 42 and cognitive complexity 39; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 41, cognitive 45) · ×1
  • Complex function (anonymous) (cyclomatic 41, cognitive 45) packages/desktop-client/src/sync-events.ts:93 — (anonymous) has cyclomatic complexity 41 and cognitive complexity 45; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SummaryInner (cyclomatic 41, cognitive 40) · ×1
  • Complex function SummaryInner (cyclomatic 41, cognitive 40) packages/desktop-client/src/components/reports/reports/Summary.tsx:71 — SummaryInner has cyclomatic complexity 41 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function Transaction (cyclomatic 40, cognitive 37) · ×1
  • Complex function Transaction (cyclomatic 40, cognitive 37) packages/desktop-client/src/components/modals/ImportTransactionsModal/Transaction.tsx:38 — Transaction has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function recalculate (cyclomatic 39, cognitive 61) · ×1
  • Complex function recalculate (cyclomatic 39, cognitive 61) packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:214 — recalculate has cyclomatic complexity 39 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 39, cognitive 31) · ×1
  • Complex function (anonymous) (cyclomatic 39, cognitive 31) packages/loot-core/src/server/forecast/forecast-filters.ts:176 — (anonymous) has cyclomatic complexity 39 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function exec (cyclomatic 38, cognitive 78) · ×1
  • Complex function exec (cyclomatic 38, cognitive 78) packages/loot-core/src/server/rules/action.ts:99 — exec has cyclomatic complexity 38 and cognitive complexity 78; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 38, cognitive 61) · ×1
  • Complex function (anonymous) (cyclomatic 38, cognitive 61) packages/desktop-client/src/components/transactions/TransactionList.tsx:349 — (anonymous) has cyclomatic complexity 38 and cognitive complexity 61; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function ConfigureField (cyclomatic 38, cognitive 31) · ×1
  • Complex function ConfigureField (cyclomatic 38, cognitive 31) packages/desktop-client/src/components/filters/FiltersMenu.tsx:91 — ConfigureField has cyclomatic complexity 38 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function reconcileTransactions (cyclomatic 37, cognitive 59) · ×1
  • Complex function reconcileTransactions (cyclomatic 37, cognitive 59) packages/loot-core/src/server/accounts/sync.ts:641 — reconcileTransactions has cyclomatic complexity 37 and cognitive complexity 59; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function GenericInput (cyclomatic 37, cognitive 55) · ×1
  • Complex function GenericInput (cyclomatic 37, cognitive 55) packages/desktop-client/src/components/util/GenericInput.tsx:121 — GenericInput has cyclomatic complexity 37 and cognitive complexity 55; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function SpendingInternal (cyclomatic 37, cognitive 34) · ×1
  • Complex function SpendingInternal (cyclomatic 37, cognitive 34) packages/desktop-client/src/components/reports/reports/Spending.tsx:75 — SpendingInternal has cyclomatic complexity 37 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function advanceSchedulesService (cyclomatic 36, cognitive 68) · ×1
  • Complex function advanceSchedulesService (cyclomatic 36, cognitive 68) packages/loot-core/src/server/schedules/app.ts:672 — advanceSchedulesService has cyclomatic complexity 36 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function buildMonthlyOutflow (cyclomatic 36, cognitive 56) · ×1
  • Complex function buildMonthlyOutflow (cyclomatic 36, cognitive 56) packages/loot-core/src/server/budget/schedule-template.ts:361 — buildMonthlyOutflow has cyclomatic complexity 36 and cognitive complexity 56; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setOp (cyclomatic 36, cognitive 44) · ×1
  • Complex function setOp (cyclomatic 36, cognitive 44) packages/desktop-client/src/components/filters/FiltersMenu.tsx:232 — setOp has cyclomatic complexity 36 and cognitive complexity 44; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function CustomReportInner (cyclomatic 36, cognitive 32) · ×1
  • Complex function CustomReportInner (cyclomatic 36, cognitive 32) packages/desktop-client/src/components/reports/reports/CustomReport.tsx:145 — CustomReportInner has cyclomatic complexity 36 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 36, cognitive 25) · ×1
  • Complex function (anonymous) (cyclomatic 36, cognitive 25) packages/desktop-client/src/components/budget/MonthPicker.tsx:132 — (anonymous) has cyclomatic complexity 36 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function processCleanup (cyclomatic 35, cognitive 50) · ×1
  • Complex function processCleanup (cyclomatic 35, cognitive 50) packages/loot-core/src/server/budget/cleanup-template.ts:152 — processCleanup has cyclomatic complexity 35 and cognitive complexity 50; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function validateAutomation (cyclomatic 35, cognitive 47) · ×1
  • Complex function validateAutomation (cyclomatic 35, cognitive 47) packages/desktop-client/src/components/budget/goals/validateAutomation.ts:48 — validateAutomation has cyclomatic complexity 35 and cognitive complexity 47; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onImport (cyclomatic 33, cognitive 36) · ×1
  • Complex function onImport (cyclomatic 33, cognitive 36) packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:645 — onImport has cyclomatic complexity 33 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolveConfig (cyclomatic 33, cognitive 18) · ×1
  • Complex function resolveConfig (cyclomatic 33, cognitive 18) packages/cli/src/config.ts:167 — resolveConfig has cyclomatic complexity 33 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function friendlyOp (cyclomatic 32, cognitive 9) · ×1
  • Complex function friendlyOp (cyclomatic 32, cognitive 9) packages/desktop-client/src/util/rule.ts:79 — friendlyOp has cyclomatic complexity 32 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function runTemplatesForPriority (cyclomatic 31, cognitive 32) · ×1
  • Complex function runTemplatesForPriority (cyclomatic 31, cognitive 32) packages/loot-core/src/server/budget/category-template-context.ts:160 — runTemplatesForPriority has cyclomatic complexity 31 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function TransactionEditInner (cyclomatic 31, cognitive 27) · ×1
  • Complex function TransactionEditInner (cyclomatic 31, cognitive 27) packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:635 — TransactionEditInner has cyclomatic complexity 31 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function castInput (cyclomatic 30, cognitive 42) · ×1
  • Complex function castInput (cyclomatic 30, cognitive 42) packages/loot-core/src/server/aql/compiler.ts:246 — castInput has cyclomatic complexity 30 and cognitive complexity 42; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function templateToLine (cyclomatic 30, cognitive 34) · ×1
  • Complex function templateToLine (cyclomatic 30, cognitive 34) packages/loot-core/src/server/budget/template-notes.ts:169 — templateToLine has cyclomatic complexity 30 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 30, cognitive 26) · ×1
  • Complex function (anonymous) (cyclomatic 30, cognitive 26) packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:956 — (anonymous) has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function CrossoverInner (cyclomatic 30, cognitive 26) · ×1
  • Complex function CrossoverInner (cyclomatic 30, cognitive 26) packages/desktop-client/src/components/reports/reports/Crossover.tsx:74 — CrossoverInner has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function showActivity (cyclomatic 30, cognitive 25) · ×1
  • Complex function showActivity (cyclomatic 30, cognitive 25) packages/desktop-client/src/components/reports/graphs/showActivity.ts:35 — showActivity has cyclomatic complexity 30 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · packages/desktop-client/src/components/transactions/TransactionsTable.tsx · ×1
  • packages/desktop-client/src/components/transactions/TransactionsTable.tsx: 3950 lines of code packages/desktop-client/src/components/transactions/TransactionsTable.tsx:1 — packages/desktop-client/src/components/transactions/TransactionsTable.tsx has 3950 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts · ×1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts: 3073 lines of code packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts:1 — packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts has 3073 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx · ×1
  • packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx: 2079 lines of code packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx:1 — packages/desktop-client/src/components/mobile/transactions/TransactionEdit.tsx has 2079 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/accounts/Account.tsx · ×1
  • packages/desktop-client/src/components/accounts/Account.tsx: 2027 lines of code packages/desktop-client/src/components/accounts/Account.tsx:1 — packages/desktop-client/src/components/accounts/Account.tsx has 2027 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts · ×1
  • packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts: 1804 lines of code packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts:1 — packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts has 1804 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/accounts/app.ts · ×1
  • packages/loot-core/src/server/accounts/app.ts: 1600 lines of code packages/loot-core/src/server/accounts/app.ts:1 — packages/loot-core/src/server/accounts/app.ts has 1600 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/formula/formulaCatalog.ts · ×1
  • packages/desktop-client/src/components/formula/formulaCatalog.ts: 1576 lines of code packages/desktop-client/src/components/formula/formulaCatalog.ts:1 — packages/desktop-client/src/components/formula/formulaCatalog.ts has 1576 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/rules/RuleEditor.tsx · ×1
  • packages/desktop-client/src/components/rules/RuleEditor.tsx: 1554 lines of code packages/desktop-client/src/components/rules/RuleEditor.tsx:1 — packages/desktop-client/src/components/rules/RuleEditor.tsx has 1554 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/table.tsx · ×1
  • packages/desktop-client/src/components/table.tsx: 1345 lines of code packages/desktop-client/src/components/table.tsx:1 — packages/desktop-client/src/components/table.tsx has 1345 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx: 1336 lines of code packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx:1 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx has 1336 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx · ×1
  • packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx: 1332 lines of code packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx:1 — packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.tsx has 1332 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/accounts/sync.ts · ×1
  • packages/loot-core/src/server/accounts/sync.ts: 1235 lines of code packages/loot-core/src/server/accounts/sync.ts:1 — packages/loot-core/src/server/accounts/sync.ts has 1235 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx · ×1
  • packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx: 1194 lines of code packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx:1 — packages/desktop-client/src/components/modals/SelectLinkedAccountsModal.tsx has 1194 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/transactions/transaction-rules.ts · ×1
  • packages/loot-core/src/server/transactions/transaction-rules.ts: 1189 lines of code packages/loot-core/src/server/transactions/transaction-rules.ts:1 — packages/loot-core/src/server/transactions/transaction-rules.ts has 1189 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/api.ts · ×1
  • packages/loot-core/src/server/api.ts: 1138 lines of code packages/loot-core/src/server/api.ts:1 — packages/loot-core/src/server/api.ts has 1138 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/importers/ynab5.ts · ×1
  • packages/loot-core/src/server/importers/ynab5.ts: 1134 lines of code packages/loot-core/src/server/importers/ynab5.ts:1 — packages/loot-core/src/server/importers/ynab5.ts has 1134 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/Crossover.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/Crossover.tsx: 1096 lines of code packages/desktop-client/src/components/reports/reports/Crossover.tsx:1 — packages/desktop-client/src/components/reports/reports/Crossover.tsx has 1096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx · ×1
  • packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx: 1094 lines of code packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:1 — packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx has 1094 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/aql/compiler.ts · ×1
  • packages/loot-core/src/server/aql/compiler.ts: 1078 lines of code packages/loot-core/src/server/aql/compiler.ts:1 — packages/loot-core/src/server/aql/compiler.ts has 1078 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/CustomReport.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/CustomReport.tsx: 1037 lines of code packages/desktop-client/src/components/reports/reports/CustomReport.tsx:1 — packages/desktop-client/src/components/reports/reports/CustomReport.tsx has 1037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/sync/index.ts · ×1
  • packages/loot-core/src/server/sync/index.ts: 1021 lines of code packages/loot-core/src/server/sync/index.ts:1 — packages/loot-core/src/server/sync/index.ts has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/db/index.ts · ×1
  • packages/loot-core/src/server/db/index.ts: 1005 lines of code packages/loot-core/src/server/db/index.ts:1 — packages/loot-core/src/server/db/index.ts has 1005 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/budget/category-template-context.ts · ×1
  • packages/loot-core/src/server/budget/category-template-context.ts: 978 lines of code packages/loot-core/src/server/budget/category-template-context.ts:1 — packages/loot-core/src/server/budget/category-template-context.ts has 978 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/Calendar.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/Calendar.tsx: 975 lines of code packages/desktop-client/src/components/reports/reports/Calendar.tsx:1 — packages/desktop-client/src/components/reports/reports/Calendar.tsx has 975 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/Sankey.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/Sankey.tsx: 964 lines of code packages/desktop-client/src/components/reports/reports/Sankey.tsx:1 — packages/desktop-client/src/components/reports/reports/Sankey.tsx has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx · ×1
  • packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx: 960 lines of code packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx:1 — packages/desktop-client/src/components/mobile/budget/BudgetPage.tsx has 960 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/mocks/budget.ts · ×1
  • packages/loot-core/src/mocks/budget.ts: 945 lines of code packages/loot-core/src/mocks/budget.ts:1 — packages/loot-core/src/mocks/budget.ts has 945 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/Overview.tsx · ×1
  • packages/desktop-client/src/components/reports/Overview.tsx: 881 lines of code packages/desktop-client/src/components/reports/Overview.tsx:1 — packages/desktop-client/src/components/reports/Overview.tsx has 881 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx: 867 lines of code packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx:1 — packages/desktop-client/src/components/reports/reports/BalanceForecast.tsx has 867 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/budget/mutations.ts · ×1
  • packages/desktop-client/src/budget/mutations.ts: 861 lines of code packages/desktop-client/src/budget/mutations.ts:1 — packages/desktop-client/src/budget/mutations.ts has 861 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx · ×1
  • packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx: 856 lines of code packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx:1 — packages/desktop-client/src/components/autocomplete/PayeeAutocomplete.tsx has 856 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/filters/FiltersMenu.tsx · ×1
  • packages/desktop-client/src/components/filters/FiltersMenu.tsx: 848 lines of code packages/desktop-client/src/components/filters/FiltersMenu.tsx:1 — packages/desktop-client/src/components/filters/FiltersMenu.tsx has 848 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/platform/client/browser-server/coordinator.ts · ×1
  • packages/loot-core/src/platform/client/browser-server/coordinator.ts: 833 lines of code packages/loot-core/src/platform/client/browser-server/coordinator.ts:1 — packages/loot-core/src/platform/client/browser-server/coordinator.ts has 833 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/formula/QueryManager.tsx · ×1
  • packages/desktop-client/src/components/formula/QueryManager.tsx: 825 lines of code packages/desktop-client/src/components/formula/QueryManager.tsx:1 — packages/desktop-client/src/components/formula/QueryManager.tsx has 825 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/loot-core/src/server/budget/schedule-template.ts · ×1
  • packages/loot-core/src/server/budget/schedule-template.ts: 824 lines of code packages/loot-core/src/server/budget/schedule-template.ts:1 — packages/loot-core/src/server/budget/schedule-template.ts has 824 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx: 815 lines of code packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx:1 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx has 815 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/autocomplete/Autocomplete.tsx · ×1
  • packages/desktop-client/src/components/autocomplete/Autocomplete.tsx: 809 lines of code packages/desktop-client/src/components/autocomplete/Autocomplete.tsx:1 — packages/desktop-client/src/components/autocomplete/Autocomplete.tsx has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-electron/index.ts · ×1
  • packages/desktop-electron/index.ts: 809 lines of code packages/desktop-electron/index.ts:1 — packages/desktop-electron/index.ts has 809 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx · ×1
  • packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx: 803 lines of code packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx:1 — packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx has 803 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · packages/desktop-client/src/modals/modalsSlice.ts · ×1
  • packages/desktop-client/src/modals/modalsSlice.ts: 800 lines of code packages/desktop-client/src/modals/modalsSlice.ts:1 — packages/desktop-client/src/modals/modalsSlice.ts has 800 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~295 LoC) · ×1
  • Dead file (~295 LoC) packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~274 LoC) · ×1
  • Dead file (~274 LoC) packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~152 LoC) · ×1
  • Dead file (~152 LoC) packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop-client/src/components/budget/envelope/budgetsummary/BudgetSummary.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~115 LoC) · ×1
  • Dead file (~115 LoC) packages/desktop-electron/preload.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~79 LoC) · ×1
  • Dead file (~79 LoC) packages/sync-server/src/app-gocardless/banks/seb_kort_bank_ab.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~77 LoC) · ×1
  • Dead file (~77 LoC) packages/sync-server/src/app-gocardless/banks/norwegian_xx_norwnok1.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~73 LoC) · ×1
  • Dead file (~73 LoC) packages/sync-server/src/app-gocardless/banks/bnp_be_gebabebb.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~72 LoC) · ×1
  • Dead file (~72 LoC) packages/sync-server/src/app-gocardless/banks/hype_hyeeit22.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~70 LoC) · ×1
  • Dead file (~70 LoC) packages/sync-server/src/app-gocardless/banks/ing_ingbrobu.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~67 LoC) · ×1
  • Dead file (~67 LoC) packages/desktop-client/src/components/budget/envelope/HoldMenu.tsx — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (packages/desktop-client/src/components/budget/envelope/budgetsummary/ToBudget.tsx) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it
R7 · Dead Code · Dead file (~62 LoC) · ×1
  • Dead file (~62 LoC) packages/desktop-electron/beforePackHook.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~59 LoC) · ×1
  • Dead file (~59 LoC) packages/sync-server/src/app-gocardless/banks/ssk_munchen.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~43 LoC) · ×1
  • Dead file (~43 LoC) packages/sync-server/src/app-gocardless/banks/american_express_aesudef1.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~42 LoC) · ×1
  • Dead file (~42 LoC) packages/sync-server/src/app-gocardless/banks/danskebank_privat.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~40 LoC) · ×1
  • Dead file (~40 LoC) packages/sync-server/src/app-gocardless/banks/entercard_swednokk.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~39 LoC) · ×1
  • Dead file (~39 LoC) packages/sync-server/src/app-gocardless/banks/bank_of_ireland_b365_bofiie2d.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~32 LoC) · ×1
  • Dead file (~32 LoC) packages/sync-server/src/app-gocardless/banks/seb_privat.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~27 LoC) · ×1
  • Dead file (~27 LoC) packages/desktop-electron/afterSignHook.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~25 LoC) · ×1
  • Dead file (~25 LoC) packages/sync-server/src/app-gocardless/banks/bankinter_bkbkesmm.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~24 LoC) · ×1
  • Dead file (~24 LoC) packages/sync-server/src/app-gocardless/banks/sparnord_spnodk22.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~23 LoC) · ×1
  • Dead file (~23 LoC) packages/sync-server/src/app-gocardless/banks/cetelem_cetmptp1xxx.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~19 LoC) · ×1
  • Dead file (~19 LoC) packages/sync-server/src/app-gocardless/banks/spk_worms_alzey_ried_malade51wor.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~16 LoC) · ×1
  • Dead file (~16 LoC) packages/desktop-client/globals.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1 LoC) · ×1
  • Dead file (~1 LoC) packages/desktop-client/src/globals.ts — no import path from any entry point (530 application, 63 tooling, 477 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unlisted import '@babel/template' · ×1
  • Unlisted import '@babel/template' packages/component-library/src/icons/add-attribute.ts:1 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import '@babel/traverse' · ×1
  • Unlisted import '@babel/traverse' packages/component-library/src/icons/add-attribute.ts:2 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unlisted import '@babel/types' · ×1
  • Unlisted import '@babel/types' packages/component-library/src/icons/add-attribute.ts:3 — Imported only as a TYPE and declared in no reachable package.json. The import is erased at compile time, so nothing is installed and no runtime resolution depends on it — but type-checking a clean clone will fail. Declare the typings it resolves through (or the package itself) in the owning package.json.
R8 · Dependency Hygiene · Unused dependency 'minimatch' · ×1
  • Unused dependency 'minimatch' package.json:84 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'nano-staged' · ×1
  • Unused dependency 'nano-staged' package.json:85 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'oxlint-tsgolint' · ×1
  • Unused dependency 'oxlint-tsgolint' package.json:89 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'p-limit' · ×1
  • Unused dependency 'p-limit' package.json:90 — Declared in the root package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
S1 · Web-Security Posture · Weak hash algorithm · ×1
  • Weak hash algorithm packages/loot-core/src/server/update.ts:23 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
X19 · Unrestored process-global state · Process-global state is restored only on the happy path · ×1
  • Process-global state is restored only on the happy path packages/desktop-electron/beforePackHook.ts:9 — `beforePackHook` changes state that belongs to the whole PROCESS and changes it back at the end of the same body — the `CC_target` environment variable (set at line 24, cleared at line 27) and the `CXX_target` environment variable (set at line 25, cleared at line 28) — which says the change was meant to last no longer than this call. But the restore is an ordinary statement on the straight-line path, not a `finally`, so it is skipped by any exception thrown in between — or by a promise that rejects at an `await`, and while this function is suspended at one every other callback the event loop runs sees the moved value too: the process then keeps the overwritten value for the rest of its life, and every later relative path, child-process launch or config read in ANY module resolves against it. That failure is silent and remote from its cause — the function that breaks is not the function that moved the directory. The durable fix is not to widen the restore but to stop mutating the global: pass the value to the operation that needs it — the `cwd` and `env` options of `child_process.spawn`/`exec`/`execSync` (or `Deno.Command`) scope both to the CHILD — or build absolute paths with `path.resolve`. Where the global genuinely must move, wrap it `try`/`finally` so the restore runs on every path.
Minor — 344 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×139
  • Orphaned file packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/AccountSelector.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/modals/EditUser.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/loot-core/src/server/schedules/find-schedules.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/autocomplete/AccountAutocomplete.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/graphs/CalendarGraph.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/crdt/src/crdt/timestamp.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/loot-core/src/server/budget/tracking.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/CategorySelector.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/budget/tracking/budgetsummary/BudgetSummary.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/component-library/src/Button.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/modals/CreateEncryptionKeyModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/spreadsheets/summary-spreadsheet.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/modals/TransferOwnership.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/accounts/Balance.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/ReportTopbar.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/modals/MergeUnusedPayeesModal.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/reports/spreadsheets/calendar-spreadsheet.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file packages/desktop-client/src/components/admin/UserAccess/UserAccess.tsx:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 114 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate packages/desktop-client/src/components/sidebar/BudgetName.tsx:27 — `!Platform.isBrowser && Platform.OS === 'mac'` appears character-identically in 2 files — packages/desktop-client/src/components/sidebar/BudgetName.tsx, packages/desktop-client/src/components/sidebar/SidebarShell.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx:83 — `!active || !payload || !Array.isArray(payload) || !payload[0]` appears character-identically in 2 files — packages/desktop-client/src/components/reports/graphs/BudgetAnalysisGraph.tsx, packages/desktop-client/src/components/reports/graphs/CashFlowGraph.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx:66 — `!category.hidden || showHiddenCategories` appears character-identically in 2 files — packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx, packages/desktop-client/src/components/mobile/budget/IncomeGroup.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts:204 — `!cond.customName && (cond.field === 'category' || cond.field === 'category_group')` appears character-identically in 4 files — packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts, REDACTED, packages/desktop-client/src/components/reports/spreadsheets/spending-spreadsheet.ts, packages/desktop-client/src/hooks/useFormulaExecution.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/eslint-plugin-actual/lib/rules/no-extraneous-dependencies.js:89 — `!source || typeof source.value !== 'string'` appears character-identically in 2 files — packages/eslint-plugin-actual/lib/rules/no-extraneous-dependencies.js, packages/eslint-plugin-actual/lib/rules/prefer-subpath-imports.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx:26 — `'cloudFileId' in file && file.state !== 'broken'` appears character-identically in 2 files — packages/desktop-client/src/components/modals/manager/DeleteFileModal.tsx, packages/desktop-client/src/components/modals/manager/DuplicateFileModal.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/loot-core/src/server/encryption/app.ts:121 — `(await asyncStorage.getItem(`encrypt-keys`)) || '{}'` appears character-identically in 2 files — packages/loot-core/src/server/encryption/app.ts, packages/loot-core/src/server/sync/reset.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/ChooseGraph.tsx:60 — `ReportOptions.balanceTypeMap.get(balanceType) || 'totalDebts'` appears character-identically in 2 files — packages/desktop-client/src/components/reports/ChooseGraph.tsx, packages/desktop-client/src/components/reports/reports/CustomReport.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/graphs/showActivity.ts:60 — `ReportOptions.intervalMap.get(interval) || 'Day'` appears character-identically in 2 files — packages/desktop-client/src/components/reports/graphs/showActivity.ts, packages/desktop-client/src/components/reports/reports/CustomReport.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/reports/CustomReport.tsx:397 — `ReportOptions.intervalRange.get(interval) || 'rangeInclusive'` appears character-identically in 3 files — packages/desktop-client/src/components/reports/reports/CustomReport.tsx, packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts, packages/desktop-client/src/components/reports/spreadsheets/grouped-spreadsheet.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/ManageRules.tsx:100 — `action.op === 'prepend-notes' || action.op === 'append-notes'` appears character-identically in 3 files — packages/desktop-client/src/components/ManageRules.tsx, packages/loot-core/src/server/rules/app.ts, packages/loot-core/src/server/transactions/transaction-rules.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx:203 — `areNoReconciledTransactions && areAllSplitTransactions` appears character-identically in 2 files — packages/desktop-client/src/components/transactions/SelectedTransactionsButton.tsx, packages/desktop-client/src/components/transactions/useTransactionRowContextActions.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts:43 — `balanceTypeOp === 'totalTotals' || balanceTypeOp === 'totalBudgeted'` appears character-identically in 3 files — packages/desktop-client/src/components/reports/spreadsheets/calculateLegend.ts, packages/desktop-client/src/components/reports/spreadsheets/custom-spreadsheet.ts, packages/desktop-client/src/components/reports/spreadsheets/filterEmptyRows.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts:139 — `catBalance > 0 || (catBalance < 0 && hasCarryover)` appears character-identically in 2 files — packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts, packages/desktop-client/src/hooks/useFormulaExecution.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/budget/SidebarCategory.tsx:95 — `category.hidden || categoryGroup?.hidden` appears character-identically in 2 files — packages/desktop-client/src/components/budget/SidebarCategory.tsx, packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/hooks/useFormulaExecution.ts:71 — `cellValue && typeof cellValue === 'object' && 'type' in cellValue` appears character-identically in 2 files — packages/desktop-client/src/hooks/useFormulaExecution.ts, packages/loot-core/src/server/rules/action.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/reports/reports/Formula.tsx:234 — `colorFormula && !colorError && colorResult` appears character-identically in 2 files — packages/desktop-client/src/components/reports/reports/Formula.tsx, packages/desktop-client/src/components/reports/reports/FormulaCard.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/ManageRules.tsx:75 — `cond.op === 'oneOf' || cond.op === 'notOneOf'` appears character-identically in 2 files — packages/desktop-client/src/components/ManageRules.tsx, packages/loot-core/src/server/rules/rule-indexer.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:51 — `condition.field !== 'category' && condition.field !== 'category_group'` appears character-identically in 2 files — REDACTED, packages/desktop-client/src/components/reports/spreadsheets/reportCategoryLists.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:226 — `config.get('https.key') && config.get('https.cert')` appears character-identically in 2 files — REDACTED, packages/sync-server/src/scripts/health-check.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/util/schedule.ts:113 — `config.patterns && config.patterns.length > 0` appears character-identically in 2 files — packages/desktop-client/src/util/schedule.ts, packages/loot-core/src/shared/schedules.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/banksync/EditSyncAccount.tsx:116 — `current == null || typeof current !== 'object'` appears character-identically in 2 files — packages/desktop-client/src/components/banksync/EditSyncAccount.tsx, packages/loot-core/src/server/forecast/forecast-filters.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/sync-server/src/app-gocardless/banks/american_express_aesudef1.ts:40 — `currentBalance?.balanceAmount.amount || 0` appears character-identically in 13 files — packages/sync-server/src/app-gocardless/banks/american_express_aesudef1.ts, packages/sync-server/src/app-gocardless/banks/berliner_sparkasse_beladebexxx.ts, packages/sync-server/src/app-gocardless/banks/danskebank_privat.ts, packages/sync-server/src/app-gocardless/banks/ing_ingddeff.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/budget/ExpenseCategory.tsx:96 — `editingCell && editingCell.cell === 'name' && editingCell.id === cat.id` appears character-identically in 2 files — packages/desktop-client/src/components/budget/ExpenseCategory.tsx, packages/desktop-client/src/components/budget/IncomeCategory.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate packages/desktop-client/src/components/budget/ExpenseGroup.tsx:132 — `editingCell && editingCell.cell === 'name' && editingCell.id === group.id` appears character-identically in 2 files — packages/desktop-client/src/components/budget/ExpenseGroup.tsx, packages/desktop-client/src/components/budget/IncomeGroup.tsx. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
P2 · Observability · Console output used as the logging channel · ×39
  • Console output used as the logging channel packages/loot-core/src/mocks/budget.ts:901 — `packages/loot-core/src/mocks/budget.ts` reports through `console.*` at line 901 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/loot-core/src/mocks/setup.ts:32 — `packages/loot-core/src/mocks/setup.ts` reports through `console.*` at line 32 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/loot-core/src/mocks/setup.ts:135 — `packages/loot-core/src/mocks/setup.ts` reports through `console.*` at line 135 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/app.ts:9 — `packages/sync-server/app.ts` reports through `console.*` at line 9 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/vitest.globalSetup.js:34 — `packages/sync-server/vitest.globalSetup.js` reports through `console.*` at line 34 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/vitest.globalSetup.js:58 — `packages/sync-server/vitest.globalSetup.js` reports through `console.*` at line 58 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:167 — `REDACTED` reports through `console.*` at line 167 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:320 — `REDACTED` reports through `console.*` at line 320 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:398 — `REDACTED` reports through `console.*` at line 398 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:31 — `REDACTED` reports through `console.*` at line 31 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:109 — `REDACTED` reports through `console.*` at line 109 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:164 — `REDACTED` reports through `console.*` at line 164 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:179 — `REDACTED` reports through `console.*` at line 179 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:201 — `REDACTED` reports through `console.*` at line 201 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:213 — `REDACTED` reports through `console.*` at line 213 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:217 — `REDACTED` reports through `console.*` at line 217 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:219 — `REDACTED` reports through `console.*` at line 219 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:222 — `REDACTED` reports through `console.*` at line 222 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/src/migrations.ts:44 — `packages/sync-server/src/migrations.ts` reports through `console.*` at line 44 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/src/migrations.ts:63 — `packages/sync-server/src/migrations.ts` reports through `console.*` at line 63 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/src/migrations.ts:70 — `packages/sync-server/src/migrations.ts` reports through `console.*` at line 70 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/src/account-db.js:220 — `packages/sync-server/src/account-db.js` reports through `console.*` at line 220 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel packages/sync-server/src/account-db.js:287 — `packages/sync-server/src/account-db.js` reports through `console.*` at line 287 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:82 — `REDACTED` reports through `console.*` at line 82 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:89 — `REDACTED` reports through `console.*` at line 89 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • + 14 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×37
  • redundant comment packages/api/methods.test.ts:213 — "create our test category group" repeats the code it sits on: 4 of its 4 words (create, test, category, group) are already in `const mainGroupId = await api.createCategoryGroup({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/api/methods.test.ts:259 — "create our test category group" repeats the code it sits on: 4 of its 4 words (create, test, category, group) are already in `const mainGroupId = await api.createCategoryGroup({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/e2e/budget.mobile.test.ts:198 — 5 comments in this file only repeat the code they sit on (lines 198, 271, 351, 481, 494), for example "Page Header Tests". Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/e2e/payees.mobile.test.ts:57 — "Get the text 'No payees found.' from the page" repeats the code it sits on: 6 of its 6 words (get, text, no, payees, found, page) are already in `const noPayeesMessage = page.getByText('No payees found.');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/accounts/mutations.ts:708 — "Dispatch the ids for the accounts that are yet to be synced" repeats the code it sits on: 4 of its 5 words (dispatch, ids, accounts, synced) are already in `dispatch(setAccountsSyncing({ ids: accountIdsToSync.slice(idx + 1) }));`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/accounts/mutations.ts:712 — "Set new transactions" repeats the code it sits on: 3 of its 3 words (set, new, transactions) are already in `dispatch(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/App.tsx:99 — "Open the last opened budget, if any" repeats the code it sits on: 4 of its 4 words (open, last, opened, budget) are already in `dispatch(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/formula/codeMirror-excelLanguage.tsx:1136 — "Syntax highlighting for Excel formulas" repeats the code it sits on: 4 of its 4 words (syntax, highlighting, excel, formulas) are already in `export const excelFormulaHighlighting = syntaxHighlighting(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/reports/reports/Crossover.tsx:177 — "Set earliest transaction date" repeats the code it sits on: 4 of its 4 words (set, earliest, transaction, date) are already in `const earliestDate = earliestTransactionData`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/reports/reports/Formula.tsx:232 — "Determine the custom color from color formula result" repeats the code it sits on: 4 of its 5 words (custom, color, formula, result) are already in `const customColor =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/reports/reports/FormulaCard.tsx:87 — "Determine the custom color from color formula result" repeats the code it sits on: 4 of its 5 words (custom, color, formula, result) are already in `const customColor =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts:397 — "Check crossover against ADJUSTED expenses" repeats the code it sits on: 4 of its 5 words (check, crossover, adjusted, expenses) are already in `if (`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/settings/ThemeInstaller.test.tsx:126 — "Mock useThemeCatalog to return catalog data immediately" repeats the code it sits on: 6 of its 7 words (mock, use, theme, catalog, return, data) are already in `vi.mocked(useThemeCatalog).mockReturnValue({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/components/settings/ThemeInstaller.test.tsx:260 — "Set up a previously installed theme (Ocean Blue)" repeats the code it sits on: 5 of its 6 words (set, installed, theme, ocean, blue) are already in `const installedTheme = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/hooks/useFormulaExecution.ts:483 — "For category_group conditions, we check cat.group; for category, we check cat.id" repeats the code it sits on: 5 of its 6 words (category, group, check, cat, id) are already in `const getKey = (cat: CategoryEntity) =>`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/notes/DesktopLinkedNotes.tsx:35 — "Open file in file manager" repeats the code it sits on: 3 of its 3 words (open, file, manager) are already in `window.Actual?.openInFileManager(url);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/notes/MobileLinkedNotes.tsx:38 — "Open file in file manager" repeats the code it sits on: 3 of its 3 words (open, file, manager) are already in `window.Actual?.openInFileManager(url);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-client/src/style/customThemes.ts:471 — "Validate :root content" repeats the code it sits on: 3 of its 3 words (validate, root, content) are already in `validateRootContent(rootContent);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/desktop-electron/index.ts:522 — "Create the browser window." repeats the code it sits on: 3 of its 3 words (create, browser, window) are already in `const win = new BrowserWindow({`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/eslint-plugin-actual/lib/rules/prefer-const.js:99 — "Variable is declared in currentScope (it's in currentScope.variables)" repeats the code it sits on: 4 of its 5 words (variable, current, scope, variables) are already in `if (!reassignedVariablesByScope.has(currentScope))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/eslint-plugin-actual/lib/rules/prefer-const.js:311 — "Get the scope for this variable" repeats the code it sits on: 3 of its 3 words (get, scope, variable) are already in `const variableScope = allVariablesInDeclaration.get(variableName);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/eslint-plugin-actual/lib/utils/import-helpers.js:37 — "Find existing import from the same module" repeats the code it sits on: 4 of its 4 words (find, existing, import, module) are already in `const existingImport = ast.body.find(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/loot-core/src/platform/client/browser-server/coordinator.test.ts:436 — "Leader closes tab" repeats the code it sits on: 3 of its 3 words (leader, closes, tab) are already in `sendMsg(leader, { type: 'tab-closing' });`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/loot-core/src/server/accounts/title/index.ts:19 — "test first character" repeats the code it sits on: 3 of its 3 words (test, first, character) are already in `if (/\s/.test(firstCharacter))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment packages/loot-core/src/server/aql/compiler.test.ts:958 — "Without validated refs" repeats the code it sits on: 3 of its 3 words (without, validated, refs) are already in `result = generateSQLWithState(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 12 more in this group — see findings.md.
X7 · Silent fallback defaults · Pending state with no failure state · ×22
  • Pending state with no failure state packages/desktop-client/src/components/LoggedInUser.tsx:156 — The view draws `Connecting...` under `loading && serverUrl`, but `loading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/rules/ScheduleValue.tsx:27 — The view draws `<View aria-label= style= >` under `isLoading`, but `isLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/ReportsDashboardRouter.tsx:29 — The view draws `<LoadingIndicator message= />` under `isPending || ( ! dashboardId && dashboardPages . length > 0 )`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx:59 — The view draws `<LoadingIndicator/>` under `isLoading`, but `isLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/AgeOfMoney.tsx:252 — The view draws `<LoadingIndicator/>` under `! allMonths || ! data`, but `allMonths` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/AgeOfMoneyCard.tsx:178 — The view draws `<LoadingIndicator/>` under `data`, but `data` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:135 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/BudgetAnalysis.tsx:369 — The view draws `<LoadingIndicator/>` under `! data || ! allMonths`, but `data` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Calendar.tsx:84 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/CashFlow.tsx:60 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/CashFlowCard.tsx:227 — The view draws `<LoadingIndicator/>` under `data`, but `data` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Crossover.tsx:66 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Crossover.tsx:423 — The view draws `<LoadingIndicator/>` under `! allMonths || ! displayData || ! start || ! end || isCategoriesLoading`, but `allMonths` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/NetWorth.tsx:59 — The view draws `<LoadingIndicator/>` under `isLoading`, but `isLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Sankey.tsx:74 — The view draws `<LoadingIndicator/>` under `isLoading`, but `isLoading` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Sankey.tsx:790 — The view draws `<LoadingIndicator/>` under `! datesInitialized || ! displayData`, but `datesInitialized` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Spending.tsx:65 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Spending.tsx:685 — The view draws `<LoadingIndicator message= />` under `data`, but `data` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/reports/reports/Summary.tsx:59 — The view draws `<LoadingIndicator/>` under `isPending`, but `isPending` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx:161 — The view draws `<View style= >` under `rendered === null`, but `rendered` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/modals/UnmigrateBudgetAutomationsModal.tsx:220 — The view draws `<AnimatedLoading style= />` under `saving`, but `saving` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
  • Pending state with no failure state packages/desktop-client/src/components/modals/AccountGroupsModal/AccountGroupsModal.tsx:68 — The view draws `<View style= >` under `isPlaceholderData`, but `isPlaceholderData` is settled by a load that can fail and the component draws no failure state, so a failed load is shown as "not yet" for ever, or as the loaded state over its initial value. Give the component a failure state and draw it.
D10 · Test Quality · Mock-dominated test · ×17
  • Mock-dominated test: uses institution transaction_total_days for maxHistoricalDays by default packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.ts:265 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: caps maxHistoricalDays at 90 for banks with separate_continuous_history_consent packages/sync-server/src/app-gocardless/services/tests/gocardless-service.spec.ts:280 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: clears the goal instead of failing the save when it cannot be worked out packages/loot-core/src/server/budget/goal-template.test.ts:373 — This test sets up 3 test doubles (for example `vi.spyOn`) against 1 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: should register contextmenu event listener on triggerRef packages/desktop-client/src/hooks/useContextMenu.test.ts:42 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: should dispatch addItems when contextmenu event is fired and enabled is true packages/desktop-client/src/hooks/useContextMenu.test.ts:59 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: should not dispatch addItems when enabled is false packages/desktop-client/src/hooks/useContextMenu.test.ts:81 — This test sets up 5 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not re-bind the native listener when only the callback identity changes packages/desktop-client/src/hooks/useRefEventListener.test.ts:30 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 4 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: clears customCssOverride when Apply is pressed with an empty textarea packages/desktop-client/src/components/settings/ThemeInstaller.test.tsx:449 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 1 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: does not touch customCssOverride when clicking a catalog theme packages/desktop-client/src/components/settings/ThemeInstaller.test.tsx:481 — This test sets up 3 test doubles (for example `a double assigned in a shared setup`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: uses the selected file for option-driven re-parses and performs only one parse on file selection packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.test.tsx:63 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 10 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: re-parses when the user re-selects the same file path after a parse error packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.test.tsx:152 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: re-parses with non-CSV options when re-selecting the same QIF file after error packages/desktop-client/src/components/modals/ImportTransactionsModal/ImportTransactionsModal.test.tsx:199 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 3 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: defaults input to cleared balance and submits evaluated integer amount packages/desktop-client/src/components/accounts/Reconcile.test.tsx:128 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: defaults input to cleared balance and submits evaluated invalid amount & use cleared balance packages/desktop-client/src/components/accounts/Reconcile.test.tsx:157 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: clicking "Use last synced total" fills and submits that amount packages/desktop-client/src/components/accounts/Reconcile.test.tsx:186 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: submitting with empty input does not reconcile packages/desktop-client/src/components/accounts/Reconcile.test.tsx:219 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
  • Mock-dominated test: when cleared balance is not available, submits null packages/desktop-client/src/components/accounts/Reconcile.test.tsx:242 — This test sets up 3 test doubles (for example `vi.fn`) against 0 real object(s) of its own, and its only verification is 2 check(s) that the doubles were called. It pins how the code is wired, not what it does: it passes with a wrong result and fails when a call is harmlessly reordered or merged. Assert the outcome instead (the value returned, the state left behind), build collaborators and value objects for real or with a small hand-written fake, and keep doubles for the boundaries the test cannot own — the network, the clock, the file system.
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch packages/desktop-client/src/util/versions.ts:69 — `getLatestVersion` swallows every exception into `return 'unknown'` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/desktop-client/src/components/budget/goals/CategoryAutomationButton.tsx:47 — `getAutomationEntries` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/docs/src/remark/enforce-doc-links.js:46 — `listMarkdownFiles` swallows every exception into `return []` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch REDACTED:51 — `matchesAccountCondition` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch packages/sync-server/src/accounts/password.js:34 — `verifyPassword` swallows every exception into `return false` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×4
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 21 significant file(s) lose their only recent owner: packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts, packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx, packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloConfiguration.tsx, packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarlo.tsx, packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloPotConfiguration.tsx, packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloContributions.tsx, packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloYearStory.ts, packages/desktop-client/src/components/reports/graphs/util/monteCarloCashflowChart.ts (+13 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 14 significant file(s) lose their only recent owner: packages/desktop-client/src/components/modals/BudgetAutomationsModal/BudgetAutomationsBody.tsx, packages/sync-server/src/app-gocardless/gocardless-node.types.ts, packages/sync-server/src/app-gocardless/services/gocardless-api.ts, packages/desktop-client/src/components/modals/BudgetAutomationsModal/migrateTemplatesToAutomations.ts, packages/desktop-client/src/components/sidebar/redesign/SidebarBudgetName.tsx, packages/desktop-client/src/components/sidebar/redesign/SideGroup.tsx, packages/desktop-client/src/components/sidebar/redesign/AccountsSection.tsx, packages/desktop-client/src/components/sidebar/redesign/AccountHoverCard.tsx (+6 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 6 significant file(s) lose their only recent owner: packages/cli/src/commands/query.ts, packages/desktop-client/src/components/mobile/rules/RulesListItem.tsx, packages/cli/src/commands/accounts.ts, packages/desktop-client/src/components/mobile/payees/PayeesListItem.tsx, packages/desktop-client/src/components/mobile/payees/PayeesList.tsx, packages/desktop-client/src/components/mobile/rules/RulesList.tsx. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #4 — If anonymized user #4 becomes unavailable, 3 significant file(s) lose their only recent owner: packages/loot-core/src/server/forecast/forecast-schedules.ts, packages/loot-core/src/server/forecast/app.ts, packages/desktop-client/src/hooks/useBalanceForecast.ts. Pair on, review, or document these before any departure.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×4
  • Projects may be oversized for their cohesion packages/desktop-client/package.json:1 — `packages/desktop-client` (157855 LoC, 931 module-visible types across 82 directories) overshoots its size bounds. 4 of 16 build unit(s) (Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/loot-core/package.json:1 — `packages/loot-core` (48408 LoC, 293 module-visible types across 58 directories) overshoots its size bounds. 4 of 16 build unit(s) (Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/component-library/package.json:1 — `packages/component-library` (11666 LoC, 422 module-visible types across 9 directories) overshoots its size bounds. 4 of 16 build unit(s) (Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion packages/sync-server/package.json:1 — `packages/sync-server` (11506 LoC, 92 module-visible types across 22 directories) overshoots its size bounds. 4 of 16 build unit(s) (Gradle, Xcode, npm) overshoot their size bounds, lowering Project Cohesion to 5.0/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D31 · IaC & Container Security · Low IaC · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
C2 · Access Controls · Endpoints outside the guard · ×3
  • Endpoints outside the guard REDACTED:20 — Access here is not default-deny: this route in app declares no guard, while its 9 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization.
  • Endpoints outside the guard REDACTED:129 — Access here is not default-deny: this route in app declares no guard, while its 7 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization.
  • Endpoints outside the guard packages/sync-server/src/app-gocardless/app-gocardless.ts:87 — Access here is not default-deny: this route in app declares no guard, while its 6 sibling routes each declare one and nothing application-wide (an authentication mount or hook, a global guard) covers it. Where the endpoint returns stored data or changes state, D29 reports it as missing authorization.
D30 · Dependency Vulnerabilities · Low CVE · ×2
  • REDACTED
  • REDACTED
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies packages/sync-server/src/app-gocardless/services/gocardless-service.ts:95 — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
C5 · Data-Subject Rights · Partial data-subject-rights support · ×1
  • Partial data-subject-rights support — Corroborated rights: erasure ✓ · export ✗ · consent ✗. Each tick means this scan found code in the repository implementing that right — a deletion/anonymisation path for erasure, a data-export or portability path for export, and consent state recorded alongside the personal data it authorises. A ✗ therefore means no such code was recognised HERE, not that the right is unsupported: a capability provided by a platform, a manual runbook, or code spelled in a way this scan does not match is not visible to it. Confirm before treating a cross as a gap; where it is one, the right has to be fulfilled manually.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 10 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (56 single-owned of 781 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 781 of the 1882 production source files in this repository met that bar). They are anonymized user #5 (2 file(s)), anonymized user #6 (2 file(s)), anonymized user #7 (1 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)) (+4 more) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: packages/desktop-client/src/components/reports/spreadsheets/budget-analysis-spreadsheet.ts, packages/desktop-client/src/components/reports/reports/BudgetAnalysisCard.tsx, packages/desktop-client/src/components/modals/manager/ImportProgress.tsx, packages/loot-core/src/server/importers/progress.ts, packages/desktop-client/src/components/reports/spreadsheets/sankey-spreadsheet.ts, packages/loot-core/src/server/budget/envelope.ts, packages/desktop-client/src/components/autocomplete/TagAutocomplete.tsx, packages/desktop-client/src/components/autocomplete/NoteTagAutocomplete.tsx (+4 more).
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no build, run or usage example README.md:1 — the repository is runnable (a `start` script in `package.json`) and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D21 · Naming Consistency · `getIDByName` spells `ID` where 298 names in the project spell it `Id` · ×1
  • `getIDByName` spells `ID` where 298 names in the project spell it `Id` packages/api/methods.ts:469 — 298 of 301 names in project actual spell the token `Id` (298 of 301; unit: names in project actual containing `Id`). Peers: methods.loadBudget(budgetId) (packages/api/methods.ts:43); methods.downloadBudget(syncId) (packages/api/methods.ts:47); methods.setBudgetAmount(categoryId) (packages/api/methods.ts:158); methods.setBudgetCarryover(categoryId) (packages/api/methods.ts:166); methods.addTransactions(accountId) (packages/api/methods.ts:174). Rename to `getIdByName`. [rule N6]
D21 · Naming Consistency · `OpenIDEnableModal` spells `ID` where 298 names in the project spell it `Id` · ×1
  • `OpenIDEnableModal` spells `ID` where 298 names in the project spell it `Id` packages/desktop-client/src/components/modals/OpenIDEnableModal.tsx:28 — 298 of 301 names in project actual spell the token `Id` (298 of 301; unit: names in project actual containing `Id`). Peers: methods.loadBudget(budgetId) (packages/api/methods.ts:43); methods.downloadBudget(syncId) (packages/api/methods.ts:47); methods.setBudgetAmount(categoryId) (packages/api/methods.ts:158); methods.setBudgetCarryover(categoryId) (packages/api/methods.ts:166); methods.addTransactions(accountId) (packages/api/methods.ts:174). Rename to `OpenIdEnableModal`. [rule N6]
D21 · Naming Consistency · `AmountOPType` spells `OP` where 44 names in the project spell it `Op` · ×1
  • `AmountOPType` spells `OP` where 44 names in the project spell it `Op` packages/loot-core/src/server/api-models.ts:224 — 44 of 45 names in project actual spell the token `Op` (44 of 45; unit: names in project actual containing `Op`). Peers: EditRuleModal.conditionsOpButton (packages/desktop-client/e2e/page-models/edit-rule-modal.ts:32); EditRuleModal.selectConditionsOp (packages/desktop-client/e2e/page-models/edit-rule-modal.ts:121); EditRuleModal.selectConditionsOp(conditionsOp) (packages/desktop-client/e2e/page-models/edit-rule-modal.ts:121); EditRuleModal.selectOp (packages/desktop-client/e2e/page-models/edit-rule-modal.ts:129); AccountInternal.onConditionsOpChange (packages/desktop-client/src/components/accounts/Account.tsx:1500). Rename to `AmountOpType`. [rule N6]
D21 · Naming Consistency · `getOpenIDConfig` spells `ID` where 298 names in the project spell it `Id` · ×1
  • `getOpenIDConfig` spells `ID` where 298 names in the project spell it `Id` packages/sync-server/src/services/user-service.ts:264 — 298 of 301 names in project actual spell the token `Id` (298 of 301; unit: names in project actual containing `Id`). Peers: methods.loadBudget(budgetId) (packages/api/methods.ts:43); methods.downloadBudget(syncId) (packages/api/methods.ts:47); methods.setBudgetAmount(categoryId) (packages/api/methods.ts:158); methods.setBudgetCarryover(categoryId) (packages/api/methods.ts:166); methods.addTransactions(accountId) (packages/api/methods.ts:174). Rename to `getOpenIdConfig`. [rule N6]
D21 · Naming Consistency · `enableOpenID` spells `ID` where 23 names in the project spell it `Id` · ×1
  • `enableOpenID` spells `ID` where 23 names in the project spell it `Id` packages/sync-server/src/account-db.js:157 — 23 of 25 names in project actual spell the token `Id` (23 of 25; unit: names in project actual containing `Id`). Peers: account-db.isAdmin(userId) (packages/sync-server/src/account-db.js:149); account-db.hasPermission(userId) (packages/sync-server/src/account-db.js:153); account-db.getUserInfo(userId) (packages/sync-server/src/account-db.js:236); account-db.getUserPermission(userId) (packages/sync-server/src/account-db.js:241); pluggyai-service.hasCredentials(fileId) (packages/sync-server/src/app-pluggyai/pluggyai-service.js:10). Rename to `enableOpenId`. [rule N6]
D21 · Naming Consistency · `disableOpenID` spells `ID` where 23 names in the project spell it `Id` · ×1
  • `disableOpenID` spells `ID` where 23 names in the project spell it `Id` packages/sync-server/src/account-db.js:173 — 23 of 25 names in project actual spell the token `Id` (23 of 25; unit: names in project actual containing `Id`). Peers: account-db.isAdmin(userId) (packages/sync-server/src/account-db.js:149); account-db.hasPermission(userId) (packages/sync-server/src/account-db.js:153); account-db.getUserInfo(userId) (packages/sync-server/src/account-db.js:236); account-db.getUserPermission(userId) (packages/sync-server/src/account-db.js:241); pluggyai-service.hasCredentials(fileId) (packages/sync-server/src/app-pluggyai/pluggyai-service.js:10). Rename to `disableOpenId`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 139 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: packages/desktop-client/src/budgetfiles/budgetfilesSlice.ts, packages/desktop-client/src/components/reports/spreadsheets/crossover-spreadsheet.ts, packages/desktop-client/src/components/reports/AccountSelector.tsx, packages/desktop-client/src/components/manager/subscribe/OpenIdForm.tsx, packages/desktop-client/src/components/modals/EditUser.tsx, packages/desktop-client/src/components/mobile/budget/ExpenseGroupListItem.tsx, packages/desktop-client/src/components/admin/UserDirectory/UserDirectory.tsx, packages/loot-core/src/server/schedules/find-schedules.ts (and 131 more) (140 orphaned of 781 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 781 of the 1882 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 3/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `packages/cli`, `packages/desktop-electron`, `packages/mobile-client/ios/App`.
R7 · Dead Code · Unused export 'isValidVersionType' · ×1
  • Unused export 'isValidVersionType' packages/ci-actions/src/versions/get-next-package-version.ts:45 — Nothing imports this binding — it is safe to review for removal.
R7 · Dead Code · Unused export 'SvgAddOutline' · ×1
  • Unused export 'SvgAddOutline' packages/component-library/src/icons/v1/AddOutline.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAddSolid' · ×1
  • Unused export 'SvgAddSolid' packages/component-library/src/icons/v1/AddSolid.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAdjust' · ×1
  • Unused export 'SvgAdjust' packages/component-library/src/icons/v1/Adjust.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAirplane' · ×1
  • Unused export 'SvgAirplane' packages/component-library/src/icons/v1/Airplane.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAlbum' · ×1
  • Unused export 'SvgAlbum' packages/component-library/src/icons/v1/Album.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAlignCenter' · ×1
  • Unused export 'SvgAlignCenter' packages/component-library/src/icons/v1/AlignCenter.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAlignJustified' · ×1
  • Unused export 'SvgAlignJustified' packages/component-library/src/icons/v1/AlignJustified.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
R7 · Dead Code · Unused export 'SvgAlignLeft' · ×1
  • Unused export 'SvgAlignLeft' packages/component-library/src/icons/v1/AlignLeft.tsx:3 — Nothing ultimately consumes this binding: its only referrer is the re-export in packages/component-library/src/icons/v1/index.ts, whose re-exported name has no consumer either. Removing it is therefore not a one-file change — drop the re-export line in packages/component-library/src/icons/v1/index.ts in the same commit, or the barrel will import a name that no longer exists.
S1 · Web-Security Posture · No app-layer HTTPS enforcement detected · ×1
  • No app-layer HTTPS enforcement detected packages/sync-server/src/util/server-listen.ts:14 — `server.listen(…)` serves plain HTTP on a network address, and nothing in its package enforces HTTPS: no TLS served (`https.createServer`, Fastify `https`, Nest `httpsOptions`), no redirect of plain requests to `https://`, no `Strict-Transport-Security` (helmet sends it by default), and no TLS-terminating proxy configuration committed beside it — so a browser may talk to it in clear text. (−2.0 on this card.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 9/22 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — 4/16 of this repository's type-checking configuration(s) turn on strict null checking (`"strict": true`, or `"strictNullChecks": true`). A configuration that states neither is counted as OFF, because off is tsc's own default; a solution-style one whose `"files"` is empty and whose `"references"` point at other projects is in neither number, because it checks no source itself. Where it is off, `string` admits `null` and `undefined`: passing a value that is null compiles silently and throws on the first property access.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~0.2 `!` null assertions per 1k TypeScript source lines — 44 assertion(s) across the 252244 source line(s) of the 1761 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/loot-core/src/platform/client/browser-server/coordinator.ts (6), packages/desktop-client/src/components/accounts/Account.tsx (5), packages/desktop-electron/index.ts (5). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 11 finding(s)
D10 · Test Quality · Skipped (documented) · ×7
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:32 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:36 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:50 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:54 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:70 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/loot-core/src/shared/async.test.ts:74 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) packages/desktop-electron/e2e/navigation-security.test.ts:89 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D24 · Comment Value · doc comments repeat the names · ×4
  • doc comments repeat the names packages/crdt/src/crdt/timestamp.ts:92 — 0 of 0 documented parameters and 1 of 9 summaries in `@actual-app/crdt` only repeat the member or parameter name (e.g. "timestamp instance class" for `Timestamp`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/sync-server/src/app-gocardless/gocardless-node.types.ts:298 — 0 of 9 documented parameters and 2 of 119 summaries in `@actual-app/sync-server` only repeat the member or parameter name (e.g. "The type of balance" for `balanceType`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/desktop-client/e2e/page-models/account-page.ts:93 — 0 of 16 documented parameters and 5 of 463 summaries in `@actual-app/web` only repeat the member or parameter name (e.g. "Create a single transaction" for `createSingleTransaction`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names packages/eslint-plugin-actual/lib/utils/import-helpers.js:85 — 1 of 7 documented parameters and 0 of 13 summaries in `eslint-plugin-actual` only repeat the member or parameter name (e.g. "The name to import" for `importName`). Delete the restating tags, or add what the name does not say.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-884d69571a1b400d8a43a59731db4000/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-884d69571a1b400d8a43a59731db4000/history-1.json --exit-code 0 --source .9artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=3200" --report-format json --report-path /tmp/watchdog-gitleaks-884d69571a1b400d8a43a59731db4000/history-2.json --exit-code 0 --source .27artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=4200 --max-count=1590" --report-format json --report-path /tmp/watchdog-gitleaks-884d69571a1b400d8a43a59731db4000/history-3.json --exit-code 0 --source .5artifacts/raw/gitleaks-history-3.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-884d69571a1b400d8a43a59731db4000/tree.json --exit-code 0 --source .3artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .60artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .14artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .22artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 151 file(s) — `packages/api/models.ts`, `packages/ci-actions/src/news-feed/parse.ts`, `packages/ci-actions/src/versions/get-next-package-version.ts`, `packages/component-library/src/AlignedText.stories.tsx`, `packages/component-library/src/Block.stories.tsx`, … (+146 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1e777-f8c6-75d5-91de-d17ba1816489 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md