Public report of FREEZONEX/Tier0-Edge, published 16 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 reportMeasured 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, 16 November 2026, 15:36 UTC · Survey ID cd_3ae65490d9094dd889718206c28c0107
FREEZONEX/Tier0-Edge
Measured 16 November 2026, 15:35 UTC, at code version d0f5818
First survey, so nothing to compare with yet
CAI scoreAt 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: 119,913 lines of product code in 7 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Production Readiness, 12.9
Findings by how serious they are
151 critical1406 serious241 minor
11 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 15:35 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 ▸
85of 85 dimensions measured by tools.
1767of 1798 findings point to an exact file and line, so you can open each one in the code. The other 31 concern the repository as a whole, such as missing documentation.
85dimensions across 8 lenses, read from 119,913 lines of product code in 7 projects.
FREEZONEX/Tier0-Edge is rated At risk because critical security findings are open, most of them leaked passwords or keys. Its score is held back because four passwords or keys sit in the current code and we found no working pipeline that builds or tests changes to the code. It scores 32.7 out of 100, which the At risk rating leaves unchanged.
Production Readiness, at 12.9, is the weakest lens and counts most in the score. The best first step is replacing the four exposed passwords or keys and switching the old ones off, worth about 16.1 points. Fixing the package under a licence on your banned list comes next, worth about 4.5 points. Raising Production Readiness to 70 would lift the score to about 48.9.
Fifty-six passwords or keys in the code's history and four in the code are open to anyone who can read the repository. Twenty-five known security holes in the packages the code depends on can be used by attackers, and thirty-seven controls can't be used without a mouse. Replacing each exposed password or key, updating the vulnerable packages and making the controls work with a keyboard would close these risks. Setting a waiting period for automatic updates would fix the two automatic dependency updates that take new releases at once, and the three unsafe settings in infrastructure or container files need changing to safe values. The six images with no text description need a text description.
The product code is 119,913 lines, about €120,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 forThe 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.
If Production Readiness rose from 12.9 to 70, the lowest score rated Strong, the score would rise from 32.7 to about 48.9.
Code composition: what the lines of code are
Product code 99%Tests 1%
Rebuild cost: about €120,000 · Estimate
Cost to rebuild
€39,000 to €200,000, for 653 to 2,072 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, 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 33. 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.
Size
Large: 119,913 lines of product code
What it is not
Not 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 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4).
Raises the score by about 16.1 points · Low effort · REDACTED Scanning
2
Resolve the 1 Banned license finding(s) in License Compliance — start with package.json.
Resolve the 271 Low coverage finding(s) in Code Coverage — start with REDACTED (10), audit.go (3), backend.go.
Raises the score by about 15.9 points · High effort · Code Coverage
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 €120,000 to build again, about 0.8 person-years of work. Its weakest lens is Production Readiness, at 12.9 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 4 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 16.1 points for low effort, because it clears the 4 REDACTED Scanning 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 5.7 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 6% to 13% on every change. The history of the code shows how much it changes: about 144,873 lines over the last 90 days, which is about 587,540 lines a year. At that pace, the extra work comes to an estimated 83.6 to 501.6 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 · Code Duplication · 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.
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.
439 modules, with 188 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; 399 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.
backend/internal/infra/cache uses backend/internal/config, so a change to backend/internal/config can break backend/internal/infra/cache, while a change to backend/internal/infra/cache can't break backend/internal/config.
Position
Below the diagonal: backend/internal/infra/cache uses a module listed above it, which is the healthy direction.
backend/internal/repo uses backend/internal/config, so a change to backend/internal/config can break backend/internal/repo, while a change to backend/internal/repo can't break backend/internal/config.
Position
Below the diagonal: backend/internal/repo uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api.instances uses frontend.apps.anchor.src.api.models, so a change to frontend.apps.anchor.src.api.models can break frontend.apps.anchor.src.api.instances, while a change to frontend.apps.anchor.src.api.instances can't break frontend.apps.anchor.src.api.models.
Position
Below the diagonal: frontend.apps.anchor.src.api.instances uses a module listed above it, which is the healthy direction.
frontend.apps.web.src.apis.core-api uses frontend.apps.web.src.apis.core-api.fleet, so a change to frontend.apps.web.src.apis.core-api.fleet can break frontend.apps.web.src.apis.core-api, while a change to frontend.apps.web.src.apis.core-api can't break frontend.apps.web.src.apis.core-api.fleet.
Position
Below the diagonal: frontend.apps.web.src.apis.core-api uses a module listed above it, which is the healthy direction.
frontend.apps.web.src.apis.core-api uses frontend.apps.web.src.stores.types, so a change to frontend.apps.web.src.stores.types can break frontend.apps.web.src.apis.core-api, while a change to frontend.apps.web.src.apis.core-api can't break frontend.apps.web.src.stores.types.
Position
Below the diagonal: frontend.apps.web.src.apis.core-api uses a module listed above it, which is the healthy direction.
frontend.apps.web.src.hooks uses frontend.apps.web.src.stores.types, so a change to frontend.apps.web.src.stores.types can break frontend.apps.web.src.hooks, while a change to frontend.apps.web.src.hooks can't break frontend.apps.web.src.stores.types.
Position
Below the diagonal: frontend.apps.web.src.hooks uses a module listed above it, which is the healthy direction.
backend/internal/domain/apikey uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/apikey, while a change to backend/internal/domain/apikey can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/apikey uses a module listed above it, which is the healthy direction.
backend/internal/domain/asset uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/asset, while a change to backend/internal/domain/asset can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/asset uses a module listed above it, which is the healthy direction.
backend/internal/domain/audit uses backend/internal/contextx, so a change to backend/internal/contextx can break backend/internal/domain/audit, while a change to backend/internal/domain/audit can't break backend/internal/contextx.
Position
Below the diagonal: backend/internal/domain/audit uses a module listed above it, which is the healthy direction.
backend/internal/domain/audit uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/audit, while a change to backend/internal/domain/audit can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/audit uses a module listed above it, which is the healthy direction.
backend/internal/domain/auth uses backend/internal/contextx, so a change to backend/internal/contextx can break backend/internal/domain/auth, while a change to backend/internal/domain/auth can't break backend/internal/contextx.
Position
Below the diagonal: backend/internal/domain/auth uses a module listed above it, which is the healthy direction.
backend/internal/domain/auth uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/auth, while a change to backend/internal/domain/auth can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/auth uses a module listed above it, which is the healthy direction.
backend/internal/domain/dataingest uses backend/internal/config, so a change to backend/internal/config can break backend/internal/domain/dataingest, while a change to backend/internal/domain/dataingest can't break backend/internal/config.
Position
Below the diagonal: backend/internal/domain/dataingest uses a module listed above it, which is the healthy direction.
backend/internal/domain/dataingest uses backend/internal/infra/cache, so a change to backend/internal/infra/cache can break backend/internal/domain/dataingest, while a change to backend/internal/domain/dataingest can't break backend/internal/infra/cache.
Position
Below the diagonal: backend/internal/domain/dataingest uses a module listed above it, which is the healthy direction.
backend/internal/domain/dataingest uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/dataingest, while a change to backend/internal/domain/dataingest can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/dataingest uses a module listed above it, which is the healthy direction.
backend/internal/domain/iam uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/iam, while a change to backend/internal/domain/iam can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/iam uses a module listed above it, which is the healthy direction.
backend/internal/events uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/events, while a change to backend/internal/events can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/events uses a module listed above it, which is the healthy direction.
backend/internal/infra/outbox uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/infra/outbox, while a change to backend/internal/infra/outbox can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/infra/outbox uses a module listed above it, which is the healthy direction.
backend/internal/permission uses backend/internal/contextx, so a change to backend/internal/contextx can break backend/internal/permission, while a change to backend/internal/permission can't break backend/internal/contextx.
Position
Below the diagonal: backend/internal/permission uses a module listed above it, which is the healthy direction.
backend/internal/permission uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/permission, while a change to backend/internal/permission can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/permission uses a module listed above it, which is the healthy direction.
backend/internal/testkit uses backend/internal/infra/cache, so a change to backend/internal/infra/cache can break backend/internal/testkit, while a change to backend/internal/testkit can't break backend/internal/infra/cache.
Position
Below the diagonal: backend/internal/testkit uses a module listed above it, which is the healthy direction.
backend/internal/testkit uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/testkit, while a change to backend/internal/testkit can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/testkit uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api.scenes uses frontend.apps.anchor.src.api.instances, so a change to frontend.apps.anchor.src.api.instances can break frontend.apps.anchor.src.api.scenes, while a change to frontend.apps.anchor.src.api.scenes can't break frontend.apps.anchor.src.api.instances.
Position
Below the diagonal: frontend.apps.anchor.src.api.scenes uses a module listed above it, which is the healthy direction.
backend/internal/domain/flow uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/flow, while a change to backend/internal/domain/flow can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/flow uses a module listed above it, which is the healthy direction.
backend/internal/domain/flow uses backend/internal/infra/outbox, so a change to backend/internal/infra/outbox can break backend/internal/domain/flow, while a change to backend/internal/domain/flow can't break backend/internal/infra/outbox.
Position
Below the diagonal: backend/internal/domain/flow uses a module listed above it, which is the healthy direction.
backend/internal/middleware uses backend/internal/domain/audit, so a change to backend/internal/domain/audit can break backend/internal/middleware, while a change to backend/internal/middleware can't break backend/internal/domain/audit.
Position
Below the diagonal: backend/internal/middleware uses a module listed above it, which is the healthy direction.
backend/internal/middleware uses backend/internal/domain/auth, so a change to backend/internal/domain/auth can break backend/internal/middleware, while a change to backend/internal/middleware can't break backend/internal/domain/auth.
Position
Below the diagonal: backend/internal/middleware uses a module listed above it, which is the healthy direction.
backend/internal/middleware uses backend/internal/permission, so a change to backend/internal/permission can break backend/internal/middleware, while a change to backend/internal/middleware can't break backend/internal/permission.
Position
Below the diagonal: backend/internal/middleware uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api uses frontend.apps.anchor.src.api.models, so a change to frontend.apps.anchor.src.api.models can break frontend.apps.anchor.src.api, while a change to frontend.apps.anchor.src.api can't break frontend.apps.anchor.src.api.models.
Position
Below the diagonal: frontend.apps.anchor.src.api uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api uses frontend.apps.anchor.src.api.uns, so a change to frontend.apps.anchor.src.api.uns can break frontend.apps.anchor.src.api, while a change to frontend.apps.anchor.src.api can't break frontend.apps.anchor.src.api.uns.
Position
Below the diagonal: frontend.apps.anchor.src.api uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api uses frontend.apps.anchor.src.api.instances, so a change to frontend.apps.anchor.src.api.instances can break frontend.apps.anchor.src.api, while a change to frontend.apps.anchor.src.api can't break frontend.apps.anchor.src.api.instances.
Position
Below the diagonal: frontend.apps.anchor.src.api uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.api uses frontend.apps.anchor.src.api.scenes, so a change to frontend.apps.anchor.src.api.scenes can break frontend.apps.anchor.src.api, while a change to frontend.apps.anchor.src.api can't break frontend.apps.anchor.src.api.scenes.
Position
Below the diagonal: frontend.apps.anchor.src.api uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.viewer uses frontend.apps.anchor.src.api.instances, so a change to frontend.apps.anchor.src.api.instances can break frontend.apps.anchor.src.viewer, while a change to frontend.apps.anchor.src.viewer can't break frontend.apps.anchor.src.api.instances.
Position
Below the diagonal: frontend.apps.anchor.src.viewer uses a module listed above it, which is the healthy direction.
frontend.apps.anchor.src.viewer uses frontend.apps.anchor.src.api.scenes, so a change to frontend.apps.anchor.src.api.scenes can break frontend.apps.anchor.src.viewer, while a change to frontend.apps.anchor.src.viewer can't break frontend.apps.anchor.src.api.scenes.
Position
Below the diagonal: frontend.apps.anchor.src.viewer uses a module listed above it, which is the healthy direction.
backend/internal/domain/uns uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/domain/uns, while a change to backend/internal/domain/uns can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/domain/uns uses a module listed above it, which is the healthy direction.
backend/internal/domain/uns uses backend/internal/domain/dataingest, so a change to backend/internal/domain/dataingest can break backend/internal/domain/uns, while a change to backend/internal/domain/uns can't break backend/internal/domain/dataingest.
Position
Below the diagonal: backend/internal/domain/uns uses a module listed above it, which is the healthy direction.
backend/internal/domain/uns uses backend/internal/events, so a change to backend/internal/events can break backend/internal/domain/uns, while a change to backend/internal/domain/uns can't break backend/internal/events.
Position
Below the diagonal: backend/internal/domain/uns uses a module listed above it, which is the healthy direction.
backend/internal/domain/uns uses backend/internal/infra/outbox, so a change to backend/internal/infra/outbox can break backend/internal/domain/uns, while a change to backend/internal/domain/uns can't break backend/internal/infra/outbox.
Position
Below the diagonal: backend/internal/domain/uns uses a module listed above it, which is the healthy direction.
backend/internal/domain/uns uses backend/internal/domain/flow, so a change to backend/internal/domain/flow can break backend/internal/domain/uns, while a change to backend/internal/domain/uns can't break backend/internal/domain/flow.
Position
Below the diagonal: backend/internal/domain/uns uses a module listed above it, which is the healthy direction.
backend/internal/gateway uses backend/internal/config, so a change to backend/internal/config can break backend/internal/gateway, while a change to backend/internal/gateway can't break backend/internal/config.
Position
Below the diagonal: backend/internal/gateway uses a module listed above it, which is the healthy direction.
backend/internal/gateway uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/gateway, while a change to backend/internal/gateway can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/gateway uses a module listed above it, which is the healthy direction.
backend/internal/gateway uses backend/internal/domain/auth, so a change to backend/internal/domain/auth can break backend/internal/gateway, while a change to backend/internal/gateway can't break backend/internal/domain/auth.
Position
Below the diagonal: backend/internal/gateway uses a module listed above it, which is the healthy direction.
backend/internal/gateway uses backend/internal/permission, so a change to backend/internal/permission can break backend/internal/gateway, while a change to backend/internal/gateway can't break backend/internal/permission.
Position
Below the diagonal: backend/internal/gateway uses a module listed above it, which is the healthy direction.
backend/internal/gateway uses backend/internal/domain/flow, so a change to backend/internal/domain/flow can break backend/internal/gateway, while a change to backend/internal/gateway can't break backend/internal/domain/flow.
Position
Below the diagonal: backend/internal/gateway uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/config, so a change to backend/internal/config can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/config.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/infra/cache, so a change to backend/internal/infra/cache can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/infra/cache.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/apikey, so a change to backend/internal/domain/apikey can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/apikey.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/asset, so a change to backend/internal/domain/asset can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/asset.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/audit, so a change to backend/internal/domain/audit can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/audit.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/auth, so a change to backend/internal/domain/auth can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/auth.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/dataingest, so a change to backend/internal/domain/dataingest can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/dataingest.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/iam, so a change to backend/internal/domain/iam can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/iam.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/infra/outbox, so a change to backend/internal/infra/outbox can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/infra/outbox.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/permission, so a change to backend/internal/permission can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/permission.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/flow, so a change to backend/internal/domain/flow can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/flow.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/domain/uns, so a change to backend/internal/domain/uns can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/domain/uns.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
backend/internal/bootstrap uses backend/internal/gateway, so a change to backend/internal/gateway can break backend/internal/bootstrap, while a change to backend/internal/bootstrap can't break backend/internal/gateway.
Position
Below the diagonal: backend/internal/bootstrap uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in backend uses a type in backend/internal/config.
The types involved
backend.main → backend/internal/config.Config
Direction
backend uses backend/internal/config, so a change to backend/internal/config can break backend, while a change to backend can't break backend/internal/config.
Position
Below the diagonal: backend uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in backend uses a type in backend/internal/bootstrap.
The types involved
backend.main → backend/internal/bootstrap.App
Direction
backend uses backend/internal/bootstrap, so a change to backend/internal/bootstrap can break backend, while a change to backend can't break backend/internal/bootstrap.
Position
Below the diagonal: backend uses a module listed above it, which is the healthy direction.
backend/internal/svc uses backend/internal/config, so a change to backend/internal/config can break backend/internal/svc, while a change to backend/internal/svc can't break backend/internal/config.
Position
Below the diagonal: backend/internal/svc uses a module listed above it, which is the healthy direction.
backend/internal/svc uses backend/internal/bootstrap, so a change to backend/internal/bootstrap can break backend/internal/svc, while a change to backend/internal/svc can't break backend/internal/bootstrap.
Position
Below the diagonal: backend/internal/svc uses a module listed above it, which is the healthy direction.
backend/internal/handler/core/uns uses backend/internal/domain/uns, so a change to backend/internal/domain/uns can break backend/internal/handler/core/uns, while a change to backend/internal/handler/core/uns can't break backend/internal/domain/uns.
Position
Below the diagonal: backend/internal/handler/core/uns uses a module listed above it, which is the healthy direction.
backend/internal/handler/core/uns uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/handler/core/uns, while a change to backend/internal/handler/core/uns can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/handler/core/uns uses a module listed above it, which is the healthy direction.
backend/internal/handler/handlerx uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/handler/handlerx, while a change to backend/internal/handler/handlerx can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/handler/handlerx uses a module listed above it, which is the healthy direction.
backend/internal/handler/handlerx uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/handler/handlerx, while a change to backend/internal/handler/handlerx can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/handler/handlerx uses a module listed above it, which is the healthy direction.
backend/internal/logic/core/flow uses backend/internal/domain/flow, so a change to backend/internal/domain/flow can break backend/internal/logic/core/flow, while a change to backend/internal/logic/core/flow can't break backend/internal/domain/flow.
Position
Below the diagonal: backend/internal/logic/core/flow uses a module listed above it, which is the healthy direction.
backend/internal/logic/core/flow uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/logic/core/flow, while a change to backend/internal/logic/core/flow can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/logic/core/flow uses a module listed above it, which is the healthy direction.
backend/internal/logic/core/uns uses backend/internal/domain/uns, so a change to backend/internal/domain/uns can break backend/internal/logic/core/uns, while a change to backend/internal/logic/core/uns can't break backend/internal/domain/uns.
Position
Below the diagonal: backend/internal/logic/core/uns uses a module listed above it, which is the healthy direction.
backend/internal/logic/core/uns uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/logic/core/uns, while a change to backend/internal/logic/core/uns can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/logic/core/uns uses a module listed above it, which is the healthy direction.
backend/internal/logic/openapi/v1/uns uses backend/internal/repo, so a change to backend/internal/repo can break backend/internal/logic/openapi/v1/uns, while a change to backend/internal/logic/openapi/v1/uns can't break backend/internal/repo.
Position
Below the diagonal: backend/internal/logic/openapi/v1/uns uses a module listed above it, which is the healthy direction.
backend/internal/logic/openapi/v1/uns uses backend/internal/domain/uns, so a change to backend/internal/domain/uns can break backend/internal/logic/openapi/v1/uns, while a change to backend/internal/logic/openapi/v1/uns can't break backend/internal/domain/uns.
Position
Below the diagonal: backend/internal/logic/openapi/v1/uns uses a module listed above it, which is the healthy direction.
backend/internal/logic/openapi/v1/uns uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/logic/openapi/v1/uns, while a change to backend/internal/logic/openapi/v1/uns can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/logic/openapi/v1/uns uses a module listed above it, which is the healthy direction.
backend/internal/svc/svctest uses backend/internal/config, so a change to backend/internal/config can break backend/internal/svc/svctest, while a change to backend/internal/svc/svctest can't break backend/internal/config.
Position
Below the diagonal: backend/internal/svc/svctest uses a module listed above it, which is the healthy direction.
backend/internal/svc/svctest uses backend/internal/svc, so a change to backend/internal/svc can break backend/internal/svc/svctest, while a change to backend/internal/svc/svctest can't break backend/internal/svc.
Position
Below the diagonal: backend/internal/svc/svctest uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 44.1 · Weak · gated by D1, D2, R10, X5 ·
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 category
Findings
Severity
A07:2025 — Authentication Failures
65
High / Critical
A03:2025 — Software Supply Chain Failures
45
High / Critical
A05:2025 — Injection
29
High / Critical
A02:2025 — Security Misconfiguration
10
High / Critical
Roadmap
Top priorities: Resolve the 4 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4); Resolve the 271 Low coverage finding(s) in Code Coverage — start with REDACTED (10), audit.go (3), backend.go; Resolve the 1 Banned license finding(s) in License Compliance — start with package.json.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 4 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4).
Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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.
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 — 151
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 — 1406
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 — 241
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 11
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 85 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 — 85 dimensions across the health lenses
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
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, 1767 of 1798 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D14 License Compliance — 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 repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its npm package dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
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.
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.
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. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
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.
D27 Navigability — 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
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. `frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx` 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. 57 further occurrence(s) are not listed individually; the score already reflects all 97.
AC4 Keyboard semantics — 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. 9 further occurrence(s) are not listed individually; the score already reflects all 49.
AXB2 Runtime readiness — 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. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
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. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
DM9 Scattered domain decisions — 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. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
DM9 Scattered domain decisions — 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. Some of this repository's production types come from a frontend that does not bind comparison operands to the members they read, which arm one needs, and those types were not walked for this dimension. The counts above speak for the languages that declare it.
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. 268 further occurrence(s) are not listed individually; the score already reflects all 308.
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. 120 further occurrence(s) are not listed individually; the score already reflects all 160.
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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
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. 124 further occurrence(s) are not listed individually; the score already reflects all 164.
S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
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. 125 further occurrence(s) are not listed individually; the score already reflects all 165.
X12 Unreachable branch — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X16 Unfloored truncation loop — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X17 Uncapped recursion over a caller-supplied document — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X18 Disposal-pattern correctness — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X21 Side-effecting pattern guard — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X24 Document value interpolated into markup unescaped — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X25 Inert configuration knob — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X27 Collection changed while being enumerated — 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's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X29 Per-element action decided by a fixed element — 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 check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
X3 Exception handling — 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. 53 further occurrence(s) are not listed individually; the score already reflects all 93.
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.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
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.
D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
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.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
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.
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 (REDACTED, 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.
DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
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".
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.
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.
210 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was index.TopTreeCom at 112. A further 7 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 audit.businessTypeFromPath at 21 — they are counted neither in the figure above nor in this dimension's score. 4 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: frontend/apps/web/src/routers/index.tsx (index.getRoutesDom at 20), backend/internal/domain/dataingest/latest_cache.go (dataingest.qualityFromAny at 18), backend/internal/logic/openapi/v1/uns/helper.go (uns.boolFromOpenapiValue at 18), frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/FormItems.tsx (FormItems.renderItems at 18). 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.
+ 193 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 17 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with index.TopTreeCom (cyclomatic 112), index.InstanceDetailPage (cyclomatic 107), FleetNodeDetailPage.FleetNodeDetailPage (cyclomatic 97). — 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 17 together lifts Cyclomatic Complexity from 2.8 to about 4.4/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 227 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 23 bodies over 60 down to 60 or less in Cognitive Complexity — start with index.TopTreeCom (cognitive 181), treeStore.createTreeStore (cognitive 170), index.FormStep (cognitive 125). — 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 23 together lifts Cognitive Complexity from 2.0 to about 3.8/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes4.2 / 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.
Resolve the 134 FunctionTooLong finding(s) in God Classes — start with REDACTED (57), runtime-regression.mjs (3), treeStore.tsx (2). — One of this dimension's main actionable groups (134 warning-level).
Resolve the 24 FileTooLong finding(s) in God Classes — start with REDACTED (9), REDACTED (4), iam.go. — One of this dimension's main actionable groups (24 warning-level).
Resolve the 7 ClassTooLong finding(s) in God Classes — start with REDACTED, iam.go, ImportAppModal.tsx. — One of this dimension's main actionable groups (7 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
68 duplicated block group(s) detected. 3.3 % of the production lines (3,900 of 119,913) are in a reported copy. A further 85 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. Measured on part of this repository only: .tsx, .ts (74% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.
Edited copy of a member (7 corresponding lines) · ×9backend/internal/logic/core/uns/unsNodeListLogic.go:32
Edited copy of a member (11 corresponding lines) · ×7REDACTED:813
Edited copy of a member (17 corresponding lines) · ×6backend/internal/handler/core/flow/flowCreateHandler.go:16
+ 64 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with REDACTED (3), nodered_payload.go, roleCrudHandlers.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 11 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), unsNodeListHandler.go, assetDetailHandler.go. — One of this dimension's main actionable groups (11 warning-level).
Resolve the 9 Edited copy of a member (7 corresponding lines) finding(s) in Code Duplication — start with nodered_payload.go (2), unsNodeListLogic.go, roleListLogic.go. — One of this dimension's main actionable groups (9 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling10.0 / 10Exemplary✓ 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.
6 production modules (npm+Go), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 0 module(s) off the main sequence, with abstractness counted on 5 of the 6 (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).
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.
Low cohesion: Service (LCOM4 6) · ×2backend/internal/domain/audit/service.go:106
What to do
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with REDACTED, auditlogMiddleware.go. — 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.
Do you agree with this assessment?
D8 · Code Coverage1.0 / 10Critical✓ Tool-verified
What it measures: How much of the code is actually exercised by tests.
Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.
Line coverage 3.5% — 271 file(s) below 50%. Measured from the Go suite (backend: `go test -coverprofile -coverpkg=./...`, the 3 run(s) test reliability made). Taken over 3 runs of the suite: a line counts as covered only when every run executed it.
Resolve the 271 Low coverage finding(s) in Code Coverage — start with REDACTED (10), audit.go (3), backend.go. — One of this dimension's main actionable groups (271 warning-level).
Detailed fixes: d8_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ 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.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
15 outdated, 0 author-deprecated direct Go module(s), 0 pinning or checksum defect(s). Whether any of these modules is UNMAINTAINED is not graded — proxy.golang.org publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, not a registry one. Known CVEs in this module graph are D30's question, read from REDACTED and go.sum there.
Outdated: github.com/alicebob/miniredis/v2 · ×15
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
2 secret(s) detected. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
REDACTED
What to do
Resolve the 4 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 782 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 782 package(s) this repository's committed lockfile installs for a consumer — its 73 production, optional and peer dependency(ies), across 4 product package.json manifest(s), and everything those install in turn. Its 59 `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. 1 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. 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, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's npm package dependencies and nothing else. The repository also declares a Go module (REDACTED/go.sum), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
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.
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.
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.
9 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is frontend/apps/web/src/pages/collection-flow/index.tsx. Counted over 385 of the 840 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
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.
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.
12 deducted task-comment markers across 116951 LoC (0.0/KLoC) → score 10.0. 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 repeated across 11 filesbackend/internal/logic/core/uns/unsExportGlobalLogic.go:30
What to do
Resolve the 1 FixmeComment finding(s) in Explicit Debt — start with i18n-store.ts. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 TodoComment repeated across 11 files finding(s) in Explicit Debt — start with unsExportGlobalLogic.go. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 2 documentation facets pass in full; short on: F4 map. 4 document(s) read across 7 unit(s).
Documentation: no map of the repository's partsREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with backend.go. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 naming inconsistencies among 18 declarations measured against a convention their peers follow.
`durationMS` spells `MS` where 17 names in the project spell it `Ms`backend/internal/repo/migration_versioned.go:225
What to do
Resolve the 1 `durationMS` spells `MS` where 17 names in the project spell it `Ms` finding(s) in Naming Consistency — start with migration_versioned.go. — 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.
Do you agree with this assessment?
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.
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.
doc comments repeat the namesfrontend/apps/web/src/utils/storage.ts:4
What to do
Resolve the 1 redundant comment finding(s) in Comment Value — start with types.tsx. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.
3 of 7 build units (Go, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×3frontend/apps/web/package.json:1
What to do
Resolve the 3 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with package.json (2), REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).
Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
60 finding(s): 0 critical, 56 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
REDACTED
REDACTED
REDACTED
REDACTED
What to do
Resolve the 34 REDACTED finding(s) in Secrets (history) — start with REDACTED (8), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (34 issue-level).
Resolve the 22 High secret finding(s) in Secrets (history) — start with REDACTED (7), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (22 issue-level).
Resolve the 4 REDACTED finding(s) in Secrets (history) — start with REDACTED (4). — One of this dimension's main actionable groups (4 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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).
29 finding(s): 0 critical, 4 high, 25 medium, 0 low. semgrep hit a parse error in 13 file(s) — `REDACTED`, `deploy/bin/common.sh` (line 454, line 905), `deploy/bin/compose.sh` (line 135), `deploy/bin/docker-runtime.sh` (line 29), `deploy/bin/prepare-web-artifacts.sh` (line 48), … (+8 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.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 6 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 21 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (19), REDACTED (2). — One of this dimension's main actionable groups (21 issue-level).
Resolve the 18 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9), REDACTED (9). — One of this dimension's main actionable groups (18 warning-level).
Resolve the 4 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3), REDACTED. — One of this dimension's main actionable groups (4 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 6 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
118 of 385 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is frontend/apps/web/src/pages/uns/store/treeStore.tsx. Counted over 385 of the 840 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Resolve the 113 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (41), REDACTED (4), types.ts (3). — One of this dimension's main actionable groups (113 recommendation-level).
Resolve the 5 Orphaned knowledge finding(s) in Knowledge Freshness — start with REDACTED (3), treeStore.tsx, EditButton.tsx. — One of this dimension's main actionable groups (5 issue-level).
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.
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.
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.
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.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 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.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives4.9 / 10Weak✓ Tool-verified
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.
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×6) — frontend/apps/web/src/layout/custom-nav/index.tsx:60, frontend/apps/web/src/layout/custom-nav/index.tsx:76, frontend/apps/web/src/layout/custom-nav/index.tsx:78, …
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels3.9 / 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 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. (×15) — frontend/apps/anchor/src/components/topic-select.tsx:76, frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:279, frontend/apps/anchor/src/pages/instance-detail/mapping-table.tsx:335, …
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. (×20) — frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:242, frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:267, frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:303, …
A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). — frontend/apps/anchor/src/pages/instance-detail/tag-overlay.tsx:167
This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — frontend/apps/web/src/components/custom-paragraph/index.tsx:43
This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×3) — frontend/apps/web/src/pages/license-activation/index.tsx:184, frontend/apps/web/src/pages/license-activation/index.tsx:226, frontend/apps/web/src/pages/license-activation/index.tsx:244
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.
Do you agree with this assessment?
AC3 · Page structure7.0 / 10Strong✓ 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.
An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. — frontend/apps/web/src/pages/share/index.tsx:10
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.
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".
This <div> 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. (×3) — frontend/apps/anchor/src/components/resizable-split.tsx:55, frontend/apps/web/src/components/com-layout/ComLeft.tsx:110, frontend/apps/web/src/components/pro-table/index.tsx:266
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — frontend/apps/anchor/src/pages/model-detail/index.tsx:177, frontend/apps/web/src/pages/open-data/index.tsx:110
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×30) — frontend/apps/anchor/src/pages/model-library/index.tsx:215, frontend/apps/anchor/src/pages/scene-editor/index.tsx:509, frontend/apps/anchor/src/pages/scene-editor/index.tsx:516, …
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×3) — REDACTED:81, REDACTED:91, REDACTED:131
An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action. — frontend/apps/web/src/hooks/useDownloadNotification.tsx:20
This <div> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click. — frontend/apps/web/src/pages/fleet-shared/FleetContainerLogsDrawer.tsx:282
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
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.
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.
`.statusActive` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — frontend/apps/web/src/pages/project/index.module.scss:71, frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:72
`.statusInactive` sets color: #dd3636 on background-color: #feebeb — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — frontend/apps/web/src/pages/project/index.module.scss:77, frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:78
`.roleTag` sets color: #d97706 on background-color: #fffbeb — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — frontend/apps/web/src/pages/project/components/tabs-content/members/index.module.scss:44, frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:96
`.statusFailed` sets color: #dd3636 on background-color: #feebeb — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:90
`.tableWrap :global(.ant-table-thead > tr > th)` sets color: #a8a8a8 on background-color: #fff — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. (×2) — frontend/apps/web/src/pages/notebook/index.module.scss:200, frontend/apps/web/src/pages/mqtt-auth/index.module.scss:203
`:global(.ant-table-thead > tr > th)` sets color: #a8a8a8 on background-color: #fff — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/mqtt-auth/edge-sync-restored.module.scss:245
`.successTag` sets color: #059669 on background-color: #ecfdf5 — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/mqtt-auth/index.module.scss:249
`.connectedStatusTag` sets color: #059669 on background-color: #ecfdf5 — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/mqtt-auth/index.module.scss:255
`.disconnectedTag` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/mqtt-auth/index.module.scss:273
`.recent-icon` sets color: #fff on background-color: #a8a8a8 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/home/index.module.scss:220
`.running` sets color: #16a34a on background-color: #f0fdf4 — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:12
`.stopped` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:24
`.fallback` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:42
`.metaChip` sets color: #878787 on background-color: #f9f9f9 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:293
`.containerStateRunning` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:512
`.statusTagActive` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:728
`.successTag` sets color: #2f8f63 on background-color: #d4f4e2 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/audit-log/index.module.scss:196
`.failedTag` sets color: #c92a2a on background-color: #fcd9d9 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/audit-log/index.module.scss:202
`.statusAvailable` sets color: #2f8f63 on background-color: #d4f4e2 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/account-management/index.module.scss:101
`.statusUnavailable` sets color: #c92a2a on background-color: #fcd9d9 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/pages/account-management/index.module.scss:107
`li.CodeMirror-hint-active` sets color: white on background-color: #08f — 3.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — frontend/apps/web/src/components/com-formula/code-editor/index.scss:169
`.custom-theme :global .cm-focused` 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. — frontend/apps/web/src/theme/codemirror.module.scss:4
`.unsContainer .chartWrap .topicDetailWrap .topicDetailContent .tableWrap .payload-code-view.code-snippet .code-snippet-container: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. — frontend/apps/web/src/pages/uns/index.scss:405
`.regionCameraPickerValue :global(svg)` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/pages/vision/index.module.scss:936
`.detailTopologyWrap .detailTopologyContent .loading-spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/pages/uns/components/topic-detail/TopologyChart.module.scss:113
`.loading-spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.module.scss:219
`.license-activation-page .form-section .form-container .action-area .activate-button.loading::after` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/pages/license-activation/index.scss:294
`.business-sidebar` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/layout/business-sidebar.module.scss:10
`.menu-label:hover .menu-label-icon` moves (`transition: transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/layout/custom-menu-header/components/index.scss:8
`.pro-table-container .pro-table-expand-button` moves (`transition: right 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/components/pro-table/index.scss:209
`.inline-loading .ods-loading_svg` moves (`animation: rotate 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/components/inline-loading/index.scss:22
`.com-dot .com-dot-dot.breathing::after` moves (`animation: com-dot-breathing 1.5s infinite ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/components/com-dot/index.scss:43
`.code-snippet-btn--expand .code-snippet-icon` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/components/code-snippet/index.scss:46
`.code-snippet--multi .code-snippet-container` moves (`transition: max-height 150ms cubic-bezier(0.2, 0, 0.38, 0.9)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/apps/web/src/components/code-snippet/index.scss:198
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.
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.
Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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.
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.
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.
Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Do you agree with this assessment?
DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged
Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.
Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.
Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.
Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.
Do you agree with this assessment?
DM4 · Rich vs anemic model3.3 / 10Weak✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`APIKey` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/apikey.go:16
`sysApiKey` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/apikey.go:45
`AssetFile` is an aggregate/entity with 17 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/asset.go:12
`AssetBinding` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/asset.go:41
`AsyncJob` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/async_job.go:18
`Flow` is an aggregate/entity with 13 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/flow.go:15
`GatewayRoute` is an aggregate/entity with 18 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/gateway.go:14
`User` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:17
`ResourceAction` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:80
`sysUserInfo` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:93
`sysRoleInfo` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:107
`sysResourceInfo` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:120
`sysResourceAction` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:138
`sysWorkspaceUser` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/iam.go:160
`CreateTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:11
`OnlyTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:15
`DeletedTimeField` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:20
`SoftTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:30
`CreatorTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:46
`CreatorCreateTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/model_fields.go:56
`OutboxEvent` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/outbox.go:12
`UnsLabel` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/uns_label.go:8
`UnsNamespaceNodeVersion` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/uns_namespace_node_version.go:16
`UnsNode` is an aggregate/entity with 21 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/uns_node.go:14
`UnsTemplate` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — backend/internal/repo/uns_template.go:8
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.
Method: Roslyn (DDD-gated): entities scanned for publicly writable state — public setters, and (C#/VB) own mutable collections handed out through an auto-property, a public field or a bare-field expression getter, where a computed/copying getter is never charged. One finding per entity; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.
Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.
Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.
Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.
Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.
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.
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.
`searchRestField` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:255
`getAlertForSelect` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:258
`getUnsExportRecordsApi` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:510
`getEmptyFolder` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:548
`getCollectorList` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:550
`getSourceList` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in. — frontend/apps/web/src/apis/core-api/uns.ts:551
Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition. (×4) — frontend/apps/web/src/pages/home/components/OverviewList.tsx:71, frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:320, frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:108, …
`onRefreshTab` has an empty body — confirm it's an intentional no-op and not an unfinished method. — frontend/apps/web/src/contexts/tabs-context.ts:11
`onCloseTab` has an empty body — confirm it's an intentional no-op and not an unfinished method. — frontend/apps/web/src/contexts/tabs-context.ts:12
`onCloseOtherTab` has an empty body — confirm it's an intentional no-op and not an unfinished method. — frontend/apps/web/src/contexts/tabs-context.ts:13
`onRemoveTab` has an empty body — confirm it's an intentional no-op and not an unfinished method. — frontend/apps/web/src/contexts/tabs-context.ts:14
What to do
Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
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.
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.
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.
No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
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.
Tests aren't where this ecosystem separates them — a `_test.go` file beside the code it tests is the convention, and none is present.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified
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.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
Do you agree with this assessment?
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.
Do you agree with this assessment?
P2 · Observability3.0 / 10Weak✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
No logging call was found in the 853 JavaScript/TypeScript, Go production file(s) this check read across 8 module(s). Each was searched for its ecosystem's logging libraries (Go: log, log/slog, zap, zerolog, logrus, klog, hclog, logr; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
What to do
Adopt pino (or winston) and log at meaningful points in the services you run.
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.
No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
`frontend/apps/anchor/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — frontend/apps/anchor/package.json:11
What to do
Run what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
What to do
Add an approval/environment gate (required reviewers / protection rules) before production promotion.
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.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
Do you agree with this assessment?
P9 · Domain vs controller coverage1.7 / 10Critical✓ Tool-verified
Readiness · Readiness — Whether test coverage concentrates on the domain (business rules) rather than the trivial web/controller layer — a focus check a generic tool can't make.
Method: Roslyn plus test-execution analysis: domain-layer versus trivial web/controller coverage ratio. Computed metric, deterministic.
Domain coverage is 8%, against a bar of 50% for this row — the layer carrying the business rules is the least covered part of the codebase that matters most. Measured over the types this analyzer classifies as domain (aggregates, value objects, domain services), so code the classifier does not place in the domain is neither counted for nor against this figure.
What to do
Raise unit-test coverage of the domain (aggregates, value objects, domain services) — that's where correctness matters most.
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.
Do you agree with this assessment?
R1 · Type Safety9.8 / 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.
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.
61 duplicated blocks under frontend/apps/web/src/pages/ have copies in at least two of the sibling directories account-management, audit-log, cluster, collection-flow, event-flow, fleet-management (+18 more sibling(s) not listed) — 33 of them are reported below, and 28 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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. — frontend/apps/web/src/pages/collection-flow/index.tsx:21
57 duplicated blocks under frontend/apps/web/src/ have copies in at least two of the sibling directories apis, components, layout, pages, routers, utils — 52 of them are reported below, and 5 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 57 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 57 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 57 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:911
17 duplicated blocks under frontend/apps/web/src/pages/uns/components/ have copies in at least two of the sibling directories data-subscript, export-modal, label-detail, model-detail, reverse-modal, schema-modal (+4 more sibling(s) not listed) — 12 of them are reported below, and 5 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. — frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224
14 duplicated blocks under frontend/apps/web/src/pages/routing-management/components/ have copies in at least two of the sibling directories certificates-tab, consumers-tab, plugins-tab, routes-tab, services-tab — 10 of them are reported below, and 4 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 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 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 14 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. — frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12
12 duplicated blocks under frontend/apps/anchor/src/pages/ have copies in at least two of the sibling directories instance-detail, model-detail, model-library, qr-viewer, scene-editor, scene-library — 10 of them are reported below, and 2 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 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 12 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. — frontend/apps/anchor/src/pages/model-library/index.tsx:34
10 duplicated blocks under frontend/apps/ have copies in at least two of the sibling directories anchor, web — 7 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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. — frontend/apps/anchor/src/theme/theme-token.ts:2
6 duplicated blocks under frontend/apps/web/src/pages/project/components/tabs-content/ have copies in at least two of the sibling directories apps, flows, members, roles — 1 of them are reported below, and 5 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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. — frontend/apps/web/src/pages/project/components/tabs-content/apps/index.tsx:234
frontend/apps/web/src/pages/collection-flow/index.tsx:21 · frontend/apps/web/src/pages/event-flow/index.tsx:10 — these 2 files are line-for-line copies of one another — 509 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. — frontend/apps/web/src/pages/collection-flow/index.tsx:21
REDACTED:1 · REDACTED:1 — these 2 files are line-for-line copies of one another — 450 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. — REDACTED:1
frontend/apps/web/src/components/cloud-sync/index.tsx:911 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:1135 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:911
frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:334 · frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:115 — the two spans are one implementation copied and then locally edited — 1487 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. — frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:334
frontend/apps/web/src/components/cloud-sync/index.tsx:404 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:499 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:404
REDACTED:6 · REDACTED:6 — these 2 files are line-for-line copies of one another — 258 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. — REDACTED:6
frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12 · frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:23 — the two spans are one implementation copied and then locally edited — 1123 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. — frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12
frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:50 · frontend/apps/web/src/pages/vision/CameraInputsPanel.tsx:30 — the two spans are one implementation copied and then locally edited — 1087 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. — frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:50
frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:73 · frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:54 — the two spans are one implementation copied and then locally edited — 1086 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. — frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:73
frontend/apps/web/src/components/cloud-sync/index.tsx:701 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:871 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:701
frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:127 · frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:212 — the two spans are one implementation copied and then locally edited — 877 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. — frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:127
frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:168 · frontend/apps/web/src/pages/uns/store/treeStore.tsx:236 — the two spans are one implementation copied and then locally edited — 873 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. — frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:168
frontend/apps/anchor/src/viewer/use-model-viewer.ts:88 · frontend/apps/anchor/src/viewer/use-scene-editor.ts:139 — the two spans are one implementation copied and then locally edited — 1019 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. — frontend/apps/anchor/src/viewer/use-model-viewer.ts:88
frontend/apps/anchor/src/pages/model-library/index.tsx:34 · frontend/apps/anchor/src/pages/scene-library/index.tsx:23 — the two spans are one implementation copied and then locally edited — 914 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. — frontend/apps/anchor/src/pages/model-library/index.tsx:34
frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:24 · frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:45 — the two spans are one implementation copied and then locally edited — 959 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. — frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:24
frontend/apps/anchor/src/theme/theme-token.ts:2 · frontend/apps/web/src/theme/theme-token.ts:1 — these 2 files are line-for-line copies of one another — 138 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. — frontend/apps/anchor/src/theme/theme-token.ts:2
frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:68 · frontend/apps/web/src/pages/uns/components/uns-dashboard/CloudSyncConnectModal.tsx:25 — the two spans are one implementation copied and then locally edited — 890 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. — frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:68
frontend/apps/web/src/apis/core-api/event-flow.ts:4 · frontend/apps/web/src/apis/core-api/flow.ts:28 — the two spans are one implementation copied and then locally edited — 1099 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. — frontend/apps/web/src/apis/core-api/event-flow.ts:4
frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:59 · frontend/apps/web/src/pages/uns/components/import-modal/JsonDom.tsx:51 — the two spans are one implementation copied and then locally edited — 667 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. — frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:59
frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:59 · frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:386 — the two spans are one implementation copied and then locally edited — 555 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. — frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:59
frontend/apps/web/src/hooks/usePagination.ts:56 · frontend/apps/web/src/hooks/useSimpleRequest.ts:30 — the two spans are one implementation copied and then locally edited — 437 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. — frontend/apps/web/src/hooks/usePagination.ts:56
frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:183 · frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:280 — the two spans are one implementation copied and then locally edited — 581 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. — frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:183
frontend/apps/web/src/pages/account-management/components/useAddUser.tsx:36 · frontend/apps/web/src/pages/account-management/components/useResetPassword.tsx:18 — the two spans are one implementation copied and then locally edited — 322 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. — frontend/apps/web/src/pages/account-management/components/useAddUser.tsx:36
frontend/apps/web/src/pages/vision/AlgorithmImportModal.tsx:10 · frontend/apps/web/src/pages/vision/AlgorithmUpdateModelModal.tsx:11 — the two spans are one implementation copied and then locally edited — 568 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. — frontend/apps/web/src/pages/vision/AlgorithmImportModal.tsx:10
frontend/apps/web/src/components/cloud-sync/index.tsx:2153 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2865 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:2153
frontend/apps/web/src/pages/account-management/index.tsx:49 · frontend/apps/web/src/pages/audit-log/index.tsx:65 — the two spans are one implementation copied and then locally edited — 529 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. — frontend/apps/web/src/pages/account-management/index.tsx:49
frontend/apps/web/src/pages/launchpad/components/AppTable.tsx:22 · frontend/apps/web/src/pages/launchpad/components/ProjectTable.tsx:27 — 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. — frontend/apps/web/src/pages/launchpad/components/AppTable.tsx:22
frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:298 · frontend/apps/web/src/pages/fleet-runtime/index.tsx:266 — the two spans are one implementation copied and then locally edited — 350 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. — frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:298
frontend/apps/web/src/components/cloud-sync/index.tsx:1982 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2682 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:1982
frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224 · frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:329 — the two spans are one implementation copied and then locally edited — 356 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. — frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224
frontend/apps/web/src/components/cloud-sync/index.tsx:102 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:111 — 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:102
frontend/apps/web/src/pages/mqtt-auth/index.tsx:2455 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2516 — the two spans are one implementation copied and then locally edited — 376 tokens are still identical, in the same order in both spans, 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. — frontend/apps/web/src/pages/mqtt-auth/index.tsx:2455
frontend/apps/web/src/pages/vision/AlgorithmFormModal.tsx:53 · frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx:37 — the two spans are one implementation copied and then locally edited — 341 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. — frontend/apps/web/src/pages/vision/AlgorithmFormModal.tsx:53
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.
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.
scripts/check-i18n.mjs:4 reaches into another package with a relative path (../frontend/apps/web/scripts/i18n-fallback-keys.mjs) — import the package by name instead. — scripts/check-i18n.mjs:4
scripts/generate-i18n-fallback.mjs:4 reaches into another package with a relative path (../frontend/apps/web/scripts/i18n-fallback-keys.mjs) — import the package by name instead. — scripts/generate-i18n-fallback.mjs:4
What to do
Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
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.
MqttAuthPage has cyclomatic complexity 70 and cognitive complexity 62; 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. — frontend/apps/web/src/pages/mqtt-auth/index.tsx:372
ProCard has cyclomatic complexity 67 and cognitive complexity 58; 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. — frontend/apps/web/src/components/pro-card/ProCard.tsx:16
mapUnsNode has cyclomatic complexity 58 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. — frontend/apps/web/src/apis/core-api/core-adapter.ts:818
buttonParentResourceKey has cyclomatic complexity 56 and cognitive complexity 46; 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. — frontend/apps/web/src/apis/core-api/core-adapter.ts:513
runBrowserRegression has cyclomatic complexity 53 and cognitive complexity 64; 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. — deploy/regression/runtime-regression.mjs:237
(anonymous) has cyclomatic complexity 50 and cognitive complexity 91; 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. — frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:88
renderBranchEdgeNodeContent has cyclomatic complexity 49 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 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. — frontend/apps/web/src/pages/mqtt-auth/index.tsx:2325
RegionEditor has cyclomatic complexity 49 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. — frontend/apps/web/src/pages/vision/RegionEditor.tsx:22
MqttAuthPage has cyclomatic complexity 48 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 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:310
(anonymous) has cyclomatic complexity 46 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. — frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.tsx:92
getFormData has cyclomatic complexity 41 and cognitive complexity 79; 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. — frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:132
InstanceDetailPage has cyclomatic complexity 41 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. — frontend/apps/anchor/src/pages/instance-detail/index.tsx:52
(anonymous) has cyclomatic complexity 41 and cognitive complexity 28; 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. — frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:67
loadData has cyclomatic complexity 37 and cognitive complexity 83; 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. — frontend/apps/web/src/pages/uns/store/treeStore.tsx:202
(anonymous) has cyclomatic complexity 37 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 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. — frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:736
CodeSnippet has cyclomatic complexity 37 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. — frontend/apps/web/src/components/code-snippet/index.tsx:158
runRuntimeRegression has cyclomatic complexity 37 and cognitive complexity 46; 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. — deploy/regression/runtime-regression.mjs:1159
runFlowFolderJourney has cyclomatic complexity 37 and cognitive complexity 38; 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. — deploy/regression/runtime-regression.mjs:887
FleetNodeDetailPage has cyclomatic complexity 37 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. — frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:147
(anonymous) has cyclomatic complexity 36 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 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. — frontend/apps/anchor/src/viewer/use-scene-editor.ts:458
(anonymous) has cyclomatic complexity 35 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. (×2) — frontend/apps/web/src/components/cloud-sync/index.tsx:965, frontend/apps/web/src/pages/mqtt-auth/index.tsx:1189
mapFlow has cyclomatic complexity 35 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. — frontend/apps/web/src/apis/core-api/core-adapter.ts:903
CollectionFlow has cyclomatic complexity 32 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. — frontend/apps/web/src/pages/collection-flow/index.tsx:76
(anonymous) has cyclomatic complexity 30 and cognitive complexity 30; 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. — frontend/apps/web/src/components/lucide-icon/menu-icon-map.ts:63
TaskDetailModal has cyclomatic complexity 29 and cognitive complexity 28; 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. — frontend/apps/web/src/pages/vision/TaskDetailModal.tsx:20
copyNodePayload has cyclomatic complexity 29 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. — frontend/apps/web/src/apis/core-api/uns.ts:433
toUnsPayload has cyclomatic complexity 29 and cognitive complexity 16; 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. — frontend/apps/web/src/apis/core-api/uns.ts:23
(anonymous) has cyclomatic complexity 28 and cognitive complexity 38; 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. — frontend/apps/web/src/pages/uns/components/use-create-modal/path-utils.ts:66
EventFlow has cyclomatic complexity 28 and cognitive complexity 29; 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. — frontend/apps/web/src/pages/event-flow/index.tsx:60
runFoundationJourney has cyclomatic complexity 27 and cognitive complexity 24; 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. — deploy/regression/runtime-regression.mjs:646
CloudSyncConnectModal has cyclomatic complexity 27 and cognitive complexity 23; 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. — frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:54
renderBranchEdgeNodeContent has cyclomatic complexity 27 and cognitive complexity 22; 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. — frontend/apps/web/src/components/cloud-sync/index.tsx:1828
LicenseActivation has cyclomatic complexity 27 and cognitive complexity 21; 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. — frontend/apps/web/src/pages/license-activation/index.tsx:20
(anonymous) has cyclomatic complexity 26 and cognitive complexity 22; 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. — frontend/apps/web/src/apis/core-api/core-adapter.ts:660
updateBaseStore has cyclomatic complexity 25 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. — frontend/apps/web/src/stores/base/index.ts:170
(anonymous) has cyclomatic complexity 24 and cognitive complexity 19; 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. — frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:32
ReverseGeneration has cyclomatic complexity 24 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. — frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/ReverseGeneration.tsx:24
edgeNodeConnectionObjectFromRecord has cyclomatic complexity 23 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 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. — frontend/apps/web/src/pages/mqtt-auth/index.tsx:192
(anonymous) has cyclomatic complexity 23 and cognitive complexity 23; 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. — frontend/apps/web/src/components/lucide-icon/legacy-icon-map.ts:108
Do you agree with this assessment?
R3 · Large Files6.8 / 10Adequate✓ 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.
frontend/apps/web/src/pages/mqtt-auth/index.tsx has 2898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/mqtt-auth/index.tsx:1
frontend/apps/web/src/components/cloud-sync/index.tsx has 2170 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/components/cloud-sync/index.tsx:1
deploy/regression/runtime-regression.mjs has 1256 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — deploy/regression/runtime-regression.mjs:1
frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx has 1050 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:1
frontend/apps/anchor/src/pages/scene-editor/index.tsx has 974 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/pages/scene-editor/index.tsx:1
frontend/apps/web/src/apis/core-api/core-adapter.ts has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/apis/core-api/core-adapter.ts:1
frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:1
frontend/apps/web/src/pages/project/components/ImportAppModal.tsx has 893 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:1
frontend/apps/web/src/pages/collection-flow/index.tsx has 863 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/collection-flow/index.tsx:1
frontend/apps/web/src/pages/event-flow/index.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. — frontend/apps/web/src/pages/event-flow/index.tsx:1
frontend/apps/web/src/components/com-group-button/UserPopover.tsx has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/components/com-group-button/UserPopover.tsx:1
frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx has 761 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:1
frontend/apps/web/src/pages/uns/store/treeStore.tsx has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/store/treeStore.tsx:1
REDACTED has 690 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
frontend/apps/anchor/src/pages/instance-detail/index.tsx has 653 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/pages/instance-detail/index.tsx:1
frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx has 649 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:1
frontend/apps/web/src/routers/index.tsx has 606 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/routers/index.tsx:1
REDACTED has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
REDACTED has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:1
frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx has 563 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx:1
frontend/apps/web/src/pages/notebook/editor.tsx has 560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/notebook/editor.tsx:1
frontend/apps/anchor/src/viewer/use-scene-editor.ts has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/viewer/use-scene-editor.ts:1
frontend/apps/web/src/pages/uns/components/EditButton.tsx has 542 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/EditButton.tsx:1
frontend/apps/web/src/apis/core-api/uns.ts has 527 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/apis/core-api/uns.ts:1
frontend/apps/anchor/src/i18n/index.ts has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/i18n/index.ts:1
frontend/apps/web/src/pages/routing-management/index.tsx has 516 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/routing-management/index.tsx:1
frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx has 513 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:1
frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx has 513 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:1
frontend/apps/anchor/src/pages/model-detail/index.tsx has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/pages/model-detail/index.tsx:1
frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx has 505 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx:1
frontend/apps/web/src/pages/vision/TaskFormModal.tsx has 479 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/vision/TaskFormModal.tsx:1
frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx has 463 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx:1
frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx has 457 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx:1
frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx has 448 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:1
frontend/apps/anchor/src/viewer/use-model-viewer.ts has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/anchor/src/viewer/use-model-viewer.ts:1
frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx has 447 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx:1
frontend/apps/web/src/pages/permission-management/index.tsx has 443 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/permission-management/index.tsx:1
frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx has 435 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:1
frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage0.0 / 10Critical✓ 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.
0% of 535 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R6 · Tooling6.6 / 10Adequate✓ 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.
test ✗ · lint ✓ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
What to do
Add a test runner (vitest / jest / playwright) as package.json scripts and run them in CI.
Do you agree with this assessment?
R7 · Dead Code5.4 / 10Adequate✓ 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.
Unreachable from the 47 application, 14 tooling and 0 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
no import path from any entry point (47 application, 14 tooling, 0 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 (×27) — frontend/apps/web/src/components/cloud-sync/index.tsx, frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx, REDACTED, …
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/localization/index.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 (×2) — frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx, frontend/apps/web/src/pages/localization/components/use-new-entry/index.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/topic-detail/SqlQuery.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 — frontend/apps/web/src/pages/uns/components/topic-detail/FetchData.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/project/components/tabs-content/uns/index.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 — frontend/apps/web/src/pages/project/components/tabs-content/uns/Namespace.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/label-detail/index.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 — frontend/apps/web/src/pages/uns/components/label-detail/FileList.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.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 — frontend/apps/web/src/components/pro-codemirror/index.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/localization/components/use-locales-settings/index.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 — frontend/apps/web/src/components/com-dragger-upload/index.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/layout/custom-nav/index.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 (×2) — frontend/apps/web/src/layout/custom-nav/components/SideMenuList.tsx, frontend/apps/web/src/layout/components/HelpNav.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/data-subscript/index.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 (×2) — frontend/apps/web/src/pages/uns/components/data-subscript/FolderTable.tsx, frontend/apps/web/src/pages/uns/components/data-subscript/FileTable.tsx
no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx, frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx, frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx and 2 more) — 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 — frontend/apps/web/src/pages/routing-management/hooks/useKongModal.tsx
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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 but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — frontend/packages/scripts/src/tmtClient.ts:4, frontend/packages/scripts/src/tmtClient.ts:5
Declared in frontend/apps/web/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. (×15) — frontend/apps/web/package.json:18, frontend/apps/web/package.json:19, frontend/apps/web/package.json:21, …
Declared in frontend/packages/scripts/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. — frontend/packages/scripts/package.json:19
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
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.
frontend/apps/web/src/utils/request.ts → frontend/apps/web/src/utils/auth.ts → frontend/apps/web/src/stores/base/index.ts → frontend/apps/web/src/apis/core-api/auth.ts → frontend/apps/web/src/apis/core-api/core-adapter.ts → frontend/apps/web/src/utils/request.ts (one verified cycle inside a mutually-dependent group of 284 files) — frontend/apps/web/src/utils/request.ts:2
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.
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.
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.
Do you agree with this assessment?
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.
`findTreeNode` is exported and takes `tree: any` from its caller, and it calls itself at line 70 (`findTreeNode`) with a piece of `tree` (and at line 84) — and nowhere in `findTreeNode` 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 `findTreeNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/apps/web/src/components/pro-tree-select/utils.ts:70
`mapUnsNode` is exported and takes `item: any` from its caller, and it calls itself at line 845 (`mapUnsNode`) with a piece of `item` — and nowhere in `mapUnsNode` 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 `mapUnsNode` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/apps/web/src/apis/core-api/core-adapter.ts:845
`json2fs` is exported, takes a document from its caller (line 384) and hands it to `collectJsonLeaves`, which calls itself at line 339 (`collectJsonLeaves`) with a piece of `value` — and nowhere in `collectJsonLeaves` 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 `collectJsonLeaves` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/apps/web/src/apis/core-api/uns.ts:339
`json2fsTree` is exported, takes a document from its caller (line 385) and hands it to `jsonValueToTree`, which calls itself at line 358 (`jsonValueToTree`) with a piece of `value` — and nowhere in `jsonValueToTree` 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 `jsonValueToTree` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/apps/web/src/apis/core-api/uns.ts:358
`pasteUns` is exported, takes a document from its caller (line 552) and hands it to `copyUnsNodeRecursive`, which calls itself at line 474 (`copyUnsNodeRecursive`) with a piece of `node` — and nowhere in `copyUnsNodeRecursive` 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 `copyUnsNodeRecursive` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — frontend/apps/web/src/apis/core-api/uns.ts:474
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.
Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.
Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether functions that make a cancellable request accept or pass on a context.Context or 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 8/9 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) 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.
`loadAndApplyTheme` 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 })`. — frontend/apps/web/src/stores/base/index.ts:140
What to do
Thread a context.Context or an AbortSignal through functions that make requests, so the work stops when its caller gives up.
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.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped5.2 / 10Adequate✓ Tool-verified
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.
`formatMessage(item.intro).replace(nameReg,nameTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:38
`formatMessage(item.usage).replace(nameReg,nameTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:39
`formatMessage(item.example).replace(nameReg,nameTemplate).replace(paramReg,paramTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:40
`highlight(get(item,['name'],''),functionSearchKey)` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:141
`label` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — frontend/apps/web/src/components/com-formula/index.tsx:101
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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. (×30) — frontend/apps/web/src/utils/auth.ts:36, frontend/apps/web/src/utils/auth.ts:47, frontend/apps/web/src/utils/multipart-upload.ts:430, …
`.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. (×6) — frontend/apps/web/src/pages/uns/components/EditButton.tsx:81, frontend/apps/web/src/pages/uns/components/use-create-modal/components/FieldsFormList.tsx:107, frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:211, …
`value, _ := strconv.Atoi(parts[index])` writes the call's error to `_` and then uses `value` as if the call succeeded. When `strconv.Atoi` fails, `value` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `value` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line. — backend/internal/repo/migration_versioned.go:186
`if err := decoder.Decode(&payload); err != nil` 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, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — backend/internal/middleware/auditlogMiddleware.go:61
`if err != nil` 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, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — backend/internal/logic/openapi/v1/uns/openapi_contract.go:990, backend/internal/logic/openapi/v1/uns/openapi_contract.go:1001
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
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.
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.
1/5 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.6 `!` null assertions per 1k TypeScript source lines — 52 assertion(s) across the 92657 source line(s) of the 557 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: REDACTED (6), frontend/apps/anchor/src/viewer/use-scene-editor.ts (5), frontend/apps/web/src/pages/uns/store/utils.ts (4). 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 `?`).
Do you agree with this assessment?
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).
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.
Unscored — 2 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.
X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 18 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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 — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 47 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 applicable: this repository's Go imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
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 dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~606 lines of test source are present (.go) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
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.
D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (domain), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D25 ADR Conformance — no ADRs to check
D27 Navigability — D27 reads resolved call sites in the languages it reads only — this repository's production source is .ts, .tsx, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 1 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM3 Integration-event coupling — no integration events detected — coupling check not applicable
DM6 Domain ↔ infrastructure boundary — this TypeScript/JavaScript repository maps no type to a persistence framework (TypeORM/Prisma/MikroORM/Sequelize/Mongoose), so DM6's domain↔infrastructure fusion read has no population to be taken over
ED1 Event-Driven — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 8 domain event(s); 1 event-sourced shape(s) (event folds / event-recording aggregates)
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 Go aggregate(s) recording domain events (own events-slice append / raise-record))
M4 Documentation accuracy — Not applicable: the 4 current-state document(s) make no claim of a kind M4 checks. 19 claim(s) of kinds M4 does not check were not checked (path 3, command argument 10, environment variable 4, cd 2); M4 checks only links and versions and artefact counts.
P12 CI test-gate honesty — no CI workflow found
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Go, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
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 pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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
X19 Unrestored process-global state — 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 — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
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
X23 Unguarded diagnostic materialisation — 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 — X27 reached only 25% of this repository's production lines — typescript (87,284 lines), javascript (2,962 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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 — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Go was read, and it logs through none: the standard library's `log` takes one finished line, or it makes no log call outside its tests at all, so an assembled message there loses nothing the API could have kept (as with log4net in C#). Calls through log/slog, zap, logrus, zerolog, hclog, go-kit's log or logr would be judged.
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.
AC4 · Keyboard semantics· Click handler on a non-interactive <div> · ×32
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/model-library/index.tsx:215— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:509— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:516— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:519— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:530— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:551— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:556— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:575— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:599— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-editor/index.tsx:712— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/anchor/src/pages/scene-library/index.tsx:120— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/com-btn-tabs/index.tsx:38— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/com-click-trigger/index.tsx:95— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/com-dragger-upload/index.tsx:77— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> REDACTED:81— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Click handler on a non-interactive <div> REDACTED:91— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
Click handler on a non-interactive <div> frontend/apps/web/src/components/com-group-button/index.tsx:38— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/custom-paragraph/index.tsx:43— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/pro-table/index.tsx:302— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/search-select/index.tsx:42— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/components/search-select/index.tsx:79— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/layout/components/com-tags/index.tsx:221— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/layout/components/com-tags/index.tsx:257— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/layout/custom-menu-header/components/LogoImg.tsx:40— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
Click handler on a non-interactive <div> frontend/apps/web/src/layout/custom-nav/components/SideNavList.tsx:42— A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler.
AC1 · Text alternatives· <img> without a text alternative · ×6
<img> without a text alternative frontend/apps/web/src/layout/custom-nav/index.tsx:60— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative frontend/apps/web/src/layout/custom-nav/index.tsx:76— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative frontend/apps/web/src/layout/custom-nav/index.tsx:78— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative frontend/apps/web/src/layout/custom-nav/index.tsx:85— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative frontend/apps/web/src/pages/project/components/tabs-content/apps/index.tsx:151— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
<img> without a text alternative frontend/apps/web/src/pages/project/components/tabs-content/flows/index.tsx:128— An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
Orphaned knowledge frontend/apps/web/src/pages/uns/store/treeStore.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.
Orphaned knowledge frontend/apps/web/src/pages/uns/components/EditButton.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.
Orphaned knowledge frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.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.
Orphaned knowledge frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.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.
Orphaned knowledge frontend/apps/web/src/pages/routing-management/components/services-tab/index.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.
AC2 · Forms & labels· <label> that labels no control · ×3
<label> that labels no control frontend/apps/web/src/pages/license-activation/index.tsx:184— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control frontend/apps/web/src/pages/license-activation/index.tsx:226— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
<label> that labels no control frontend/apps/web/src/pages/license-activation/index.tsx:244— This <label> has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label htmlFor="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC4 · Keyboard semantics· Hover-only interaction on <div> · ×3
Hover-only interaction on <div> frontend/apps/anchor/src/components/resizable-split.tsx:55— This <div> 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.
Hover-only interaction on <div> frontend/apps/web/src/components/com-layout/ComLeft.tsx:110— This <div> 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.
Hover-only interaction on <div> frontend/apps/web/src/components/pro-table/index.tsx:266— This <div> 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.
AC2 · Forms & labels· <button> with no accessible text · ×1
<button> with no accessible text frontend/apps/anchor/src/pages/instance-detail/tag-overlay.tsx:167— A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC2 · Forms & labels· Custom control with no accessible name on <div> · ×1
Custom control with no accessible name on <div> frontend/apps/web/src/components/custom-paragraph/index.tsx:43— This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure· <iframe> without a title · ×1
<iframe> without a title frontend/apps/web/src/pages/share/index.tsx:10— An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
AC4 · Keyboard semantics· Click handler on a non-interactive <li> · ×1
Click handler on a non-interactive <li> REDACTED:131— A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}.
AC4 · Keyboard semantics· Double-click handler on a non-interactive <div> · ×1
Double-click handler on a non-interactive <div> frontend/apps/web/src/pages/fleet-shared/FleetContainerLogsDrawer.tsx:282— This <div> binds pointerdown, pointerup, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabIndex={0}, so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabIndex={0} + a key handler alongside the double-click.
Banned license: shepherd.js frontend/apps/web/package.json:72— `shepherd.js` 13.0.3 is published on registry.npmjs.org under `AGPL-3.0`, 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.
Unlisted import 'dotenv' frontend/packages/scripts/src/tmtClient.ts:4— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Unlisted import 'picocolors' frontend/packages/scripts/src/tmtClient.ts:5— Imported but not declared in any reachable package.json — installs work only by hoisting accident.
FunctionTooLong: index.MqttAuthPage frontend/apps/web/src/pages/mqtt-auth/index.tsx:372— FunctionTooLong — MqttAuthPage runs 2135 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2035 over it, 21.35× 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: index.MqttAuthPage frontend/apps/web/src/components/cloud-sync/index.tsx:310— FunctionTooLong — MqttAuthPage runs 1574 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1474 over it, 15.74× 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: index.SceneEditorPage frontend/apps/anchor/src/pages/scene-editor/index.tsx:56— FunctionTooLong — SceneEditorPage runs 797 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 697 over it, 7.97× 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: ImportAppModal.ImportAppModal frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:67— FunctionTooLong — ImportAppModal runs 675 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 575 over it, 6.75× 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: FleetNodeDetailPage.FleetNodeDetailPage frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:147— FunctionTooLong — FleetNodeDetailPage runs 662 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 562 over it, 6.62× 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: UserPopover.UserPopover frontend/apps/web/src/components/com-group-button/UserPopover.tsx:99— FunctionTooLong — UserPopover runs 545 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 445 over it, 5.45× 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: index.InstanceDetailPage frontend/apps/anchor/src/pages/instance-detail/index.tsx:52— FunctionTooLong — InstanceDetailPage runs 533 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 433 over it, 5.33× 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: index.FormContent frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:34— FunctionTooLong — FormContent runs 516 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 416 over it, 5.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: index.ConsumersTab frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:50— FunctionTooLong — ConsumersTab runs 506 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 406 over it, 5.06× 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: index.TopTreeCom frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:443— FunctionTooLong — TopTreeCom runs 445 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 345 over it, 4.45× 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: index.ServicesTab frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:44— FunctionTooLong — ServicesTab runs 436 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 336 over it, 4.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: treeStore.createTreeStore frontend/apps/web/src/pages/uns/store/treeStore.tsx:56— FunctionTooLong — createTreeStore runs 433 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 333 over it, 4.33× 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: index.ModelDetailPage frontend/apps/anchor/src/pages/model-detail/index.tsx:40— FunctionTooLong — ModelDetailPage runs 418 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 318 over it, 4.18× 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: editor.NotebookEditorPage frontend/apps/web/src/pages/notebook/editor.tsx:73— FunctionTooLong — NotebookEditorPage runs 409 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 309 over it, 4.09× 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: ReplaceAppModal.ReplaceAppModal frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:32— FunctionTooLong — ReplaceAppModal runs 408 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 308 over it, 4.08× 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: EditButton.EditButton frontend/apps/web/src/pages/uns/components/EditButton.tsx:16— FunctionTooLong — EditButton runs 396 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 296 over it, 3.96× 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: index.RoutingManagement frontend/apps/web/src/pages/routing-management/index.tsx:86— FunctionTooLong — RoutingManagement runs 380 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 280 over it, 3.80× 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: use-scene-editor.useSceneEditor frontend/apps/anchor/src/viewer/use-scene-editor.ts:103— FunctionTooLong — useSceneEditor runs 374 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 274 over it, 3.74× 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: FleetManagementPanel.FleetManagementPanel frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:67— FunctionTooLong — FleetManagementPanel runs 371 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 271 over it, 3.71× 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: TaskFormModal.TaskFormModal frontend/apps/web/src/pages/vision/TaskFormModal.tsx:67— FunctionTooLong — TaskFormModal runs 362 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 262 over it, 3.62× 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: index.useOptionModal frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:44— FunctionTooLong — useOptionModal runs 339 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 239 over it, 3.39× 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: use-model-viewer.useModelViewer frontend/apps/anchor/src/viewer/use-model-viewer.ts:56— FunctionTooLong — useModelViewer runs 338 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 238 over it, 3.38× 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: AccountSettingsPanel.AccountSettingsPanel frontend/apps/web/src/pages/settings/AccountSettingsPanel.tsx:39— FunctionTooLong — AccountSettingsPanel runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.27× 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: AnalysisTasksPanel.AnalysisTasksPanel frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:52— FunctionTooLong — AnalysisTasksPanel runs 320 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 220 over it, 3.20× 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: index.NotebookPage frontend/apps/web/src/pages/notebook/index.tsx:58— FunctionTooLong — NotebookPage runs 306 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 206 over it, 3.06× 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.
Swallowed exception (empty catch) frontend/apps/web/src/utils/auth.ts:36— 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) frontend/apps/web/src/utils/auth.ts:47— 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) frontend/apps/web/src/utils/multipart-upload.ts:430— 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) frontend/apps/web/src/pages/vision/TaskPreviewModal.tsx:343— 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) frontend/apps/web/src/pages/uns/components/EditButton.tsx:81— `.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) frontend/apps/web/src/pages/uns/components/use-create-modal/components/FieldsFormList.tsx:107— `.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) frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:211— `.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) frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx:334— `.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) frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:53— `.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) frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:38— `.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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx: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.
Swallowed exception (empty catch) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:132— 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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx: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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:202— 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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:211— 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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:220— 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) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:294— 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) frontend/apps/web/src/pages/open-data/AIProviderConfigPanel.tsx:130— 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) frontend/apps/web/src/pages/notebook/editor.tsx:113— 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) frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:83— 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) frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:123— 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) frontend/apps/web/src/pages/notebook/components/HistoryPopover.tsx:31— 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) frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:64— 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) frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:104— 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) frontend/apps/web/src/pages/launchpad/useLaunchpadFavorites.ts:37— 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.
FileTooLong: mqtt-auth/index.tsx frontend/apps/web/src/pages/mqtt-auth/index.tsx— FileTooLong — 2453 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: MqttAuthPage (372-3065). The bar is 500 significant lines; this is 1953 over it, 4.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: REDACTED REDACTED— FileTooLong — 1940 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1440 over it, 3.88× 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: cloud-sync/index.tsx frontend/apps/web/src/components/cloud-sync/index.tsx— FileTooLong — 1844 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: MqttAuthPage (310-2298). The bar is 500 significant lines; this is 1344 over it, 3.69× 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: repo/iam.go backend/internal/repo/iam.go— FileTooLong — 1277 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: IAMRepo (35 blocks, 173-1695). The bar is 500 significant lines; this is 777 over it, 2.55× 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: regression/runtime-regression.mjs deploy/regression/runtime-regression.mjs— FileTooLong — 1013 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 513 over it, 2.03× 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: flow/nodered_payload.go backend/internal/domain/flow/nodered_payload.go— FileTooLong — 919 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 419 over it, 1.84× 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: uns/openapi_contract.go backend/internal/logic/openapi/v1/uns/openapi_contract.go— FileTooLong — 875 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 375 over it, 1.75× 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: scene-editor/index.tsx frontend/apps/anchor/src/pages/scene-editor/index.tsx— FileTooLong — 842 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: SceneEditorPage (56-1011). The bar is 500 significant lines; this is 342 over it, 1.68× 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: core-api/core-adapter.ts frontend/apps/web/src/apis/core-api/core-adapter.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: flow/service.go backend/internal/domain/flow/service.go— FileTooLong — 813 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 313 over it, 1.63× 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: uns-tree/index.tsx frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx— FileTooLong — 809 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 309 over it, 1.62× 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: fleet-management/FleetNodeDetailPage.tsx frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx— FileTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: FleetNodeDetailPage (147-935). The bar is 500 significant lines; this is 282 over it, 1.56× 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: REDACTED REDACTED— FileTooLong — 775 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 275 over it, 1.55× 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: components/ImportAppModal.tsx frontend/apps/web/src/pages/project/components/ImportAppModal.tsx— FileTooLong — 729 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ImportAppModal (67-955). The bar is 500 significant lines; this is 229 over it, 1.46× 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: collection-flow/index.tsx frontend/apps/web/src/pages/collection-flow/index.tsx— FileTooLong — 692 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 192 over it, 1.38× 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: event-flow/index.tsx frontend/apps/web/src/pages/event-flow/index.tsx— FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: EventFlow (60-829). The bar is 500 significant lines; this is 147 over it, 1.29× 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: com-group-button/UserPopover.tsx frontend/apps/web/src/components/com-group-button/UserPopover.tsx— FileTooLong — 628 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: UserPopover (99-822). The bar is 500 significant lines; this is 128 over it, 1.26× 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: repo/uns_node.go backend/internal/repo/uns_node.go— FileTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: UnsRepo (22 blocks, 65-814). The bar is 500 significant lines; this is 95 over it, 1.19× 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: instance-detail/index.tsx frontend/apps/anchor/src/pages/instance-detail/index.tsx— FileTooLong — 580 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: InstanceDetailPage (52-680). The bar is 500 significant lines; this is 80 over it, 1.16× 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: audit/service.go backend/internal/domain/audit/service.go— FileTooLong — 577 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 77 over it, 1.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: consumers-tab/index.tsx frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx— FileTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ConsumersTab (50-671). The bar is 500 significant lines; this is 54 over it, 1.11× 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: form-content/index.tsx frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx— FileTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: FormContent (34-790). The bar is 500 significant lines; this is 45 over it, 1.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: dataingest/service.go backend/internal/domain/dataingest/service.go— FileTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded), about 64% of them inside a single declaration: Service (20 blocks, 23-636). The bar is 500 significant lines; this is 38 over it, 1.08× 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: store/treeStore.tsx frontend/apps/web/src/pages/uns/store/treeStore.tsx— FileTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: createTreeStore (56-673). The bar is 500 significant lines; this is 10 over it, 1.02× 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.
AC2 · Forms & labels· <Input> field component without a label · ×23
<Input> field component without a label frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:242— 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 frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:279— 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 frontend/apps/anchor/src/pages/instance-detail/mapping-table.tsx:290— 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 frontend/apps/anchor/src/pages/instance-detail/mapping-table.tsx:335— 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 frontend/apps/anchor/src/pages/model-library/index.tsx:277— 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 frontend/apps/anchor/src/pages/scene-editor/index.tsx:586— 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 frontend/apps/anchor/src/pages/scene-library/index.tsx:199— 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 frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:200— 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 frontend/apps/web/src/components/cloud-sync/index.tsx:583— 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 frontend/apps/web/src/components/cloud-sync/index.tsx:596— 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 frontend/apps/web/src/components/cloud-sync/index.tsx:612— 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 REDACTED:102— 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 frontend/apps/web/src/pages/cli-auth/index.tsx:195— 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 frontend/apps/web/src/pages/fleet-shared/FleetContainerLogsDrawer.tsx:296— 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 frontend/apps/web/src/pages/launchpad/components/AllProjectsSection.tsx:46— 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 frontend/apps/web/src/pages/launchpad/components/AppSwitcher.tsx:50— 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 frontend/apps/web/src/pages/license-activation/index.tsx:185— 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 frontend/apps/web/src/pages/license-activation/index.tsx:228— 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 frontend/apps/web/src/pages/localization/components/Editable/index.tsx:66— 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 frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx:120— 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 frontend/apps/web/src/pages/mqtt-auth/index.tsx:678— 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 frontend/apps/web/src/pages/mqtt-auth/index.tsx:691— 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 frontend/apps/web/src/pages/mqtt-auth/index.tsx:707— 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.
D30 · Dependency Vulnerabilities· Medium CVE · ×18
AC6 · Visual & motion safety· Animation without a prefers-reduced-motion guard · ×11
Animation without a prefers-reduced-motion guard frontend/apps/web/src/pages/vision/index.module.scss:936— `.regionCameraPickerValue :global(svg)` moves (`transition: transform 0.15s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/pages/uns/components/topic-detail/TopologyChart.module.scss:113— `.detailTopologyWrap .detailTopologyContent .loading-spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.module.scss:219— `.loading-spinner` moves (`animation: spin 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/pages/license-activation/index.scss:294— `.license-activation-page .form-section .form-container .action-area .activate-button.loading::after` moves (`animation: spin 0.8s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/layout/business-sidebar.module.scss:10— `.business-sidebar` moves (`transition: width 160ms ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/layout/custom-menu-header/components/index.scss:8— `.menu-label:hover .menu-label-icon` moves (`transition: transform 0.3s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/components/pro-table/index.scss:209— `.pro-table-container .pro-table-expand-button` moves (`transition: right 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/components/inline-loading/index.scss:22— `.inline-loading .ods-loading_svg` moves (`animation: rotate 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/components/com-dot/index.scss:43— `.com-dot .com-dot-dot.breathing::after` moves (`animation: com-dot-breathing 1.5s infinite ease-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/components/code-snippet/index.scss:46— `.code-snippet-btn--expand .code-snippet-icon` moves (`transition: transform 0.2s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Animation without a prefers-reduced-motion guard frontend/apps/web/src/components/code-snippet/index.scss:198— `.code-snippet--multi .code-snippet-container` moves (`transition: max-height 150ms cubic-bezier(0.2, 0, 0.38, 0.9)`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
Duplicated block (7 lines × 2) backend/internal/domain/flow/nodered_payload.go:248— backend/internal/domain/flow/nodered_payload.go:248-254 | backend/internal/domain/flow/nodered_payload.go:380-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/domain/flow/nodered_payload.go:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) REDACTED:944— REDACTED:944-950 | REDACTED:1218-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:944` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) backend/internal/handler/core/iam/roleCrudHandlers.go:49— backend/internal/handler/core/iam/roleCrudHandlers.go:49-55 | backend/internal/handler/core/iam/roleCrudHandlers.go:68-74 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/iam/roleCrudHandlers.go:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) backend/internal/repo/iam.go:732— backend/internal/repo/iam.go:732-738 | backend/internal/repo/iam.go:767-773 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) backend/internal/repo/uns_node.go:633— backend/internal/repo/uns_node.go:633-639 | backend/internal/repo/uns_node.go:771-777 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:633` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) backend/internal/domain/audit/service.go:745— backend/internal/domain/audit/service.go:745-751 | backend/internal/repo/audit.go:404-410 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) REDACTED:1890— REDACTED:1890-1896 | backend/internal/repo/uns_helpers.go:467-473 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) backend/internal/logic/core/flow/flowDetailLogic.go:32— backend/internal/logic/core/flow/flowDetailLogic.go:32-38 | backend/internal/logic/openapi/v1/flow/openapiFlowDetailLogic.go:32-38 — before extracting anything, compare `backend/internal/logic/core/flow/flowDetailLogic.go` and `backend/internal/logic/openapi/v1/flow/openapiFlowDetailLogic.go` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) backend/internal/logic/core/flow/flowListLogic.go:32— backend/internal/logic/core/flow/flowListLogic.go:32-38 | backend/internal/logic/openapi/v1/flow/openapiFlowListLogic.go:32-38 — before extracting anything, compare `backend/internal/logic/core/flow/flowListLogic.go` and `backend/internal/logic/openapi/v1/flow/openapiFlowListLogic.go` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) backend/internal/logic/core/uns/unsExportJobDetailLogic.go:32— backend/internal/logic/core/uns/unsExportJobDetailLogic.go:32-38 | backend/internal/logic/core/uns/unsImportJobDetailLogic.go:32-38 — before extracting anything, compare `backend/internal/logic/core/uns/unsExportJobDetailLogic.go` and `backend/internal/logic/core/uns/unsImportJobDetailLogic.go` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (7 lines × 2) backend/internal/repo/flow.go:256— backend/internal/repo/flow.go:256-262 | backend/internal/repo/flow.go:342-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/flow.go:256` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) backend/internal/handler/core/uns/unsNodeListHandler.go:18— backend/internal/handler/core/uns/unsNodeListHandler.go:18-23 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeListHandler.go:18-23 — before extracting anything, compare `backend/internal/handler/core/uns/unsNodeListHandler.go` and `backend/internal/handler/openapi/v1/uns/openapiUnsNodeListHandler.go` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) backend/internal/handler/core/asset/assetDetailHandler.go:17— backend/internal/handler/core/asset/assetDetailHandler.go:17-22 | backend/internal/handler/core/asset/assetDownloadHandler.go:19-24 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/asset/assetDetailHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/core/flow/flowCreateHandler.go:17— backend/internal/handler/core/flow/flowCreateHandler.go:17-22 | backend/internal/handler/core/flow/flowUpdateHandler.go:17-22 — before extracting anything, compare `backend/internal/handler/core/flow/flowCreateHandler.go` and `backend/internal/handler/core/flow/flowUpdateHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/flow/flowCreateHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/core/flow/flowListHandler.go:17— backend/internal/handler/core/flow/flowListHandler.go:17-22 | backend/internal/handler/openapi/v1/flow/openapiFlowListHandler.go:17-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/flow/flowListHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/core/iam/roleCrudHandlers.go:17— backend/internal/handler/core/iam/roleCrudHandlers.go:17-22 | backend/internal/handler/core/iam/roleCrudHandlers.go:42-47 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/iam/roleCrudHandlers.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/core/uns/unsExportJobDetailHandler.go:17— backend/internal/handler/core/uns/unsExportJobDetailHandler.go:17-22 | backend/internal/handler/core/uns/unsImportJobDetailHandler.go:17-22 — before extracting anything, compare `backend/internal/handler/core/uns/unsExportJobDetailHandler.go` and `backend/internal/handler/core/uns/unsImportJobDetailHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsExportJobDetailHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/core/uns/unsNodeCreateHandler.go:17— backend/internal/handler/core/uns/unsNodeCreateHandler.go:17-22 | backend/internal/handler/core/uns/unsNodeUpdateHandler.go:17-22 — before extracting anything, compare `backend/internal/handler/core/uns/unsNodeCreateHandler.go` and `backend/internal/handler/core/uns/unsNodeUpdateHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsNodeCreateHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go:18— backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go:18-23 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeUpdateHandler.go:18-23 — before extracting anything, compare `backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go` and `backend/internal/handler/openapi/v1/uns/openapiUnsNodeUpdateHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) backend/internal/domain/asset/service.go:315— backend/internal/domain/asset/service.go:315-320 | REDACTED:806-811 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) backend/internal/domain/flow/service.go:307— backend/internal/domain/flow/service.go:307-312 | backend/internal/domain/flow/service.go:362-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/domain/flow/service.go:307` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) backend/internal/repo/iam.go:175— backend/internal/repo/iam.go:175-180 | backend/internal/repo/iam.go:184-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/iam.go:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×9
Edited copy of a member (7 corresponding lines) backend/internal/logic/core/uns/unsNodeListLogic.go:32— backend/internal/logic/core/uns/unsNodeListLogic.go:32-38 | backend/internal/logic/openapi/v1/uns/openapiUnsNodeListLogic.go:32-38 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/logic/core/iam/roleListLogic.go:30— backend/internal/logic/core/iam/roleListLogic.go:30-36 | backend/internal/logic/core/iam/userListLogic.go:30-36 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/logic/core/uns/unsNodeDetailLogic.go:32— backend/internal/logic/core/uns/unsNodeDetailLogic.go:32-38 | backend/internal/logic/openapi/v1/uns/openapiUnsNodeDetailLogic.go:32-38 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/logic/core/asset/assetDetailLogic.go:32— backend/internal/logic/core/asset/assetDetailLogic.go:32-38 | backend/internal/logic/core/asset/assetDownloadLogic.go:32-38 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/repo/uns_label.go:19— backend/internal/repo/uns_label.go:19-25 | backend/internal/repo/uns_template.go:19-25 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/domain/auth/service.go:236— backend/internal/domain/auth/service.go:236-242 | backend/internal/domain/flow/nodered_payload.go:115-123 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/domain/flow/nodered_payload.go:646— backend/internal/domain/flow/nodered_payload.go:646-655 | REDACTED:2614-2620 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/handler/core/iam/roleCrudHandlers.go:79— backend/internal/handler/core/iam/roleCrudHandlers.go:79-87 | backend/internal/repo/seed.go:186-192 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (7 corresponding lines) backend/internal/domain/flow/nodered_payload.go:1259— backend/internal/domain/flow/nodered_payload.go:1259-1268 | REDACTED:1427-1433 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
ClassTooLong: Service REDACTED:27— ClassTooLong — 943 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods, 49 blocks, lines 27-2089. The bar is 400 significant lines; this is 543 over it, 2.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: IAMRepo backend/internal/repo/iam.go:1626— ClassTooLong — 906 significant lines (blank, comment-only and punctuation-only lines excluded), 36 methods, 35 blocks, lines 173-1695. The bar is 400 significant lines; this is 506 over it, 2.27× 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: ImportAppModal frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:1— ClassTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 275 over it, 1.69× 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: FleetNodeDetailPage frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:1— ClassTooLong — 662 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 262 over it, 1.66× 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: UserPopover frontend/apps/web/src/components/com-group-button/UserPopover.tsx:1— ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 3 methods. The bar is 400 significant lines; this is 145 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: UnsRepo backend/internal/repo/uns_node.go:58— ClassTooLong — 429 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods, 22 blocks, lines 65-814. The bar is 400 significant lines; this is 29 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.
ClassTooLong: ReplaceAppModal frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:1— ClassTooLong — 408 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 8 over it, 1.02× 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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×7
Edited copy of a member (11 corresponding lines) REDACTED:813— REDACTED:813-826 | REDACTED:828-838 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) backend/internal/handler/core/system/swaggerHandler.go:61— backend/internal/handler/core/system/swaggerHandler.go:61-71 | backend/internal/handler/core/system/swaggerHandler.go:73-83 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) backend/internal/domain/dataingest/definition.go:94— backend/internal/domain/dataingest/definition.go:94-106 | backend/internal/domain/dataingest/definition.go:108-118 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) backend/internal/logic/openapi/v1/uns/openapi_contract.go:1118— backend/internal/logic/openapi/v1/uns/openapi_contract.go:1118-1128 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:1130-1140 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) backend/internal/domain/dataingest/service.go:751— backend/internal/domain/dataingest/service.go:751-761 | REDACTED:1844-1854 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) backend/internal/logic/core/system/configLogic.go:78— backend/internal/logic/core/system/configLogic.go:78-88 | backend/internal/logic/openapi/v1/info/openapiInfoLogic.go:48-58 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) REDACTED:1581— REDACTED:1581-1591 | REDACTED:1593-1605 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
AC2 · Forms & labels· <Select> field component without a label · ×6
<Select> field component without a label frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:267— 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 frontend/apps/anchor/src/pages/scene-editor/index.tsx:844— 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 frontend/apps/anchor/src/pages/scene-editor/index.tsx:860— 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 frontend/apps/anchor/src/pages/scene-editor/index.tsx:951— 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 frontend/apps/web/src/components/cloud-sync/CloudSyncRootSelector.tsx:99— 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.
<Select> field component without a label frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:843— 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.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×6
Edited copy of a member (17 corresponding lines) backend/internal/handler/core/flow/flowCreateHandler.go:16— backend/internal/handler/core/flow/flowCreateHandler.go:16-32 | backend/internal/handler/core/flow/flowUpdateHandler.go:16-32 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) backend/internal/handler/core/flow/flowListHandler.go:16— backend/internal/handler/core/flow/flowListHandler.go:16-32 | backend/internal/handler/openapi/v1/flow/openapiFlowListHandler.go:16-32 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) backend/internal/handler/core/uns/unsExportJobDetailHandler.go:16— backend/internal/handler/core/uns/unsExportJobDetailHandler.go:16-32 | backend/internal/handler/core/uns/unsImportJobDetailHandler.go:16-32 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) backend/internal/handler/core/uns/unsNodeCreateHandler.go:16— backend/internal/handler/core/uns/unsNodeCreateHandler.go:16-32 | backend/internal/handler/core/uns/unsNodeUpdateHandler.go:16-32 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go:17— backend/internal/handler/openapi/v1/uns/openapiUnsNodeCreateHandler.go:17-33 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeUpdateHandler.go:17-33 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (17 corresponding lines) backend/internal/handler/core/cliauth/cliAuthBindHandler.go:17— backend/internal/handler/core/cliauth/cliAuthBindHandler.go:17-33 | backend/internal/handler/core/cliauth/cliAuthStatusHandler.go:17-33 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×6
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/flow/flowDeleteHandler.go:16— backend/internal/handler/core/flow/flowDeleteHandler.go:16-32 | backend/internal/handler/core/flow/flowDetailHandler.go:16-32 | backend/internal/handler/openapi/v1/flow/openapiFlowDetailHandler.go:16-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/uns/unsNodeDeleteHandler.go:16— backend/internal/handler/core/uns/unsNodeDeleteHandler.go:16-32 | backend/internal/handler/core/uns/unsNodeDetailHandler.go:16-32 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeDetailHandler.go:16-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/uns/unsNodeListHandler.go:16— backend/internal/handler/core/uns/unsNodeListHandler.go:16-33 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeListHandler.go:16-33 | backend/internal/handler/openapi/v1/uns/openapiUnsNodesHandler.go:15-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/apikey/apiKeyCreateHandler.go:16— backend/internal/handler/core/apikey/apiKeyCreateHandler.go:16-32 | backend/internal/handler/core/apikey/apiKeyDeleteHandler.go:16-32 | backend/internal/handler/core/apikey/apiKeyUpdateHandler.go:16-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/asset/assetBindHandler.go:16— backend/internal/handler/core/asset/assetBindHandler.go:16-32 | backend/internal/handler/core/asset/assetDetailHandler.go:16-32 | backend/internal/handler/core/asset/assetListHandler.go:16-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 17+ corresponding lines) backend/internal/handler/core/iam/userCreateHandler.go:16— backend/internal/handler/core/iam/userCreateHandler.go:16-32 | backend/internal/handler/core/iam/userPasswordResetHandler.go:16-32 | backend/internal/handler/core/iam/userUpdateHandler.go:16-32 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (8 lines × 2) REDACTED:464— REDACTED:464-471 | REDACTED:585-592 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:464` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) backend/internal/repo/uns_node.go:99— backend/internal/repo/uns_node.go:99-106 | backend/internal/repo/uns_node.go:152-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) backend/internal/repo/uns_node.go:395— backend/internal/repo/uns_node.go:395-402 | backend/internal/repo/uns_node.go:506-513 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) backend/internal/config/env.go:73— backend/internal/config/env.go:73-80 | REDACTED:1693-1700 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) backend/internal/domain/dataingest/history_query.go:451— backend/internal/domain/dataingest/history_query.go:451-458 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:633-640 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) backend/internal/logic/core/flow/audit.go:46— backend/internal/logic/core/flow/audit.go:46-53 | backend/internal/logic/core/uns/audit.go:36-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:255— `searchRestField` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:258— `getAlertForSelect` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:510— `getUnsExportRecordsApi` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:548— `getEmptyFolder` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:550— `getCollectorList` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Hollow method — returns a constant without doing the work frontend/apps/web/src/apis/core-api/uns.ts:551— `getSourceList` looks like it should compute a result but its body just returns a constant — a placeholder return that was never filled in.
Duplicated block (9 lines × 2) REDACTED:533— REDACTED:533-541 | REDACTED:547-555 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:533` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:542` calls `topicTypeName` and `REDACTED:556` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) backend/internal/logic/openapi/v1/uns/openapi_contract.go:106— backend/internal/logic/openapi/v1/uns/openapi_contract.go:106-114 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:232-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/logic/openapi/v1/uns/openapi_contract.go:106` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) backend/internal/repo/flow.go:407— backend/internal/repo/flow.go:407-415 | backend/internal/repo/flow.go:442-450 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/flow.go:407` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) backend/internal/repo/uns_helpers.go:314— backend/internal/repo/uns_helpers.go:314-322 | backend/internal/repo/uns_helpers.go:378-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_helpers.go:314` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) backend/internal/repo/iam.go:854— backend/internal/repo/iam.go:854-862 | backend/internal/repo/iam.go:863-871 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/iam.go:854` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
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 frontend/apps/web/src/components/pro-tree-select/utils.ts:70— `findTreeNode` is exported and takes `tree: any` from its caller, and it calls itself at line 70 (`findTreeNode`) with a piece of `tree` (and at line 84) — and nowhere in `findTreeNode` 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 `findTreeNode` 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 frontend/apps/web/src/apis/core-api/core-adapter.ts:845— `mapUnsNode` is exported and takes `item: any` from its caller, and it calls itself at line 845 (`mapUnsNode`) with a piece of `item` — and nowhere in `mapUnsNode` 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 `mapUnsNode` 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 frontend/apps/web/src/apis/core-api/uns.ts:339— `json2fs` is exported, takes a document from its caller (line 384) and hands it to `collectJsonLeaves`, which calls itself at line 339 (`collectJsonLeaves`) with a piece of `value` — and nowhere in `collectJsonLeaves` 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 `collectJsonLeaves` 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 frontend/apps/web/src/apis/core-api/uns.ts:358— `json2fsTree` is exported, takes a document from its caller (line 385) and hands it to `jsonValueToTree`, which calls itself at line 358 (`jsonValueToTree`) with a piece of `value` — and nowhere in `jsonValueToTree` 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 `jsonValueToTree` 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 frontend/apps/web/src/apis/core-api/uns.ts:474— `pasteUns` is exported, takes a document from its caller (line 552) and hands it to `copyUnsNodeRecursive`, which calls itself at line 474 (`copyUnsNodeRecursive`) with a piece of `node` — and nowhere in `copyUnsNodeRecursive` 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 `copyUnsNodeRecursive` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×5
Untrusted text written into markup unescaped REDACTED:38— `formatMessage(item.intro).replace(nameReg,nameTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:39— `formatMessage(item.usage).replace(nameReg,nameTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:40— `formatMessage(item.example).replace(nameReg,nameTemplate).replace(paramReg,paramTemplate)` is text this program did not author, and it is written into the text of an element through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped REDACTED:141— `highlight(get(item,['name'],''),functionSearchKey)` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped frontend/apps/web/src/components/com-formula/index.tsx:101— `label` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Low contrast colour pair in CSS (2.5:1) frontend/apps/web/src/pages/project/index.module.scss:71— `.statusActive` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.5:1) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:72— `.statusActive` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.5:1) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:512— `.containerStateRunning` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.5:1) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:728— `.statusTagActive` sets color: #53b483 on background-color: #f6fef9 — 2.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) frontend/apps/web/src/pages/notebook/index.module.scss:200— `.tableWrap :global(.ant-table-thead > tr > th)` sets color: #a8a8a8 on background-color: #fff — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) frontend/apps/web/src/pages/mqtt-auth/edge-sync-restored.module.scss:245— `:global(.ant-table-thead > tr > th)` sets color: #a8a8a8 on background-color: #fff — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) frontend/apps/web/src/pages/mqtt-auth/index.module.scss:203— `.tableWrap :global(.ant-table-thead > tr > th)` sets color: #a8a8a8 on background-color: #fff — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (2.4:1) frontend/apps/web/src/pages/home/index.module.scss:220— `.recent-icon` sets color: #fff on background-color: #a8a8a8 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
index.MqttAuthPage::renderBranchEdgeNodeContent (cyclomatic 49) frontend/apps/web/src/pages/mqtt-auth/index.tsx:2325— index.MqttAuthPage::renderBranchEdgeNodeContent has cyclomatic complexity 49 (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 (index.MqttAuthPage, index.MqttAuthPage::logValueText) 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.
index.MqttAuthPage::logValueText (cyclomatic 35) frontend/apps/web/src/components/cloud-sync/index.tsx:965— index.MqttAuthPage::logValueText has cyclomatic complexity 35 (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: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.MqttAuthPage::logValueText (cyclomatic 35) frontend/apps/web/src/pages/mqtt-auth/index.tsx:1189— index.MqttAuthPage::logValueText has cyclomatic complexity 35 (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: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.MqttAuthPage::renderBranchEdgeNodeContent (cyclomatic 27) frontend/apps/web/src/components/cloud-sync/index.tsx:1828— index.MqttAuthPage::renderBranchEdgeNodeContent has cyclomatic complexity 27 (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. This shape REPEATS in the file: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::logValueText) 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.
index.MqttAuthPage::renderBranchEdgeNodeContent (cognitive 57) frontend/apps/web/src/pages/mqtt-auth/index.tsx:2325— index.MqttAuthPage::renderBranchEdgeNodeContent has cognitive complexity 57 (threshold 15). Drivers by points: ternaries 31 (45 pts), boolean chains 11, if/else 1 (nesting depth added 14). 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 (index.MqttAuthPage, index.MqttAuthPage::logValueText) 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.
index.MqttAuthPage::logValueText (cognitive 34) frontend/apps/web/src/components/cloud-sync/index.tsx:965— index.MqttAuthPage::logValueText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16, boolean chains 14, ternaries 2 (4 pts) (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. This shape REPEATS in the file: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.MqttAuthPage::logValueText (cognitive 34) frontend/apps/web/src/pages/mqtt-auth/index.tsx:1189— index.MqttAuthPage::logValueText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16, boolean chains 14, ternaries 2 (4 pts) (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. This shape REPEATS in the file: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.MqttAuthPage::renderBranchEdgeNodeContent (cognitive 22) frontend/apps/web/src/components/cloud-sync/index.tsx:1828— index.MqttAuthPage::renderBranchEdgeNodeContent has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 13, boolean chains 9. 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. This shape REPEATS in the file: 2 other methods here (index.MqttAuthPage, index.MqttAuthPage::logValueText) 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.
TooManyMethods: Service backend/internal/domain/flow/service.go:19— TooManyMethods — 55 methods, declared across 3 files: flow/nodered_payload.go (21), flow/service.go (20), flow/nodered_missing.go (14). The bar is 30 methods; this is 25 over it, 1.83× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: Service REDACTED:27— TooManyMethods — 49 methods, declared across 2 files: REDACTED (48), uns/batch_create.go (1). The bar is 30 methods; this is 19 over it, 1.63× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: IAMRepo backend/internal/repo/iam.go:1626— TooManyMethods — 36 methods, declared across 2 files: repo/iam.go (35), repo/platform_member.go (1). The bar is 30 methods; this is 6 over it, 1.20× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: UnsRepo backend/internal/repo/uns_node.go:58— TooManyMethods — 32 methods, declared across 3 files: repo/uns_node.go (22), repo/uns_label.go (5), repo/uns_template.go (5). The bar is 30 methods; this is 2 over it, 1.07× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×4
Edited copy of a member (14 corresponding lines) REDACTED:773— REDACTED:773-786 | REDACTED:788-801 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) backend/internal/domain/flow/nodered_payload.go:1030— backend/internal/domain/flow/nodered_payload.go:1030-1047 | backend/internal/domain/flow/nodered_payload.go:1049-1062 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) backend/internal/domain/flow/nodered_payload.go:598— backend/internal/domain/flow/nodered_payload.go:598-611 | backend/internal/domain/flow/nodered_payload.go:801-817 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (14 corresponding lines) backend/internal/repo/uns_helpers.go:227— backend/internal/repo/uns_helpers.go:227-240 | backend/internal/repo/uns_helpers.go:242-258 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (13 lines × 2) REDACTED:1903— REDACTED:1903-1915 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:1149-1161 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1903` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) backend/internal/handler/core/asset/assetUploadHandler.go:120— backend/internal/handler/core/asset/assetUploadHandler.go:120-132 | backend/internal/handler/handlerx/asset_upload.go:92-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) backend/internal/logic/core/auth/currentUserConfigGetLogic.go:35— backend/internal/logic/core/auth/currentUserConfigGetLogic.go:35-47 | backend/internal/logic/core/auth/currentUserConfigUpdateLogic.go:47-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/logic/core/auth/currentUserConfigGetLogic.go:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) backend/internal/repo/apikey_scope.go:39— backend/internal/repo/apikey_scope.go:39-51 | backend/internal/repo/iam.go:1209-1221 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) backend/internal/handler/core/asset/assetDownloadHandler.go:29— backend/internal/handler/core/asset/assetDownloadHandler.go:29-39 | backend/internal/handler/handlerx/asset_stream.go:27-37 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/asset/assetDownloadHandler.go:29` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) backend/internal/handler/core/uns/unsImportExportHandlers.go:70— backend/internal/handler/core/uns/unsImportExportHandlers.go:70-80 | backend/internal/handler/core/uns/unsImportExportHandlers.go:87-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsImportExportHandlers.go:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) backend/internal/repo/iam.go:499— backend/internal/repo/iam.go:499-509 | backend/internal/repo/iam.go:527-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/iam.go:499` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) backend/internal/repo/uns_node.go:275— backend/internal/repo/uns_node.go:275-285 | backend/internal/repo/uns_node.go:308-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) backend/internal/handler/core/auth/currentUserConfigPatchHandler.go:18— backend/internal/handler/core/auth/currentUserConfigPatchHandler.go:18-23 | backend/internal/handler/core/auth/currentUserConfigPutHandler.go:18-23 | backend/internal/handler/core/auth/currentUserConfigUpdateHandler.go:15-20 — before extracting anything, compare `backend/internal/handler/core/auth/currentUserConfigPatchHandler.go` and `backend/internal/handler/core/auth/currentUserConfigPutHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/auth/currentUserConfigPatchHandler.go:18` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) backend/internal/handler/core/flow/flowDeleteHandler.go:17— backend/internal/handler/core/flow/flowDeleteHandler.go:17-22 | backend/internal/handler/core/flow/flowDetailHandler.go:17-22 | backend/internal/handler/openapi/v1/flow/openapiFlowDetailHandler.go:17-22 — before extracting anything, compare `backend/internal/handler/core/flow/flowDeleteHandler.go` and `backend/internal/handler/core/flow/flowDetailHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/flow/flowDeleteHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) backend/internal/handler/core/uns/unsNodeDeleteHandler.go:17— backend/internal/handler/core/uns/unsNodeDeleteHandler.go:17-22 | backend/internal/handler/core/uns/unsNodeDetailHandler.go:17-22 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeDetailHandler.go:17-22 — before extracting anything, compare `backend/internal/handler/core/uns/unsNodeDeleteHandler.go` and `backend/internal/handler/core/uns/unsNodeDetailHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsNodeDeleteHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) backend/internal/handler/core/uns/unsNodeListHandler.go:17— backend/internal/handler/core/uns/unsNodeListHandler.go:17-22 | backend/internal/handler/openapi/v1/uns/openapiUnsNodeListHandler.go:17-22 | backend/internal/handler/openapi/v1/uns/openapiUnsNodesHandler.go:16-21 — before extracting anything, compare `backend/internal/handler/core/uns/unsNodeListHandler.go` and `backend/internal/handler/openapi/v1/uns/openapiUnsNodeListHandler.go` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsNodeListHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
IC1 · Incompleteness & stubs· Both branches are identical · ×4
Both branches are identical — the condition decides nothing frontend/apps/web/src/pages/home/components/OverviewList.tsx:71— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:320— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:108— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
Both branches are identical — the condition decides nothing frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:122— Both arms of this conditional expression are the same, so no input can make the condition matter. Implement the distinction that was intended, or drop the condition.
AC2 · Forms & labels· <Segmented> field component without a label · ×3
<Segmented> field component without a label frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:303— 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.
<Segmented> field component without a label frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:336— 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.
<Segmented> field component without a label frontend/apps/web/src/components/lucide-icon/ViewModeSegmented.tsx:18— 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.
Low contrast colour pair in CSS (3.9:1) frontend/apps/web/src/pages/project/index.module.scss:77— `.statusInactive` sets color: #dd3636 on background-color: #feebeb — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:78— `.statusInactive` sets color: #dd3636 on background-color: #feebeb — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.9:1) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:90— `.statusFailed` sets color: #dd3636 on background-color: #feebeb — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) frontend/apps/web/src/pages/project/components/tabs-content/members/index.module.scss:44— `.roleTag` sets color: #d97706 on background-color: #fffbeb — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.module.scss:96— `.roleTag` sets color: #d97706 on background-color: #fffbeb — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.1:1) frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:12— `.running` sets color: #16a34a on background-color: #f0fdf4 — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) frontend/apps/web/src/pages/mqtt-auth/index.module.scss:273— `.disconnectedTag` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:24— `.stopped` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.4:1) frontend/apps/web/src/pages/flow/components/FlowStatusTag.module.scss:42— `.fallback` sets color: #dc2626 on background-color: #fef2f2 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.4:1) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.module.scss:293— `.metaChip` sets color: #878787 on background-color: #f9f9f9 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.4:1) frontend/apps/web/src/pages/audit-log/index.module.scss:196— `.successTag` sets color: #2f8f63 on background-color: #d4f4e2 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.4:1) frontend/apps/web/src/pages/account-management/index.module.scss:101— `.statusAvailable` sets color: #2f8f63 on background-color: #d4f4e2 — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) backend/internal/domain/dataingest/latest_cache.go:115— backend/internal/domain/dataingest/latest_cache.go:115-132 | backend/internal/repo/flow.go:44-76 | backend/internal/repo/flow_version.go:32-77 | backend/internal/repo/flow_version.go:79-110 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) backend/internal/handler/core/uns/unsLabelCrudHandlers.go:30— backend/internal/handler/core/uns/unsLabelCrudHandlers.go:30-44 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:46-60 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelCreateHandler.go:17-33 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelUpdateHandler.go:17-33 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
Members sharing a duplicated core (4 members, 50+ identical tokens) backend/internal/repo/apikey_scope.go:38— backend/internal/repo/apikey_scope.go:38-53 | backend/internal/repo/iam.go:819-886 | backend/internal/repo/iam.go:888-971 | backend/internal/repo/iam.go:1208-1249 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×3
Edited copy of a member (21 corresponding lines) backend/internal/repo/iam.go:497— backend/internal/repo/iam.go:497-523 | backend/internal/repo/iam.go:764-784 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) backend/internal/handler/openapi/v1/uns/openapiUnsAttachmentListHandler.go:17— backend/internal/handler/openapi/v1/uns/openapiUnsAttachmentListHandler.go:17-37 | backend/internal/handler/openapi/v1/uns/openapiUnsBindFlowHandler.go:16-36 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (21 corresponding lines) backend/internal/logic/core/uns/unsNodeSaveCommand.go:11— backend/internal/logic/core/uns/unsNodeSaveCommand.go:11-31 | backend/internal/logic/openapi/v1/uns/helper.go:15-35 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) backend/internal/repo/uns_label.go:42— backend/internal/repo/uns_label.go:42-54 | backend/internal/repo/uns_node.go:243-256 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) backend/internal/repo/async_job.go:80— backend/internal/repo/async_job.go:80-93 | backend/internal/repo/async_job.go:95-107 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (13 corresponding lines) backend/internal/domain/gateway/service.go:37— backend/internal/domain/gateway/service.go:37-50 | backend/internal/domain/gateway/service.go:62-74 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×3
Edited copy of a member (10 corresponding lines) backend/internal/domain/flow/service.go:838— backend/internal/domain/flow/service.go:838-847 | backend/internal/logic/openapi/v1/flow/openapiFlowLegacyLogic.go:300-309 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) backend/internal/repo/iam.go:1046— backend/internal/repo/iam.go:1046-1055 | backend/internal/repo/iam.go:1057-1066 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (10 corresponding lines) backend/internal/domain/flow/service.go:213— backend/internal/domain/flow/service.go:213-222 | backend/internal/domain/flow/service.go:224-233 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) backend/internal/domain/flow/nodered_payload.go:356— backend/internal/domain/flow/nodered_payload.go:356-367 | backend/internal/domain/flow/nodered_payload.go:458-474 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) backend/internal/domain/dataingest/message.go:208— backend/internal/domain/dataingest/message.go:208-222 | REDACTED:2565-2576 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (12 corresponding lines) backend/internal/domain/dataingest/history_query.go:208— backend/internal/domain/dataingest/history_query.go:208-222 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:1105-1116 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 7+ corresponding lines) · ×3
Edited copies of one member (3 members, 7+ corresponding lines) backend/internal/logic/core/uns/unsNodeCreateLogic.go:33— backend/internal/logic/core/uns/unsNodeCreateLogic.go:33-40 | backend/internal/logic/core/uns/unsNodeUpdateLogic.go:33-40 | backend/internal/logic/openapi/v1/uns/openapiUnsNodeUpdateLogic.go:31-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) backend/internal/logic/core/flow/flowMissingNodeCleanupLogic.go:31— backend/internal/logic/core/flow/flowMissingNodeCleanupLogic.go:31-37 | backend/internal/logic/core/flow/flowMissingNodeListLogic.go:31-37 | backend/internal/logic/core/flow/flowNodeTypesLogic.go:31-37 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 7+ corresponding lines) backend/internal/logic/core/asset/assetUnbindLogic.go:32— backend/internal/logic/core/asset/assetUnbindLogic.go:32-38 | backend/internal/logic/core/uns/unsLabelCrudLogic.go:29-35 | backend/internal/logic/openapi/v1/flow/openapiFlowLegacyLogic.go:47-53 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Swallowed exception (caught, then discarded) backend/internal/middleware/auditlogMiddleware.go:61— `if err := decoder.Decode(&payload); err != nil` 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, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) backend/internal/logic/openapi/v1/uns/openapi_contract.go:990— `if err != nil` 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, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) backend/internal/logic/openapi/v1/uns/openapi_contract.go:1001— `if err != nil` 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, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC4 · Keyboard semantics· Anchor without href · ×2
Anchor without href frontend/apps/anchor/src/pages/model-detail/index.tsx:177— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Anchor without href frontend/apps/web/src/pages/open-data/index.tsx:110— An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
Low contrast colour pair in CSS (3.6:1) frontend/apps/web/src/pages/mqtt-auth/index.module.scss:249— `.successTag` sets color: #059669 on background-color: #ecfdf5 — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (3.6:1) frontend/apps/web/src/pages/mqtt-auth/index.module.scss:255— `.connectedStatusTag` sets color: #059669 on background-color: #ecfdf5 — 3.6:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.2:1) frontend/apps/web/src/pages/audit-log/index.module.scss:202— `.failedTag` sets color: #c92a2a on background-color: #fcd9d9 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
Low contrast colour pair in CSS (4.2:1) frontend/apps/web/src/pages/account-management/index.module.scss:107— `.statusUnavailable` sets color: #c92a2a on background-color: #fcd9d9 — 4.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×2
Focus outline removed in CSS without a :focus replacement frontend/apps/web/src/theme/codemirror.module.scss:4— `.custom-theme :global .cm-focused` 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.
Focus outline removed in CSS without a :focus replacement frontend/apps/web/src/pages/uns/index.scss:405— `.unsContainer .chartWrap .topicDetailWrap .topicDetailContent .tableWrap .payload-code-view.code-snippet .code-snippet-container: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.
ImportAppModal.ImportAppModal::onSave (cognitive 26) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:580— ImportAppModal.ImportAppModal::onSave has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, error handling 3 (5 pts) (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. This shape REPEATS in the file: 2 other methods here (ImportAppModal.ImportAppModal, ImportAppModal.ImportAppModal::doUpload) 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.
ImportAppModal.ImportAppModal::doUpload (cognitive 17) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:370— ImportAppModal.ImportAppModal::doUpload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, error handling 1, ternaries 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. This shape REPEATS in the file: 2 other methods here (ImportAppModal.ImportAppModal, ImportAppModal.ImportAppModal::onSave) 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.
index.Module (cognitive 20) frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:33— index.Module has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, ternaries 6, if/else 1, match/switch 1. Of this number, 15 points are the body's own statements and 5 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.
index.Module (cognitive 20) frontend/apps/web/src/pages/uns/index.tsx:61— index.Module has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 2, ternaries 2, match/switch 1. None of this is in the body itself: all 20 points belong to 7 function items inside it that branch (a function literal at line 128, a function literal at line 98, a function literal at line 169, …). 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.
MethodTooLong: Service.importNamespaceTree REDACTED:1209— MethodTooLong — importNamespaceTree runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× 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: Service.importNamespacePayload REDACTED:936— MethodTooLong — importNamespacePayload runs 104 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×2
Edited copy of a member (18 corresponding lines) backend/internal/logic/core/auth/currentUserPasswordUpdateLogic.go:34— backend/internal/logic/core/auth/currentUserPasswordUpdateLogic.go:34-56 | backend/internal/logic/core/iam/userPasswordResetLogic.go:34-51 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (18 corresponding lines) REDACTED:1898— REDACTED:1898-1915 | backend/internal/logic/openapi/v1/uns/openapi_contract.go:1142-1161 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) backend/internal/repo/uns_node.go:594— backend/internal/repo/uns_node.go:594-615 | backend/internal/repo/uns_node.go:632-657 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) backend/internal/repo/outbox.go:46— backend/internal/repo/outbox.go:46-67 | backend/internal/repo/outbox.go:69-94 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×2
Edited copy of a member (16 corresponding lines) REDACTED:772— REDACTED:772-787 | REDACTED:789-804 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (16 corresponding lines) REDACTED:1456— REDACTED:1456-1471 | backend/internal/handler/core/system/swaggerHandler.go:194-209 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×2
Edited copies of one member (4 members, 11+ corresponding lines) backend/internal/domain/apikey/service.go:21— backend/internal/domain/apikey/service.go:21-31 | backend/internal/domain/asset/service.go:87-97 | REDACTED:692-702 | REDACTED:752-762 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 11+ corresponding lines) backend/internal/handler/core/auth/currentUserConfigGetHandler.go:13— backend/internal/handler/core/auth/currentUserConfigGetHandler.go:13-23 | backend/internal/handler/core/auth/currentUserHandler.go:15-25 | backend/internal/handler/core/auth/logoutHandler.go:15-25 | backend/internal/handler/openapi/v1/auth/openapiWhoamiHandler.go:16-26 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×2
Edited copy of a member (15 corresponding lines) backend/internal/repo/flow.go:350— backend/internal/repo/flow.go:350-364 | backend/internal/repo/uns_node.go:563-577 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (15 corresponding lines) backend/internal/domain/flow/nodered_missing.go:89— backend/internal/domain/flow/nodered_missing.go:89-103 | backend/internal/domain/flow/nodered_missing.go:367-385 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Duplicated block (23 lines × 2) backend/internal/gateway/http.go:297— backend/internal/gateway/http.go:297-319 | backend/internal/gateway/http.go:332-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/gateway/http.go:297` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `backend/internal/gateway/http.go:323` calls `AuthenticateAPIKey`, `Context`, `APIKeyFromRequest` and `backend/internal/gateway/http.go:356` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (23 lines × 2) REDACTED:858— REDACTED:858-880 | REDACTED:897-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (5 lines × 2) REDACTED:822— REDACTED:822-826 | REDACTED:834-838 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:822` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (5 lines × 2) backend/internal/repo/iam.go:880— backend/internal/repo/iam.go:880-884 | backend/internal/repo/iam.go:986-991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Low cohesion: Service (LCOM4 6) backend/internal/domain/audit/service.go:106— Service's methods fall into 6 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 6 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: auditResponseWriter (LCOM4 4) backend/internal/middleware/auditlogMiddleware.go:67— auditResponseWriter'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.
R10 · Code Duplication· Duplicated block with local edits (143 matched lines × 2 locations) · ×2
Duplicated block with local edits (143 matched lines × 2 locations) frontend/apps/anchor/src/pages/model-library/index.tsx:34— frontend/apps/anchor/src/pages/model-library/index.tsx:34 · frontend/apps/anchor/src/pages/scene-library/index.tsx:23 — the two spans are one implementation copied and then locally edited — 914 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 (143 matched lines × 2 locations) frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:24— frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:24 · frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:45 — the two spans are one implementation copied and then locally edited — 959 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 (83 matched lines × 2 locations) · ×2
Duplicated block with local edits (83 matched lines × 2 locations) frontend/apps/web/src/hooks/usePagination.ts:56— frontend/apps/web/src/hooks/usePagination.ts:56 · frontend/apps/web/src/hooks/useSimpleRequest.ts:30 — the two spans are one implementation copied and then locally edited — 437 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 (83 matched lines × 2 locations) frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:183— frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:183 · frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:280 — the two spans are one implementation copied and then locally edited — 581 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 (59 matched lines × 2 locations) · ×2
Duplicated block with local edits (59 matched lines × 2 locations) frontend/apps/web/src/pages/mqtt-auth/index.tsx:2455— frontend/apps/web/src/pages/mqtt-auth/index.tsx:2455 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2516 — the two spans are one implementation copied and then locally edited — 376 tokens are still identical, in the same order in both spans, 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 (59 matched lines × 2 locations) frontend/apps/web/src/pages/vision/AlgorithmFormModal.tsx:53— frontend/apps/web/src/pages/vision/AlgorithmFormModal.tsx:53 · frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx:37 — the two spans are one implementation copied and then locally edited — 341 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.
Boundary violation [package:relative-cross-package] scripts/check-i18n.mjs:4— scripts/check-i18n.mjs:4 reaches into another package with a relative path (../frontend/apps/web/scripts/i18n-fallback-keys.mjs) — import the package by name instead.
Boundary violation [package:relative-cross-package] scripts/generate-i18n-fallback.mjs:4— scripts/generate-i18n-fallback.mjs:4 reaches into another package with a relative path (../frontend/apps/web/scripts/i18n-fallback-keys.mjs) — import the package by name instead.
Complex function (anonymous) (cyclomatic 35, cognitive 34) frontend/apps/web/src/components/cloud-sync/index.tsx:965— (anonymous) has cyclomatic complexity 35 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.
Complex function (anonymous) (cyclomatic 35, cognitive 34) frontend/apps/web/src/pages/mqtt-auth/index.tsx:1189— (anonymous) has cyclomatic complexity 35 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.
Dead file (~632 LoC) REDACTED— no import path from any entry point (47 application, 14 tooling, 0 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 (~632 LoC) REDACTED— no import path from any entry point (47 application, 14 tooling, 0 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 (~340 LoC) frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~340 LoC) frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~133 LoC) frontend/apps/web/src/layout/custom-nav/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~133 LoC) frontend/apps/web/src/pages/uns/components/label-detail/FileList.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/label-detail/index.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
Dead file (~100 LoC) frontend/apps/web/src/pages/localization/components/use-new-entry/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/localization/index.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
Dead file (~100 LoC) frontend/apps/web/src/pages/open-data/ServerTabs.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~97 LoC) frontend/apps/web/src/pages/uns/components/data-subscript/FileTable.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/data-subscript/index.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
Dead file (~97 LoC) scripts/check-i18n.mjs— no import path from any entry point (47 application, 14 tooling, 0 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
AC2 · Forms & labels· <TreeSelect> field component without a label · ×1
<TreeSelect> field component without a label frontend/apps/anchor/src/components/topic-select.tsx:76— 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.
AC2 · Forms & labels· <Slider> field component without a label · ×1
<Slider> field component without a label frontend/apps/anchor/src/pages/scene-editor/index.tsx:403— 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· <TextArea> field component without a label · ×1
<TextArea> field component without a label frontend/apps/web/src/pages/license-activation/index.tsx:245— 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.
AC4 · Keyboard semantics· Link used as a button (placeholder href) · ×1
Link used as a button (placeholder href) frontend/apps/web/src/hooks/useDownloadNotification.tsx:20— An <a href="#"> (or javascript:) with a click handler is a button dressed as a link — it announces the wrong role and stops working without JS. Use a <button> for an action.
Low contrast colour pair in CSS (3.5:1) frontend/apps/web/src/components/com-formula/code-editor/index.scss:169— `li.CodeMirror-hint-active` sets color: white on background-color: #08f — 3.5:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
index.TopTreeCom (cyclomatic 112) frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:443— index.TopTreeCom has cyclomatic complexity 112 (threshold 15). Most of this is not in the body itself: 6 of the 112 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 736, a function literal at line 632, a function literal at line 701, …). 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.
index.InstanceDetailPage (cyclomatic 107) frontend/apps/anchor/src/pages/instance-detail/index.tsx:52— index.InstanceDetailPage has cyclomatic complexity 107 (threshold 15). Of this number, 40 points are the body's own statements and 67 belong to 25 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.
FleetNodeDetailPage.FleetNodeDetailPage (cyclomatic 97) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:147— FleetNodeDetailPage.FleetNodeDetailPage has cyclomatic complexity 97 (threshold 15). Of this number, 29 points are the body's own statements and 68 belong to 25 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.
index.SceneEditorPage (cyclomatic 94) frontend/apps/anchor/src/pages/scene-editor/index.tsx:56— index.SceneEditorPage has cyclomatic complexity 94 (threshold 15). Of this number, 17 points are the body's own statements and 77 belong to 39 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.
ReplaceAppModal.ReplaceAppModal (cyclomatic 87) frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:32— ReplaceAppModal.ReplaceAppModal has cyclomatic complexity 87 (threshold 15). Of this number, 20 points are the body's own statements and 67 belong to 15 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.
index.FormStep (cyclomatic 85) frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.tsx:30— index.FormStep has cyclomatic complexity 85 (threshold 15). Most of this is not in the body itself: 11 of the 85 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 92, a function literal at line 255, a function literal at line 270, …). 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.
treeStore.createTreeStore (cyclomatic 83) frontend/apps/web/src/pages/uns/store/treeStore.tsx:56— treeStore.createTreeStore has cyclomatic complexity 83 (threshold 15). Most of this is not in the body itself: 1 of the 83 points is its own statement and the rest belongs to 24 function literals inside it that branch (lines 202, 90, 574, …). 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.
editor.NotebookEditorPage (cyclomatic 82) frontend/apps/web/src/pages/notebook/editor.tsx:73— editor.NotebookEditorPage has cyclomatic complexity 82 (threshold 15). Of this number, 18 points are the body's own statements and 64 belong to 25 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.
ProCard.ProCard (cyclomatic 79) frontend/apps/web/src/components/pro-card/ProCard.tsx:16— ProCard.ProCard has cyclomatic complexity 79 (threshold 15). Of this number, 65 points are the body's own statements and 14 belong to 6 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.
index.CollectionFlow (cyclomatic 75) frontend/apps/web/src/pages/collection-flow/index.tsx:76— index.CollectionFlow has cyclomatic complexity 75 (threshold 15). Of this number, 30 points are the body's own statements and 45 belong to 22 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.
index.CodeSnippet (cyclomatic 72) frontend/apps/web/src/components/code-snippet/index.tsx:158— index.CodeSnippet has cyclomatic complexity 72 (threshold 15). Of this number, 35 points are the body's own statements and 37 belong to 8 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.
index.MqttAuthPage (cyclomatic 70) frontend/apps/web/src/pages/mqtt-auth/index.tsx:372— index.MqttAuthPage has cyclomatic complexity 70 (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: 2 other methods here (index.MqttAuthPage::logValueText, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.JsonForm (cyclomatic 70) frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx:35— index.JsonForm has cyclomatic complexity 70 (threshold 15). Most of this is not in the body itself: 3 of the 70 points are its own statements and the rest belongs to 22 function items inside it that branch (renderContent, getTargetNode, save, …). 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.
TopologyChart.TopologyChart (cyclomatic 67) frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx:176— TopologyChart.TopologyChart has cyclomatic complexity 67 (threshold 15). Most of this is not in the body itself: 11 of the 67 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 298, 248, 459, …). 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.
RegionEditor.RegionEditor (cyclomatic 66) frontend/apps/web/src/pages/vision/RegionEditor.tsx:22— RegionEditor.RegionEditor has cyclomatic complexity 66 (threshold 15). Of this number, 49 points are the body's own statements and 17 belong to 11 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.
AIProviderConfigPanel.AIProviderConfigPanel (cyclomatic 62) frontend/apps/web/src/pages/open-data/AIProviderConfigPanel.tsx:31— AIProviderConfigPanel.AIProviderConfigPanel has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 13 of the 62 points are its own statements and the rest belongs to 9 function items inside it that branch (testConnection, saveConfig, mapEmbeddingFieldError, …). 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.
index.ConsumersTab (cyclomatic 62) frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:50— index.ConsumersTab has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 1 of the 62 points is its own statement and the rest belongs to 17 function literals inside it that branch (lines 167, 286, 498, …). 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.
ProTreeSelect.ProTreeSelect (cyclomatic 59) frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx:32— ProTreeSelect.ProTreeSelect has cyclomatic complexity 59 (threshold 15). Most of this is not in the body itself: 5 of the 59 points are its own statements and the rest belongs to 12 function items inside it that branch (_treeTitleRender, loadData, a function literal at line 406, …). 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.
app-detail.AppDetailPage (cyclomatic 58) frontend/apps/web/src/pages/launchpad/app-detail.tsx:49— app-detail.AppDetailPage has cyclomatic complexity 58 (threshold 15). Of this number, 20 points are the body's own statements and 38 belong to 13 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.
index.EventFlow (cyclomatic 57) frontend/apps/web/src/pages/event-flow/index.tsx:60— index.EventFlow has cyclomatic complexity 57 (threshold 15). Of this number, 26 points are the body's own statements and 31 belong to 16 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.
FieldsFormList.FieldsFormList (cyclomatic 57) frontend/apps/web/src/pages/uns/components/use-create-modal/components/FieldsFormList.tsx:36— FieldsFormList.FieldsFormList has cyclomatic complexity 57 (threshold 15). Most of this is not in the body itself: 6 of the 57 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 176, a function literal at line 111, a function literal at line 174, …). 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.
core-adapter.buttonParentResourceKey (cyclomatic 56) frontend/apps/web/src/apis/core-api/core-adapter.ts:513— core-adapter.buttonParentResourceKey has cyclomatic complexity 56 (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.
FlowPreview.FlowPreview (cyclomatic 54) REDACTED:36— FlowPreview.FlowPreview has cyclomatic complexity 54 (threshold 15). Of this number, 16 points are the body's own statements and 38 belong to 22 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.
FlowPreview.EventFlowPreview (cyclomatic 54) REDACTED:36— FlowPreview.EventFlowPreview has cyclomatic complexity 54 (threshold 15). Of this number, 16 points are the body's own statements and 38 belong to 22 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.
index.LicenseActivation (cyclomatic 54) frontend/apps/web/src/pages/license-activation/index.tsx:20— index.LicenseActivation has cyclomatic complexity 54 (threshold 15). Of this number, 27 points are the body's own statements and 27 belong to 9 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.
EditButton.EditButton (cyclomatic 54) frontend/apps/web/src/pages/uns/components/EditButton.tsx:16— EditButton.EditButton has cyclomatic complexity 54 (threshold 15). Most of this is not in the body itself: 8 of the 54 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 369, a function literal at line 117, renderMoreField, …). 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.
runtime-regression.runBrowserRegression (cyclomatic 53) deploy/regression/runtime-regression.mjs:237— runtime-regression.runBrowserRegression has cyclomatic complexity 53 (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.
index.useOptionModal.setOptionOpen (cyclomatic 53) frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:88— index.useOptionModal.setOptionOpen has cyclomatic complexity 53 (threshold 15). Of this number, 50 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.
TaskPreviewModal.CameraLiveView (cyclomatic 53) frontend/apps/web/src/pages/vision/TaskPreviewModal.tsx:55— TaskPreviewModal.CameraLiveView has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 13 of the 53 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 185, a function literal at line 151, a function literal at line 109, …). 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.
core-adapter.mapUnsNode (cyclomatic 52) frontend/apps/web/src/apis/core-api/core-adapter.ts:818— core-adapter.mapUnsNode has cyclomatic complexity 52 (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.
ReverseGeneration.ReverseGeneration (cyclomatic 52) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/ReverseGeneration.tsx:24— ReverseGeneration.ReverseGeneration has cyclomatic complexity 52 (threshold 15). Of this number, 26 points are the body's own statements and 26 belong to 10 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.
index.MqttAuthPage (cyclomatic 48) frontend/apps/web/src/components/cloud-sync/index.tsx:310— index.MqttAuthPage has cyclomatic complexity 48 (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: 2 other methods here (index.MqttAuthPage::logValueText, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
index.ModelDetailPage (cyclomatic 45) frontend/apps/anchor/src/pages/model-detail/index.tsx:40— index.ModelDetailPage has cyclomatic complexity 45 (threshold 15). Of this number, 20 points are the body's own statements and 25 belong to 11 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.
runtime-regression.runFlowFolderJourney (cyclomatic 44) deploy/regression/runtime-regression.mjs:887— runtime-regression.runFlowFolderJourney has cyclomatic complexity 44 (threshold 15). Of this number, 37 points are the body's own statements and 7 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.
CameraFormModal.CameraFormModal (cyclomatic 44) frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx:30— CameraFormModal.CameraFormModal has cyclomatic complexity 44 (threshold 15). Of this number, 20 points are the body's own statements and 24 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.
index.ProTable (cyclomatic 42) frontend/apps/web/src/components/pro-table/index.tsx:41— index.ProTable has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 12 of the 42 points are its own statements and the rest belongs to 14 function items inside it that branch (balanceColumns, a function literal at line 134, a function literal at line 190, …). 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.
TaskFormModal.TaskFormModal (cyclomatic 42) frontend/apps/web/src/pages/vision/TaskFormModal.tsx:67— TaskFormModal.TaskFormModal has cyclomatic complexity 42 (threshold 15). Of this number, 19 points are the body's own statements and 23 belong to 10 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.
CameraPreviewModal.CameraPreviewModal (cyclomatic 42) frontend/apps/web/src/pages/vision/components/CameraPreviewModal.tsx:37— CameraPreviewModal.CameraPreviewModal has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 14 of the 42 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 74, a function literal at line 50, handlePlaying, …). 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.
FleetManagementPanel.FleetManagementPanel (cyclomatic 41) frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:67— FleetManagementPanel.FleetManagementPanel has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 11 of the 41 points are its own statements and the rest belongs to 12 function items inside it that branch (saveNode, a function literal at line 282, a function literal at line 84, …). 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.
index.FormContent::getFormData (cyclomatic 41) frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:132— index.FormContent::getFormData has cyclomatic complexity 41 (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.
index.Index (cyclomatic 40) frontend/apps/web/src/components/draggable/index.tsx:89— index.Index has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 3 of the 40 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 274, handleMouseEnter, handleMouseLeave, …). 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.
SortableTree.SortableTree (cyclomatic 40) frontend/apps/web/src/pages/menu-configuration/components/menu-tree/SortableTree.tsx:60— SortableTree.SortableTree has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 9 of the 40 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 192, a function literal at line 203, handleDragEnd, …). 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.
project-detail.ProjectDetailPage (cyclomatic 39) frontend/apps/web/src/pages/launchpad/project-detail.tsx:45— project-detail.ProjectDetailPage has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 13 of the 39 points are its own statements and the rest belongs to 9 function items inside it that branch (handleAppClick, a function literal at line 125, a function literal at line 73, …). 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.
index.NotebookPage (cyclomatic 39) frontend/apps/web/src/pages/notebook/index.tsx:58— index.NotebookPage has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 87, 119, 131, …). 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.
index.RoutingManagement (cyclomatic 39) frontend/apps/web/src/pages/routing-management/index.tsx:86— index.RoutingManagement has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 254, openEdit, submit, …). 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.
EditDetailButton.EditDetailButton (cyclomatic 39) frontend/apps/web/src/pages/uns/components/EditDetailButton.tsx:54— EditDetailButton.EditDetailButton has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 2 of the 39 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 196, onSave, handleBackfill, …). 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.
ImportDom.ImportDom (cyclomatic 39) frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:14— ImportDom.ImportDom has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 15 of the 39 points are its own statements and the rest belongs to 7 function items inside it that branch (onSave, a function literal at line 122, a function literal at line 78, …). 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.
runtime-regression.runRuntimeRegression (cyclomatic 38) deploy/regression/runtime-regression.mjs:1159— runtime-regression.runRuntimeRegression has cyclomatic complexity 38 (threshold 15). Of this number, 37 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.
App.App (cyclomatic 38) frontend/apps/web/src/App.tsx:95— App.App has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 4 of the 38 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 127, 109, 195, …). 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.
ImportAppModal.ImportAppModal (cyclomatic 38) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:67— ImportAppModal.ImportAppModal has cyclomatic complexity 38 (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 (ImportAppModal.ImportAppModal::onSave) 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.
index.ProTree (cyclomatic 36) frontend/apps/web/src/components/pro-tree/index.tsx:27— index.ProTree has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 10 of the 36 points are its own statements and the rest belongs to 6 function items inside it that branch (_titleRender, onRightClickHandle, a function literal at line 75, …). 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.
JsonDom.JsonDom (cyclomatic 36) frontend/apps/web/src/pages/uns/components/import-modal/JsonDom.tsx:18— JsonDom.JsonDom has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 12 of the 36 points are its own statements and the rest belongs to 7 function items inside it that branch (onSave, a function literal at line 102, a function literal at line 70, …). 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.
AnalysisTasksPanel.AnalysisTasksPanel (cyclomatic 35) frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:52— AnalysisTasksPanel.AnalysisTasksPanel has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 10 of the 35 points are its own statements and the rest belongs to 12 function items inside it that branch (operationItems, a function literal at line 230, a function literal at line 169, …). 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.
Service.importNamespacePayload (cyclomatic 34) REDACTED:936— Service.importNamespacePayload has cyclomatic complexity 34 (threshold 15). Of this number, 33 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.
IAMRepo.UpdateUser (cyclomatic 34) backend/internal/repo/iam.go:371— IAMRepo.UpdateUser has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 4 of the 34 points are its own statements and the rest belongs to one function literal inside it that branches (line 385). 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.
data-tagging.DataTaggingPanel (cyclomatic 34) frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:24— data-tagging.DataTaggingPanel has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 12 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 86, a function literal at line 47, a function literal at line 323, …). 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.
HistoryPanel.HistoryPanel (cyclomatic 34) frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:51— HistoryPanel.HistoryPanel has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 3 of the 34 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 198, handleSaveAsSubmit, a function literal at line 213, …). 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.
index.ServicesTab (cyclomatic 34) frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:44— index.ServicesTab has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 2 of the 34 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 68, 379, 113, …). 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.
Service.importNamespaceTree (cyclomatic 33) REDACTED:1209— Service.importNamespaceTree has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 6 of the 33 points are its own statements and the rest belongs to one function literal inside it that branches (line 1233). 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.
tag-overlay.TagOverlay (cyclomatic 33) frontend/apps/anchor/src/pages/instance-detail/tag-overlay.tsx:37— tag-overlay.TagOverlay has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 146, 73, 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.
index.PermissionManagement (cyclomatic 33) frontend/apps/web/src/pages/permission-management/index.tsx:138— index.PermissionManagement has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 11 function items inside it that branch (openActionModal, onSave, a function literal at line 164, …). 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.
treeStore.createTreeStore (cyclomatic 33) frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:141— treeStore.createTreeStore 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 12 function literals inside it that branch (lines 146, 393, 297, …). 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.
core-adapter.mapFlow (cyclomatic 32) frontend/apps/web/src/apis/core-api/core-adapter.ts:903— core-adapter.mapFlow has cyclomatic complexity 32 (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.
index.LoginPage (cyclomatic 32) frontend/apps/web/src/pages/login/index.tsx:49— index.LoginPage has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 2 of the 32 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 112, a function literal at line 58, 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.
index.Apps (cyclomatic 32) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.tsx:54— index.Apps 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 11 function literals inside it that branch (lines 251, 104, 66, …). 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.
index.PluginsTab (cyclomatic 32) frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:23— index.PluginsTab has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 7 of the 32 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 204, 50, 193, …). 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.
qr-modal.InstanceQrModal (cyclomatic 31) frontend/apps/anchor/src/pages/instance-detail/qr-modal.tsx:20— qr-modal.InstanceQrModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 10 of the 31 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 79, 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.
menu-icon-map.resolveMenuLucideIcon (cyclomatic 31) frontend/apps/web/src/components/lucide-icon/menu-icon-map.ts:63— menu-icon-map.resolveMenuLucideIcon has cyclomatic complexity 31 (threshold 15). Of this number, 30 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.
ManualAppModal.ManualAppModal (cyclomatic 31) frontend/apps/web/src/pages/project/components/ManualAppModal.tsx:42— ManualAppModal.ManualAppModal has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 2 of the 31 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 289, a function literal at line 81, 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.
Details.Details (cyclomatic 31) frontend/apps/web/src/pages/uns/components/topic-detail/Details.tsx:14— Details.Details has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 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.
index.updateBaseStore (cyclomatic 31) frontend/apps/web/src/stores/base/index.ts:170— index.updateBaseStore has cyclomatic complexity 31 (threshold 15). Of this number, 25 points are the body's own statements and 6 belong 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.
use-scene-editor.useSceneEditor.applyConfig (cyclomatic 30) frontend/apps/anchor/src/viewer/use-scene-editor.ts:458— use-scene-editor.useSceneEditor.applyConfig has cyclomatic complexity 30 (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.
useTabs.useTabs (cyclomatic 29) frontend/apps/web/src/layout/useTabs.ts:43— useTabs.useTabs has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 62, 116, 106, …). 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.
index.CliAuthPage (cyclomatic 29) frontend/apps/web/src/pages/cli-auth/index.tsx:41— index.CliAuthPage 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 6 function items inside it that branch (a function literal at line 58, renderContent, handleGenerateKey, …). 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.
index.FleetRuntimePage (cyclomatic 29) frontend/apps/web/src/pages/fleet-runtime/index.tsx:64— index.FleetRuntimePage has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 7 of the 29 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 93, 259, 75, …). 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.
VersionDrawer.VersionDrawer (cyclomatic 29) frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:37— VersionDrawer.VersionDrawer has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 3 of the 29 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 169, handleSaveAsSubmit, getSnapshotTypeLabel, …). 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.
AccountSettingsPanel.AccountSettingsPanel (cyclomatic 29) frontend/apps/web/src/pages/settings/AccountSettingsPanel.tsx:39— AccountSettingsPanel.AccountSettingsPanel has cyclomatic complexity 29 (threshold 15). Of this number, 15 points are the body's own statements and 14 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.
use-model-viewer.useModelViewer (cyclomatic 28) frontend/apps/anchor/src/viewer/use-model-viewer.ts:56— use-model-viewer.useModelViewer has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 155, 80, 132, …). 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.
uns.toUnsPayload (cyclomatic 28) frontend/apps/web/src/apis/core-api/uns.ts:23— uns.toUnsPayload has cyclomatic complexity 28 (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.
WritDownDataButton.WritDownData (cyclomatic 28) frontend/apps/web/src/pages/uns/components/WritDownDataButton.tsx:20— WritDownDataButton.WritDownData has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 2 of the 28 points are its own statements and the rest belongs to 10 function items inside it that branch (renderFormItemChild, a function literal at line 82, a function literal at line 56, …). 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.
path-utils.validateNamespaceName (cyclomatic 28) frontend/apps/web/src/pages/uns/components/use-create-modal/path-utils.ts:59— path-utils.validateNamespaceName has cyclomatic complexity 28 (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.
CloudSyncConnectModal.CloudSyncConnectModal (cyclomatic 28) frontend/apps/web/src/pages/uns/components/uns-dashboard/CloudSyncConnectModal.tsx:23— CloudSyncConnectModal.CloudSyncConnectModal 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 5 function items inside it that branch (handleSave, a function literal at line 35, handleTest, …). 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.
index.ReverseModal (cyclomatic 28) frontend/apps/web/src/pages/uns/components/reverse-modal/index.tsx:21— index.ReverseModal has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 91, a function literal at line 156, getSourceForm, …). 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.
runtime-regression.runFoundationJourney (cyclomatic 27) deploy/regression/runtime-regression.mjs:646— runtime-regression.runFoundationJourney has cyclomatic complexity 27 (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.
CloudSyncConnectModal.CloudSyncConnectModal (cyclomatic 27) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:54— CloudSyncConnectModal.CloudSyncConnectModal has cyclomatic complexity 27 (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 (CloudSyncConnectModal.CloudSyncConnectModal::handleSave) 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.
TaskDetailModal.TaskDetailModal (cyclomatic 27) frontend/apps/web/src/pages/vision/TaskDetailModal.tsx:20— TaskDetailModal.TaskDetailModal has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 6 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.
Service.QueryHistory (cyclomatic 26) backend/internal/domain/dataingest/history_query.go:48— Service.QueryHistory has cyclomatic complexity 26 (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.
ResultsPanel.ResultsPanel (cyclomatic 26) frontend/apps/web/src/pages/vision/ResultsPanel.tsx:36— ResultsPanel.ResultsPanel has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 11 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (renderCard, a function literal at line 206, a function literal at line 53, …). 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.
Config.Normalize (cyclomatic 25) backend/internal/config/config.go:101— Config.Normalize has cyclomatic complexity 25 (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.
index.ModelLibraryPage (cyclomatic 25) frontend/apps/anchor/src/pages/model-library/index.tsx:22— index.ModelLibraryPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 10 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (handleUpload, a function literal at line 37, handleRename, …). 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.
core-adapter.toLegacyResource (cyclomatic 25) frontend/apps/web/src/apis/core-api/core-adapter.ts:656— core-adapter.toLegacyResource 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.
index.Index (cyclomatic 25) frontend/apps/web/src/components/com-tag-filter/index.tsx:18— index.Index has cyclomatic complexity 25 (threshold 15). Of this number, 13 points are the body's own statements and 12 belong to 6 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.
useFleetContainerLogs.logsReducer (cyclomatic 25) frontend/apps/web/src/pages/fleet-shared/useFleetContainerLogs.ts:72— useFleetContainerLogs.logsReducer has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 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.
index.LaunchpadPage (cyclomatic 25) frontend/apps/web/src/pages/launchpad/index.tsx:17— index.LaunchpadPage has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (handleAppClick, a function literal at line 114, a function literal at line 34, …). 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.
MemberModal.MemberModal (cyclomatic 25) frontend/apps/web/src/pages/project/components/tabs-content/members/MemberModal.tsx:39— MemberModal.MemberModal has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (onSave, a function literal at line 62, a function literal at line 75, …). 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.
index.Module (cyclomatic 25) frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:33— index.Module has cyclomatic complexity 25 (threshold 15). Of this number, 17 points are the body's own statements and 8 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.
AlgorithmsPanel.AlgorithmsPanel (cyclomatic 25) frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:45— AlgorithmsPanel.AlgorithmsPanel has cyclomatic complexity 25 (threshold 15). Of this number, 18 points are the body's own statements and 7 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.
ResultDetailModal.ResultDetailModal (cyclomatic 25) frontend/apps/web/src/pages/vision/ResultDetailModal.tsx:38— ResultDetailModal.ResultDetailModal has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to 3 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.
uns.copyNodePayload (cyclomatic 24) frontend/apps/web/src/apis/core-api/uns.ts:433— uns.copyNodePayload has cyclomatic complexity 24 (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.
FleetContainerLogsDrawer.FleetContainerLogsDrawer (cyclomatic 24) frontend/apps/web/src/pages/fleet-shared/FleetContainerLogsDrawer.tsx:117— FleetContainerLogsDrawer.FleetContainerLogsDrawer has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to 8 function items inside it that branch (handleDownloadLogs, a function literal at line 234, handleTabDragEnd, …). 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.
MenuContent.MenuContent (cyclomatic 24) frontend/apps/web/src/pages/menu-configuration/components/menu-content/MenuContent.tsx:32— MenuContent.MenuContent has cyclomatic complexity 24 (threshold 15). Of this number, 12 points are the body's own statements and 12 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.
NotebookTable.NotebookTable (cyclomatic 24) frontend/apps/web/src/pages/notebook/components/NotebookTable.tsx:39— NotebookTable.NotebookTable has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 190, handleDownload, getOwnerDisplayName, …). 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.
index.RoutesTab (cyclomatic 24) frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:19— index.RoutesTab has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 38, 125, 161, …). 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.
RecycleTree.RecycleTree (cyclomatic 24) frontend/apps/web/src/pages/uns/components/uns-tree/RecycleTree.tsx:61— RecycleTree.RecycleTree has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 8 of the 24 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 136, 191, 89, …). 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.
index.Module (cyclomatic 24) frontend/apps/web/src/pages/uns/index.tsx:61— index.Module has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 128, a function literal at line 98, a function literal at line 169, …). 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.
legacy-icon-map.resolveLegacyLucideIcon (cyclomatic 23) frontend/apps/web/src/components/lucide-icon/legacy-icon-map.ts:108— legacy-icon-map.resolveLegacyLucideIcon has cyclomatic complexity 23 (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.
index.ClusterPage (cyclomatic 23) frontend/apps/web/src/pages/cluster/index.tsx:26— index.ClusterPage has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 41, handshake, createToken, …). 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.
index.edgeNodeConnectionObjectFromRecord (cyclomatic 23) frontend/apps/web/src/pages/mqtt-auth/index.tsx:192— index.edgeNodeConnectionObjectFromRecord 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.
CameraInputsPanel.CameraInputsPanel (cyclomatic 23) frontend/apps/web/src/pages/vision/CameraInputsPanel.tsx:32— CameraInputsPanel.CameraInputsPanel has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 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 162, a function literal at line 126, a function literal at line 147, …). 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.
Service.NormalizeOpenapiCreateCommand (cyclomatic 22) REDACTED:236— Service.NormalizeOpenapiCreateCommand 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.
Store.Seed (cyclomatic 22) backend/internal/repo/seed.go:15— Store.Seed 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 one function literal inside it that branches (line 27). 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.
runtime-regression.inspectMockFlow (cyclomatic 22) deploy/regression/runtime-regression.mjs:84— runtime-regression.inspectMockFlow 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.
runtime-regression.runAtomicityFaultInjection (cyclomatic 22) deploy/regression/runtime-regression.mjs:552— runtime-regression.runAtomicityFaultInjection has cyclomatic complexity 22 (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.
index.AccountManagement (cyclomatic 22) frontend/apps/web/src/pages/account-management/index.tsx:141— index.AccountManagement 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 6 function items inside it that branch (renderOperationIcon, a function literal at line 317, renderStatusToggleIcon, …). 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.
NotebookSidebar.NotebookSidebar (cyclomatic 22) frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx:258— NotebookSidebar.NotebookSidebar has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 450, a function literal at line 428, a function literal at line 312, …). 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.
ImportAppModal.ImportAppModal::onSave (cyclomatic 22) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:580— ImportAppModal.ImportAppModal::onSave has cyclomatic complexity 22 (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 (ImportAppModal.ImportAppModal) 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.
Dashboard.DetailDashboard (cyclomatic 22) frontend/apps/web/src/pages/uns/components/topic-detail/Dashboard.tsx:56— Dashboard.DetailDashboard 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 8 function literals inside it that branch (lines 92, 158, 221, …). 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.
runDefaultAdminUserJourney (cyclomatic 22) deploy/regression/runtime-regression.mjs:414— runDefaultAdminUserJourney has cyclomatic complexity 22 (threshold 15). Of this number, 21 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.
Service.commandToNode (cyclomatic 21) REDACTED:1917— Service.commandToNode 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.
uns.openapiUnsHistory (cyclomatic 21) backend/internal/logic/openapi/v1/uns/openapi_contract.go:199— uns.openapiUnsHistory 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.
repo.restoreUnsRecycleNode (cyclomatic 21) backend/internal/repo/uns_node.go:659— repo.restoreUnsRecycleNode 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.
IAMRepo.SaveResource (cyclomatic 21) backend/internal/repo/iam.go:1329— IAMRepo.SaveResource has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 1348). 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.
UnsRepo.UpdateUnsNode (cyclomatic 21) backend/internal/repo/uns_node.go:150— UnsRepo.UpdateUnsNode 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 one function literal inside it that branches (line 159). 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.
mapping-table.MappingTable (cyclomatic 21) frontend/apps/anchor/src/pages/instance-detail/mapping-table.tsx:153— mapping-table.MappingTable has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 258, a function literal at line 194, a function literal at line 210, …). 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.
core-adapter.toLegacyResources (cyclomatic 21) frontend/apps/web/src/apis/core-api/core-adapter.ts:706— core-adapter.toLegacyResources has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (buttonParentId, a function literal at line 707, a function literal at line 722, …). 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.
index.ComFormula (cyclomatic 21) frontend/apps/web/src/components/com-formula/index.tsx:32— index.ComFormula has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 65, a function literal at line 122, a function literal at line 179, …). 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.
index.ComTags (cyclomatic 21) frontend/apps/web/src/layout/components/com-tags/index.tsx:89— index.ComTags has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to 12 function items inside it that branch (handleContextMenu, a function literal at line 226, a function literal at line 191, …). 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.
multipart-upload.uploadWithMultipart (cyclomatic 21) frontend/apps/web/src/utils/multipart-upload.ts:321— multipart-upload.uploadWithMultipart has cyclomatic complexity 21 (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.
flow.orderNodesForSubflowLoad (cyclomatic 20) backend/internal/domain/flow/nodered_payload.go:526— flow.orderNodesForSubflowLoad has cyclomatic complexity 20 (threshold 15). Of this number, 12 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.
HTTPGateway.authorizeRoute (cyclomatic 20) backend/internal/gateway/http.go:283— HTTPGateway.authorizeRoute 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.
IAMRepo.ResourceKeysByURIs (cyclomatic 20) backend/internal/repo/iam.go:888— IAMRepo.ResourceKeysByURIs 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.
uns.listUns (cyclomatic 20) frontend/apps/web/src/apis/core-api/uns.ts:122— uns.listUns has cyclomatic complexity 20 (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.
index.ComBreadcrumb (cyclomatic 20) frontend/apps/web/src/components/com-breadcrumb/index.tsx:19— index.ComBreadcrumb has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 67, 41, 34, …). 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.
index.withIntlTable.IntlTableWrapper (cyclomatic 20) frontend/apps/web/src/components/pro-table/index.tsx:314— index.withIntlTable.IntlTableWrapper has cyclomatic complexity 20 (threshold 15). 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 353, 358, 365, …). 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.
index.CustomMenuHeader (cyclomatic 20) frontend/apps/web/src/layout/custom-menu-header/index.tsx:15— index.CustomMenuHeader has cyclomatic complexity 20 (threshold 15). Of this number, 12 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.
sync-result.formatCloudSyncSummary (cyclomatic 20) frontend/apps/web/src/pages/fleet-shared/sync-result.ts:22— sync-result.formatCloudSyncSummary has cyclomatic complexity 20 (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.
uns-tree.UnsTree (cyclomatic 20) frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx:41— uns-tree.UnsTree 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 9 function items inside it that branch (handleRenderLoadMoreNode, a function literal at line 253, a function literal at line 95, …). 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.
History.History (cyclomatic 20) frontend/apps/web/src/pages/uns/components/topic-detail/protocol-table/History.tsx:13— History.History has cyclomatic complexity 20 (threshold 15). 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, 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.
Functions.Functions (cyclomatic 20) frontend/apps/web/src/pages/uns/components/uns-dashboard/Functions.tsx:111— Functions.Functions has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 131, a function literal at line 171, a function literal at line 126, …). 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.
dataingest.NormalizePayload (cyclomatic 19) backend/internal/domain/dataingest/message.go:30— dataingest.NormalizePayload 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.
dataingest.splitSQLList (cyclomatic 19) REDACTED:893— dataingest.splitSQLList 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.
uns.aggregateOpenapiHistoryBucket (cyclomatic 19) backend/internal/logic/openapi/v1/uns/openapi_contract.go:669— uns.aggregateOpenapiHistoryBucket 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.
repo.roleResourceIDsByURIs (cyclomatic 19) backend/internal/repo/iam.go:819— repo.roleResourceIDsByURIs has cyclomatic complexity 19 (threshold 15). 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, 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.
IAMRepo.CreateUser (cyclomatic 19) backend/internal/repo/iam.go:249— IAMRepo.CreateUser has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 268). 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.
uns.ds2fs (cyclomatic 19) frontend/apps/web/src/apis/core-api/uns.ts:363— uns.ds2fs has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 365). 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.
index.ProModal (cyclomatic 19) frontend/apps/web/src/components/pro-modal/index.tsx:33— index.ProModal has cyclomatic complexity 19 (threshold 15). Of this number, 11 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.
CloudSyncConnectModal.CloudSyncConnectModal::handleSave (cyclomatic 19) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:118— CloudSyncConnectModal.CloudSyncConnectModal::handleSave 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: one other method here (CloudSyncConnectModal.CloudSyncConnectModal) 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.
index.Members (cyclomatic 19) frontend/apps/web/src/pages/project/components/tabs-content/members/index.tsx:17— index.Members 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 39, 42, 28, …). 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.
index.CertificatesTab (cyclomatic 19) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12— index.CertificatesTab has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 19, 116, 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.
index.TableSelect (cyclomatic 19) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/table-select/index.tsx:25— index.TableSelect 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 7 function items inside it that branch (a function literal at line 115, handleTableList, a function literal at line 33, …). 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.
request.service.interceptors.response.use() (cyclomatic 19) frontend/apps/web/src/utils/request.ts:157— request.service.interceptors.response.use() 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.
uns.isAliasFormatOK (cyclomatic 18) REDACTED:2234— uns.isAliasFormatOK 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.
asset.AssetUploadHandler (cyclomatic 18) backend/internal/handler/core/asset/assetUploadHandler.go:28— asset.AssetUploadHandler has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 29). 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.
IAMRepo.listResources (cyclomatic 18) backend/internal/repo/iam.go:1251— IAMRepo.listResources has cyclomatic complexity 18 (threshold 15). Of this number, 16 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.
CloudSyncRootSelector.CloudSyncRootSelector (cyclomatic 18) frontend/apps/web/src/components/cloud-sync/CloudSyncRootSelector.tsx:28— CloudSyncRootSelector.CloudSyncRootSelector has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 6 of the 18 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 39, a function literal at line 43, a function literal at line 36, …). 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.
MenuIconField.MenuIconField (cyclomatic 18) frontend/apps/web/src/pages/menu-configuration/components/menu-content/MenuIconField.tsx:29— MenuIconField.MenuIconField has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 44, 74, 34, …). 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.
index.Content (cyclomatic 18) frontend/apps/web/src/pages/uns/components/export-modal/index.tsx:70— index.Content has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 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.
audit.resourceTypeFromPath (cyclomatic 17) backend/internal/domain/audit/service.go:439— audit.resourceTypeFromPath has cyclomatic complexity 17 (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. This is NOT this file's highest cyclomatic complexity: audit.businessTypeFromPath (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
dataingest.lastIdentifier (cyclomatic 17) REDACTED:959— dataingest.lastIdentifier has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 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.
Service.PlatformMembers (cyclomatic 17) backend/internal/domain/iam/platform_members.go:68— Service.PlatformMembers 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.
uns.validateCreatePathParts (cyclomatic 17) REDACTED:1856— uns.validateCreatePathParts 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.
uns.parseOpenapiHistoryAggregation (cyclomatic 17) backend/internal/logic/openapi/v1/uns/openapi_contract.go:578— uns.parseOpenapiHistoryAggregation 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.
repo.ensureUnsFileTopicParent (cyclomatic 17) backend/internal/repo/uns_helpers.go:271— repo.ensureUnsFileTopicParent 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.
UnsRepo.includeUnsSearchAncestors (cyclomatic 17) backend/internal/repo/uns_node.go:418— UnsRepo.includeUnsSearchAncestors 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.
runtime-regression.cleanupFoundationJourney (cyclomatic 17) deploy/regression/runtime-regression.mjs:478— runtime-regression.cleanupFoundationJourney has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal 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.
splat-viewer.useSplatViewer (cyclomatic 17) frontend/apps/anchor/src/viewer/splat-viewer.tsx:83— splat-viewer.useSplatViewer 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 3 function literals inside it that branch (lines 103, 94, 178). 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.
kong.toGatewayRoute (cyclomatic 17) REDACTED:20— kong.toGatewayRoute has cyclomatic complexity 17 (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.
index.ProDraggerUpload (cyclomatic 17) frontend/apps/web/src/components/com-dragger-upload/index.tsx:23— index.ProDraggerUpload has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (beforeUpload, a function literal at line 91, openFileDialog). 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.
index.HomePageSelect (cyclomatic 17) frontend/apps/web/src/components/home-page-select/index.tsx:33— index.HomePageSelect 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 9 function literals inside it that branch (lines 69, 78, 50, …). 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.
EditAppModal.EditAppModal (cyclomatic 17) frontend/apps/web/src/pages/project/components/EditAppModal.tsx:24— EditAppModal.EditAppModal 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 (onSave, onOpen, onMediaSelect). 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.
FunctionList.FunctionList (cyclomatic 17) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/timeSeries/FunctionList.tsx:9— FunctionList.FunctionList 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 7 function items inside it that branch (onChange, resetFormula, fillFunctions, …). 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.
app-bundle-meta.findRootEntries (cyclomatic 17) frontend/apps/web/src/utils/app-bundle-meta.ts:111— app-bundle-meta.findRootEntries 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.
Service.BuildAuditLog (cyclomatic 16) backend/internal/domain/audit/service.go:246— Service.BuildAuditLog 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. This is NOT this file's highest cyclomatic complexity: audit.businessTypeFromPath (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
flow.appendSubflowClosure (cyclomatic 16) backend/internal/domain/flow/nodered_payload.go:245— flow.appendSubflowClosure 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.
flow.filterNodeRedRuntimeScope (cyclomatic 16) backend/internal/domain/flow/nodered_payload.go:672— flow.filterNodeRedRuntimeScope 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.
uns.filterExportNodes (cyclomatic 16) REDACTED:1091— uns.filterExportNodes 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.
Service.createByNamespacePath (cyclomatic 16) REDACTED:495— Service.createByNamespacePath 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.
uns.openapiUnsWrite (cyclomatic 16) backend/internal/logic/openapi/v1/uns/openapi_contract.go:89— uns.openapiUnsWrite 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.
UnsRepo.includeUnsRecycleAncestors (cyclomatic 16) backend/internal/repo/uns_node.go:322— UnsRepo.includeUnsRecycleAncestors has cyclomatic complexity 16 (threshold 15). Of this number, 13 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.
runtime-regression.inspectCopiedFlow (cyclomatic 16) deploy/regression/runtime-regression.mjs:133— runtime-regression.inspectCopiedFlow has cyclomatic complexity 16 (threshold 15). Of this number, 12 points are the body's own statements and 4 belong to 4 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.
thumbnail.generateSplatThumbnailProjectionFile (cyclomatic 16) frontend/apps/anchor/src/utils/thumbnail.ts:112— thumbnail.generateSplatThumbnailProjectionFile 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.
flow.createFlow (cyclomatic 16) frontend/apps/web/src/apis/core-api/flow.ts:220— flow.createFlow has cyclomatic complexity 16 (threshold 15). 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, 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.
index.CodeEditor (cyclomatic 16) frontend/apps/web/src/components/com-formula/code-editor/index.tsx:46— index.CodeEditor 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 74, 115, 125, …). 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.
UserPopover.UserPopover::resolveUpdateLicenseKeyErrorMessage (cyclomatic 16) frontend/apps/web/src/components/com-group-button/UserPopover.tsx:374— UserPopover.UserPopover::resolveUpdateLicenseKeyErrorMessage has cyclomatic complexity 16 (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.
ResizableTitle.ResizableTitle (cyclomatic 16) frontend/apps/web/src/components/pro-table/ResizableTitle.tsx:22— ResizableTitle.ResizableTitle has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (handleMouseMove, a function literal at line 100, 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.
useAddUser.useAddUser (cyclomatic 16) frontend/apps/web/src/pages/account-management/components/useAddUser.tsx:11— useAddUser.useAddUser has cyclomatic complexity 16 (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.
TreeItem.TreeItem (cyclomatic 16) frontend/apps/web/src/pages/menu-configuration/components/menu-tree/TreeItem/TreeItem.tsx:20— TreeItem.TreeItem has cyclomatic complexity 16 (threshold 15). 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, 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.
index.Module (cyclomatic 16) frontend/apps/web/src/pages/menu-configuration/index.tsx:19— index.Module 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 7 function items inside it that branch (onAddExternalMenu, menuLabel, a function literal at line 123, …). 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.
index.OpenData (cyclomatic 16) frontend/apps/web/src/pages/open-data/index.tsx:44— index.OpenData 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 10 function items inside it that branch (getMaskedKey, a function literal at line 129, a function literal at line 92, …). 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.
index.Roles (cyclomatic 16) frontend/apps/web/src/pages/project/components/tabs-content/roles/index.tsx:15— index.Roles 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 3 function literals inside it that branch (lines 38, 23, 68). 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.
index.SettingsPage (cyclomatic 16) frontend/apps/web/src/pages/settings/index.tsx:34— index.SettingsPage has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 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.
utils.appendTreeData::findAndAppend (cyclomatic 16) frontend/apps/web/src/pages/uns/store/utils.ts:124— utils.appendTreeData::findAndAppend 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.
index.Module::getItems (cyclomatic 16) frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:227— index.Module::getItems 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.
index.useOptionModal (cyclomatic 16) frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:44— index.useOptionModal has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 356, 372, 332). 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.
Functions.buildFunctionGroups (cyclomatic 16) frontend/apps/web/src/pages/uns/components/uns-dashboard/Functions.tsx:62— Functions.buildFunctionGroups has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 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.
TaskRegionSection.TaskRegionSection (cyclomatic 16) frontend/apps/web/src/pages/vision/TaskRegionSection.tsx:28— TaskRegionSection.TaskRegionSection has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 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 97, a function literal at line 34, statusLabel, …). 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.
utils.guideConfig (cyclomatic 16) REDACTED:186— utils.guideConfig 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.
FixmeComment frontend/apps/web/src/stores/i18n-store.ts:148— // FIXME: 在react组件中请使用useTranslate这个hooks,其他js文件中使用getIntl — 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 repeated across 11 files backend/internal/logic/core/uns/unsExportGlobalLogic.go:30— The identical TodoComment appears in 11 files (11 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 11 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// todo: add your logic here and delete this line". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
index.TopTreeCom (cognitive 181) frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:443— index.TopTreeCom has cognitive complexity 181 (threshold 15). Drivers by points: if/else 42 (89 pts), ternaries 24 (50 pts), boolean chains 42 (nesting depth added 73). Most of this is not in the body itself: 6 of the 181 points are its own statements and the rest belongs to 23 function items inside it that branch (a function literal at line 736, a function literal at line 701, a function literal at line 632, …). 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.
treeStore.createTreeStore (cognitive 170) frontend/apps/web/src/pages/uns/store/treeStore.tsx:56— treeStore.createTreeStore has cognitive complexity 170 (threshold 15). Drivers by points: if/else 65 (124 pts), ternaries 8 (22 pts), boolean chains 18, error handling 3 (5 pts), match/switch 1 (nesting depth added 75). None of this is in the body itself: all 170 points belong to 24 function literals inside it that branch (lines 202, 90, 112, …). 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.
index.FormStep (cognitive 125) frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.tsx:30— index.FormStep has cognitive complexity 125 (threshold 15). Drivers by points: if/else 30 (72 pts), boolean chains 26, ternaries 16 (25 pts), match/switch 1 (2 pts) (nesting depth added 52). Most of this is not in the body itself: 10 of the 125 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 92, a function literal at line 255, a function literal at line 270, …). 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.
index.InstanceDetailPage (cognitive 110) frontend/apps/anchor/src/pages/instance-detail/index.tsx:52— index.InstanceDetailPage has cognitive complexity 110 (threshold 15). Drivers by points: ternaries 31 (43 pts), if/else 32 (35 pts), boolean chains 28, error handling 3, loops 1 (nesting depth added 15). Of this number, 45 points are the body's own statements and 65 belong to 25 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.
index.SceneEditorPage (cognitive 104) frontend/apps/anchor/src/pages/scene-editor/index.tsx:56— index.SceneEditorPage has cognitive complexity 104 (threshold 15). Drivers by points: ternaries 37 (47 pts), if/else 30 (32 pts), boolean chains 20, error handling 2 (3 pts), loops 2 (nesting depth added 13). Of this number, 19 points are the body's own statements and 85 belong to 39 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.
index.useOptionModal.setOptionOpen (cognitive 100) frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:88— index.useOptionModal.setOptionOpen has cognitive complexity 100 (threshold 15). Drivers by points: ternaries 17 (58 pts), if/else 9 (19 pts), boolean chains 16, match/switch 2 (7 pts) (nesting depth added 56). Of this number, 97 points are the body's own statements and 3 belong 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.
index.CollectionFlow (cognitive 89) frontend/apps/web/src/pages/collection-flow/index.tsx:76— index.CollectionFlow has cognitive complexity 89 (threshold 15). Drivers by points: ternaries 45 (64 pts), boolean chains 16, if/else 9 (nesting depth added 19). Of this number, 36 points are the body's own statements and 53 belong to 22 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.
FleetNodeDetailPage.FleetNodeDetailPage (cognitive 85) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:147— FleetNodeDetailPage.FleetNodeDetailPage has cognitive complexity 85 (threshold 15). Drivers by points: boolean chains 47, ternaries 23 (24 pts), error handling 7, if/else 6, loops 1 (nesting depth added 1). Of this number, 26 points are the body's own statements and 59 belong to 25 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.
index.CodeSnippet (cognitive 83) frontend/apps/web/src/components/code-snippet/index.tsx:158— index.CodeSnippet has cognitive complexity 83 (threshold 15). Drivers by points: if/else 25 (39 pts), boolean chains 37, ternaries 6 (7 pts) (nesting depth added 15). Of this number, 45 points are the body's own statements and 38 belong to 8 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.
index.JsonForm (cognitive 82) frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx:35— index.JsonForm has cognitive complexity 82 (threshold 15). Drivers by points: if/else 29 (41 pts), boolean chains 21, ternaries 7 (11 pts), loops 3 (4 pts), match/switch 2 (3 pts), error handling 2 (nesting depth added 18). Most of this is not in the body itself: 2 of the 82 points are its own statements and the rest belongs to 22 function items inside it that branch (renderContent, getTargetNode, save, …). 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.
ReplaceAppModal.ReplaceAppModal (cognitive 81) frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:32— ReplaceAppModal.ReplaceAppModal has cognitive complexity 81 (threshold 15). Drivers by points: boolean chains 33, if/else 24 (25 pts), ternaries 12 (16 pts), error handling 6 (7 pts) (nesting depth added 6). Of this number, 16 points are the body's own statements and 65 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.
index.FormContent::getFormData (cognitive 80) frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:132— index.FormContent::getFormData has cognitive complexity 80 (threshold 15). Drivers by points: if/else 23 (50 pts), ternaries 8 (18 pts), boolean chains 12 (nesting depth added 37). 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.
index.EventFlow (cognitive 74) frontend/apps/web/src/pages/event-flow/index.tsx:60— index.EventFlow has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 32 (50 pts), boolean chains 14, if/else 10 (nesting depth added 18). Of this number, 34 points are the body's own statements and 40 belong to 16 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.
editor.NotebookEditorPage (cognitive 72) frontend/apps/web/src/pages/notebook/editor.tsx:73— editor.NotebookEditorPage has cognitive complexity 72 (threshold 15). Drivers by points: if/else 34 (35 pts), boolean chains 32, error handling 3, loops 1, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 13 of the 72 points are its own statements and the rest belongs to 25 function items inside it that branch (a function literal at line 213, a function literal at line 237, a function literal at line 347, …). 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.
index.MqttAuthPage (cognitive 70) frontend/apps/web/src/pages/mqtt-auth/index.tsx:372— index.MqttAuthPage has cognitive complexity 70 (threshold 15). Drivers by points: ternaries 132 (167 pts), boolean chains 163, if/else 133 (140 pts), error handling 5, loops 3 (nesting depth added 42). 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: 2 other methods here (index.MqttAuthPage::logValueText, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
treeStore.createTreeStore (cognitive 68) frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:141— treeStore.createTreeStore has cognitive complexity 68 (threshold 15). Drivers by points: if/else 34 (55 pts), ternaries 2 (7 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 27). None of this is in the body itself: all 68 points belong to 12 function literals inside it that branch (lines 146, 297, 308, …). 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.
Service.importNamespacePayload (cognitive 67) REDACTED:936— Service.importNamespacePayload has cognitive complexity 67 (threshold 15). Drivers by points: if/else 29 (61 pts), boolean chains 4, loops 2 (nesting depth added 32). Of this number, 66 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.
runtime-regression.runBrowserRegression (cognitive 65) deploy/regression/runtime-regression.mjs:237— runtime-regression.runBrowserRegression has cognitive complexity 65 (threshold 15). Drivers by points: if/else 27 (40 pts), boolean chains 20, loops 5 (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.
Service.importNamespaceTree (cognitive 64) REDACTED:1209— Service.importNamespaceTree has cognitive complexity 64 (threshold 15). Drivers by points: if/else 26 (57 pts), match/switch 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 33). Most of this is not in the body itself: 5 of the 64 points are its own statements and the rest belongs to one function literal inside it that branches (line 1233). 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.
SortableTree.SortableTree (cognitive 64) frontend/apps/web/src/pages/menu-configuration/components/menu-tree/SortableTree.tsx:60— SortableTree.SortableTree has cognitive complexity 64 (threshold 15). Drivers by points: ternaries 20 (38 pts), if/else 9 (15 pts), boolean chains 11 (nesting depth added 24). Most of this is not in the body itself: 12 of the 64 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 192, handleDragEnd, a function literal at line 203, …). 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.
AIProviderConfigPanel.AIProviderConfigPanel (cognitive 63) frontend/apps/web/src/pages/open-data/AIProviderConfigPanel.tsx:31— AIProviderConfigPanel.AIProviderConfigPanel has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (25 pts), ternaries 16 (18 pts), boolean chains 16, error handling 4 (nesting depth added 4). Most of this is not in the body itself: 13 of the 63 points are its own statements and the rest belongs to 9 function items inside it that branch (testConnection, saveConfig, mapEmbeddingFieldError, …). 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.
app-detail.AppDetailPage (cognitive 62) frontend/apps/web/src/pages/launchpad/app-detail.tsx:49— app-detail.AppDetailPage has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (24 pts), boolean chains 23, ternaries 9 (15 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 39 belong to 13 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.
EditButton.EditButton (cognitive 62) frontend/apps/web/src/pages/uns/components/EditButton.tsx:16— EditButton.EditButton has cognitive complexity 62 (threshold 15). Drivers by points: ternaries 15 (23 pts), boolean chains 21, if/else 15 (17 pts), match/switch 1 (nesting depth added 10). Most of this is not in the body itself: 6 of the 62 points are its own statements and the rest belongs to 16 function items inside it that branch (a function literal at line 369, a function literal at line 117, validateUnique, …). 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.
TopologyChart.TopologyChart (cognitive 59) frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx:176— TopologyChart.TopologyChart has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (30 pts), boolean chains 24, ternaries 3, error handling 1, match/switch 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 59 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 298, 248, 459, …). 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.
ReverseGeneration.ReverseGeneration (cognitive 59) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/ReverseGeneration.tsx:24— ReverseGeneration.ReverseGeneration has cognitive complexity 59 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 22, ternaries 4 (6 pts), error handling 1 (nesting depth added 13). Of this number, 18 points are the body's own statements and 41 belong to 10 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.
app-bundle-meta.findRootEntries (cognitive 57) frontend/apps/web/src/utils/app-bundle-meta.ts:111— app-bundle-meta.findRootEntries has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (52 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 41). 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.
index.MqttAuthPage (cognitive 56) frontend/apps/web/src/components/cloud-sync/index.tsx:310— index.MqttAuthPage has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 128, if/else 115 (120 pts), ternaries 92 (107 pts), error handling 2 (nesting depth added 20). 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: 2 other methods here (index.MqttAuthPage::logValueText, index.MqttAuthPage::renderBranchEdgeNodeContent) 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.
FlowPreview.FlowPreview (cognitive 55) REDACTED:36— FlowPreview.FlowPreview has cognitive complexity 55 (threshold 15). Drivers by points: if/else 27 (29 pts), boolean chains 18, ternaries 6, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 14 of the 55 points are its own statements and the rest belongs to 22 function items inside it that branch (saveFlowsToBackend, a function literal at line 156, a function literal at line 214, …). 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.
FlowPreview.EventFlowPreview (cognitive 55) REDACTED:36— FlowPreview.EventFlowPreview has cognitive complexity 55 (threshold 15). Drivers by points: if/else 27 (29 pts), boolean chains 18, ternaries 6, error handling 2 (nesting depth added 2). Most of this is not in the body itself: 14 of the 55 points are its own statements and the rest belongs to 22 function items inside it that branch (saveFlowsToBackend, a function literal at line 157, a function literal at line 216, …). 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.
ProCard.ProCard (cognitive 54) frontend/apps/web/src/components/pro-card/ProCard.tsx:16— ProCard.ProCard has cognitive complexity 54 (threshold 15). Drivers by points: boolean chains 35, ternaries 12 (16 pts), if/else 2, error handling 1 (nesting depth added 4). Of this number, 47 points are the body's own statements and 7 belong to 6 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.
index.ModelDetailPage (cognitive 51) frontend/apps/anchor/src/pages/model-detail/index.tsx:40— index.ModelDetailPage has cognitive complexity 51 (threshold 15). Drivers by points: ternaries 14 (21 pts), if/else 12 (13 pts), boolean chains 12, error handling 5 (nesting depth added 8). Of this number, 25 points are the body's own statements and 26 belong to 11 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.
FleetManagementPanel.FleetManagementPanel (cognitive 51) frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:67— FleetManagementPanel.FleetManagementPanel has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (18 pts), ternaries 11 (15 pts), boolean chains 14, error handling 4 (nesting depth added 8). Most of this is not in the body itself: 9 of the 51 points are its own statements and the rest belongs to 12 function items inside it that branch (saveNode, a function literal at line 282, a function literal at line 84, …). 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.
data-tagging.DataTaggingPanel (cognitive 50) frontend/apps/anchor/src/pages/instance-detail/data-tagging.tsx:24— data-tagging.DataTaggingPanel has cognitive complexity 50 (threshold 15). Drivers by points: ternaries 15 (28 pts), if/else 8 (12 pts), boolean chains 9, loops 1 (nesting depth added 17). Of this number, 18 points are the body's own statements and 32 belong to 11 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.
index.ConsumersTab (cognitive 50) frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:50— index.ConsumersTab has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 13, match/switch 5, ternaries 4 (5 pts), error handling 1 (nesting depth added 11). None of this is in the body itself: all 50 points belong to 17 function literals inside it that branch (lines 167, 498, 286, …). 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.
FieldsFormList.FieldsFormList (cognitive 49) frontend/apps/web/src/pages/uns/components/use-create-modal/components/FieldsFormList.tsx:36— FieldsFormList.FieldsFormList has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 28, if/else 10 (11 pts), ternaries 7 (9 pts), match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 5 of the 49 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 176, a function literal at line 111, validateUnique, …). 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.
CameraFormModal.CameraFormModal (cognitive 49) frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx:30— CameraFormModal.CameraFormModal has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 14 (23 pts), boolean chains 16, if/else 8 (9 pts), error handling 1 (nesting depth added 10). Of this number, 24 points are the body's own statements and 25 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.
runtime-regression.runFlowFolderJourney (cognitive 48) deploy/regression/runtime-regression.mjs:887— runtime-regression.runFlowFolderJourney has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 19, error handling 3 (5 pts), loops 1, ternaries 1 (nesting depth added 6). Of this number, 41 points are the body's own statements and 7 belong to 4 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.
runtime-regression.runRuntimeRegression (cognitive 48) deploy/regression/runtime-regression.mjs:1159— runtime-regression.runRuntimeRegression has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 14, ternaries 4, loops 3 (nesting depth added 11). Of this number, 47 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.
index.ProTable (cognitive 48) frontend/apps/web/src/components/pro-table/index.tsx:41— index.ProTable has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (24 pts), ternaries 13 (17 pts), boolean chains 6, loops 1 (nesting depth added 9). Most of this is not in the body itself: 11 of the 48 points are its own statements and the rest belongs to 14 function items inside it that branch (balanceColumns, a function literal at line 161, findFlexColumn, …). 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.
index.Index (cognitive 48) frontend/apps/web/src/components/draggable/index.tsx:89— index.Index has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 13 (23 pts), if/else 15, boolean chains 10 (nesting depth added 10). Most of this is not in the body itself: 2 of the 48 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 203, a function literal at line 274, handleMouseLeave, …). 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.
index.ProTree (cognitive 48) frontend/apps/web/src/components/pro-tree/index.tsx:27— index.ProTree has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 14 (25 pts), if/else 11 (15 pts), boolean chains 8 (nesting depth added 15). Of this number, 19 points are the body's own statements and 29 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.
project-detail.ProjectDetailPage (cognitive 48) frontend/apps/web/src/pages/launchpad/project-detail.tsx:45— project-detail.ProjectDetailPage has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 13 (15 pts), boolean chains 13, error handling 2 (nesting depth added 14). Of this number, 22 points are the body's own statements and 26 belong to 9 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.
ImportDom.ImportDom (cognitive 48) frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:14— ImportDom.ImportDom has cognitive complexity 48 (threshold 15). Drivers by points: ternaries 14 (22 pts), boolean chains 13, if/else 11 (12 pts), error handling 1 (nesting depth added 9). Of this number, 19 points are the body's own statements and 29 belong to 7 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.
useTabs.useTabs (cognitive 47) frontend/apps/web/src/layout/useTabs.ts:43— useTabs.useTabs has cognitive complexity 47 (threshold 15). Drivers by points: ternaries 4 (17 pts), if/else 9 (16 pts), boolean chains 14 (nesting depth added 20). None of this is in the body itself: all 47 points belong to 6 function literals inside it that branch (lines 62, 116, 106, …). 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.
core-adapter.buttonParentResourceKey (cognitive 46) frontend/apps/web/src/apis/core-api/core-adapter.ts:513— core-adapter.buttonParentResourceKey has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33, boolean chains 13. 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.
RegionEditor.RegionEditor (cognitive 45) frontend/apps/web/src/pages/vision/RegionEditor.tsx:22— RegionEditor.RegionEditor has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 20, ternaries 10 (15 pts), if/else 9 (10 pts) (nesting depth added 6). Of this number, 25 points are the body's own statements and 20 belong to 11 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.
TaskPreviewModal.CameraLiveView (cognitive 45) frontend/apps/web/src/pages/vision/TaskPreviewModal.tsx:55— TaskPreviewModal.CameraLiveView has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 27, if/else 12 (13 pts), ternaries 3 (4 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 11 of the 45 points are its own statements and the rest belongs to 14 function items inside it that branch (a function literal at line 185, a function literal at line 109, a function literal at line 151, …). 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.
EditDetailButton.EditDetailButton (cognitive 44) frontend/apps/web/src/pages/uns/components/EditDetailButton.tsx:54— EditDetailButton.EditDetailButton has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (18 pts), ternaries 8 (14 pts), boolean chains 11, match/switch 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 196, handleBackfill, 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.
UserPopover.UserPopover (cognitive 43) frontend/apps/web/src/components/com-group-button/UserPopover.tsx:99— UserPopover.UserPopover has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 15, error handling 3, ternaries 3, match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 8 of the 43 points are its own statements and the rest belongs to 14 function items inside it that branch (resolveUpdateLicenseKeyErrorMessage, fetchLicenseStatus, a function literal at line 666, …). 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.
index.LicenseActivation (cognitive 43) frontend/apps/web/src/pages/license-activation/index.tsx:20— index.LicenseActivation has cognitive complexity 43 (threshold 15). Drivers by points: boolean chains 19, if/else 16, ternaries 5, error handling 3. Of this number, 16 points are the body's own statements and 27 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.
HistoryPanel.HistoryPanel (cognitive 42) frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:51— HistoryPanel.HistoryPanel has cognitive complexity 42 (threshold 15). Drivers by points: ternaries 8 (16 pts), boolean chains 12, if/else 9 (10 pts), error handling 4 (nesting depth added 9). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 198, handleSaveAsSubmit, a function literal at line 213, …). 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.
asset.AssetUploadHandler (cognitive 41) backend/internal/handler/core/asset/assetUploadHandler.go:28— asset.AssetUploadHandler has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (38 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 24). None of this is in the body itself: all 41 points belong to one function literal inside it that branches (line 29). 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.
tag-overlay.TagOverlay (cognitive 41) frontend/apps/anchor/src/pages/instance-detail/tag-overlay.tsx:37— tag-overlay.TagOverlay has cognitive complexity 41 (threshold 15). Drivers by points: ternaries 14 (22 pts), boolean chains 9, if/else 4 (6 pts), loops 4 (nesting depth added 10). Of this number, 20 points are the body's own statements and 21 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.
index.updateBaseStore (cognitive 41) frontend/apps/web/src/stores/base/index.ts:170— index.updateBaseStore has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 20, ternaries 7 (14 pts), if/else 4 (5 pts), error handling 1 (2 pts) (nesting depth added 9). Of this number, 34 points are the body's own statements and 7 belong 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.
index.NotebookPage (cognitive 39) frontend/apps/web/src/pages/notebook/index.tsx:58— index.NotebookPage has cognitive complexity 39 (threshold 15). Drivers by points: boolean chains 20, if/else 13, ternaries 6. Most of this is not in the body itself: 8 of the 39 points are its own statements and the rest belongs to 15 function literals inside it that branch (lines 87, 131, 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.
core-adapter.mapUnsNode (cognitive 38) frontend/apps/web/src/apis/core-api/core-adapter.ts:818— core-adapter.mapUnsNode has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 26, ternaries 10 (12 pts) (nesting depth added 2). 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.
path-utils.validateNamespaceName (cognitive 38) frontend/apps/web/src/pages/uns/components/use-create-modal/path-utils.ts:59— path-utils.validateNamespaceName has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (26 pts), boolean chains 9, loops 2 (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.
TaskFormModal.TaskFormModal (cognitive 38) frontend/apps/web/src/pages/vision/TaskFormModal.tsx:67— TaskFormModal.TaskFormModal has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 23, ternaries 8, if/else 7. Most of this is not in the body itself: 14 of the 38 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 295, submit, a function literal at line 111, …). 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.
dataingest.NormalizePayload (cognitive 37) backend/internal/domain/dataingest/message.go:30— dataingest.NormalizePayload has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 4 (9 pts), boolean chains 2 (nesting depth added 19). 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.
App.App (cognitive 37) frontend/apps/web/src/App.tsx:95— App.App has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 10, error handling 3 (6 pts), ternaries 4 (nesting depth added 5). Most of this is not in the body itself: 3 of the 37 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 127, 109, 195, …). 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.
CameraPreviewModal.CameraPreviewModal (cognitive 37) frontend/apps/web/src/pages/vision/components/CameraPreviewModal.tsx:37— CameraPreviewModal.CameraPreviewModal has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 13, ternaries 6 (7 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 13 of the 37 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 74, toggleFullscreen, a function literal at line 50, …). 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.
VersionDrawer.VersionDrawer (cognitive 36) frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:37— VersionDrawer.VersionDrawer has cognitive complexity 36 (threshold 15). Drivers by points: ternaries 6 (11 pts), boolean chains 10, if/else 9 (10 pts), error handling 4 (5 pts) (nesting depth added 7). Most of this is not in the body itself: 2 of the 36 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 169, handleSaveAsSubmit, getSnapshotTypeLabel, …). 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.
index.RoutingManagement (cognitive 36) frontend/apps/web/src/pages/routing-management/index.tsx:86— index.RoutingManagement has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 15, if/else 12, ternaries 9. Most of this is not in the body itself: 11 of the 36 points are its own statements and the rest belongs to 15 function items inside it that branch (submit, a function literal at line 254, openEdit, …). 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.
flow.filterNodeRedRuntimeScope (cognitive 35) backend/internal/domain/flow/nodered_payload.go:672— flow.filterNodeRedRuntimeScope has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 3 (4 pts) (nesting depth added 20). 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.
IAMRepo.UpdateUser (cognitive 35) backend/internal/repo/iam.go:371— IAMRepo.UpdateUser has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to one function literal inside it that branches (line 385). 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.
JsonDom.JsonDom (cognitive 35) frontend/apps/web/src/pages/uns/components/import-modal/JsonDom.tsx:18— JsonDom.JsonDom has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 14, if/else 10 (11 pts), ternaries 7, error handling 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 9 of the 35 points are its own statements and the rest belongs to 7 function items inside it that branch (onSave, a function literal at line 102, a function literal at line 70, …). 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.
Service.QueryHistory (cognitive 34) backend/internal/domain/dataingest/history_query.go:48— Service.QueryHistory has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (32 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.
qr-modal.InstanceQrModal (cognitive 34) frontend/apps/anchor/src/pages/instance-detail/qr-modal.tsx:20— qr-modal.InstanceQrModal has cognitive complexity 34 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 10, if/else 9, error handling 1 (nesting depth added 4). Most of this is not in the body itself: 13 of the 34 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 79, 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.
use-scene-editor.useSceneEditor.applyConfig (cognitive 34) frontend/apps/anchor/src/viewer/use-scene-editor.ts:458— use-scene-editor.useSceneEditor.applyConfig has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 15, if/else 12 (13 pts), ternaries 3 (6 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, 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.
ManualAppModal.ManualAppModal (cognitive 34) frontend/apps/web/src/pages/project/components/ManualAppModal.tsx:42— ManualAppModal.ManualAppModal has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, ternaries 6, error handling 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 1 of the 34 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 289, onSave, a function literal at line 81, …). 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.
index.Apps (cognitive 34) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.tsx:54— index.Apps has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 12, if/else 10 (11 pts), ternaries 6 (10 pts), error handling 1 (nesting depth added 5). None of this is in the body itself: all 34 points belong to 11 function literals inside it that branch (lines 251, 66, 104, …). 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.
AnalysisTasksPanel.AnalysisTasksPanel (cognitive 34) frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:52— AnalysisTasksPanel.AnalysisTasksPanel has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 17, ternaries 10 (12 pts), if/else 5 (nesting depth added 2). Most of this is not in the body itself: 8 of the 34 points are its own statements and the rest belongs to 12 function items inside it that branch (operationItems, a function literal at line 230, a function literal at line 263, …). 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.
flow.appendSubflowClosure (cognitive 33) backend/internal/domain/flow/nodered_payload.go:245— flow.appendSubflowClosure has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 6 (9 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.
Service.NormalizeOpenapiCreateCommand (cognitive 33) REDACTED:236— Service.NormalizeOpenapiCreateCommand has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (30 pts), boolean chains 2, match/switch 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.
HTTPGateway.authorizeRoute (cognitive 33) backend/internal/gateway/http.go:283— HTTPGateway.authorizeRoute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 2, match/switch 1 (nesting depth added 16). 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.
index.PermissionManagement (cognitive 33) frontend/apps/web/src/pages/permission-management/index.tsx:138— index.PermissionManagement has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, ternaries 8 (9 pts), if/else 8 (nesting depth added 1). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 11 function items inside it that branch (onSave, openActionModal, a function literal at line 164, …). 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.
index.ServicesTab (cognitive 33) frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:44— index.ServicesTab has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 10, ternaries 9, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 33 points is its own statement and the rest belongs to 15 function literals inside it that branch (lines 68, 379, 113, …). 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.
system.applyOpenAPIParameterDocs (cognitive 32) backend/internal/handler/core/system/openapi_descriptions.go:187— system.applyOpenAPIParameterDocs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 3 (6 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.
index.ModelLibraryPage (cognitive 32) frontend/apps/anchor/src/pages/model-library/index.tsx:22— index.ModelLibraryPage has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 7 (15 pts), boolean chains 6, if/else 6, error handling 5 (nesting depth added 8). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to 8 function items inside it that branch (handleUpload, a function literal at line 37, handleRename, …). 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.
IAMRepo.ResourceKeysByURIs (cognitive 31) backend/internal/repo/iam.go:888— IAMRepo.ResourceKeysByURIs has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (9 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). 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.
index.ComFormula (cognitive 31) frontend/apps/web/src/components/com-formula/index.tsx:32— index.ComFormula has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 5, ternaries 3 (nesting depth added 8). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 65, a function literal at line 122, setFormulaValue, …). 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.
menu-icon-map.resolveMenuLucideIcon (cognitive 31) frontend/apps/web/src/components/lucide-icon/menu-icon-map.ts:63— menu-icon-map.resolveMenuLucideIcon has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 10, loops 1 (nesting depth added 1). Of this number, 30 points are the body's own statements and 1 belongs 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.
AccountSettingsPanel.AccountSettingsPanel (cognitive 31) frontend/apps/web/src/pages/settings/AccountSettingsPanel.tsx:39— AccountSettingsPanel.AccountSettingsPanel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 11, ternaries 5 (7 pts) (nesting depth added 4). Most of this is not in the body itself: 15 of the 31 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 141, a function literal at line 149, a function literal at line 285, …). 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.
check-carbon-exports.walk (cognitive 30) frontend/apps/web/scripts/check-carbon-exports.mjs:27— check-carbon-exports.walk has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (6 pts), ternaries 1 (4 pts), boolean chains 1 (nesting depth added 19). 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.
index.LoginPage (cognitive 30) frontend/apps/web/src/pages/login/index.tsx:49— index.LoginPage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, error handling 4 (5 pts), ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 112, onFinish, a function literal at line 58, …). 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.
index.PluginsTab (cognitive 30) frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:23— index.PluginsTab has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 12, if/else 12, ternaries 4, error handling 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 30 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 50, 204, 193, …). 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.
AlgorithmsPanel.AlgorithmsPanel (cognitive 30) frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:45— AlgorithmsPanel.AlgorithmsPanel has cognitive complexity 30 (threshold 15). Drivers by points: ternaries 9 (17 pts), boolean chains 12, if/else 1 (nesting depth added 8). Of this number, 22 points are the body's own statements and 8 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.
flow.pruneMissingSubflowReferences (cognitive 29) backend/internal/domain/flow/nodered_payload.go:480— flow.pruneMissingSubflowReferences has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3, 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.
uns.openapiUnsHistory (cognitive 29) backend/internal/logic/openapi/v1/uns/openapi_contract.go:199— uns.openapiUnsHistory has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 3, match/switch 1 (2 pts), 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.
repo.restoreUnsRecycleNode (cognitive 29) backend/internal/repo/uns_node.go:659— repo.restoreUnsRecycleNode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 3 (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.
UnsRepo.includeUnsSearchAncestors (cognitive 29) backend/internal/repo/uns_node.go:418— UnsRepo.includeUnsSearchAncestors has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 5 (7 pts) (nesting depth added 12). Of this number, 26 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.
index.CliAuthPage (cognitive 29) frontend/apps/web/src/pages/cli-auth/index.tsx:41— index.CliAuthPage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, error handling 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 58, renderContent, handleGenerateKey, …). 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.
request.service.interceptors.response.use() (cognitive 29) frontend/apps/web/src/utils/request.ts:157— request.service.interceptors.response.use() has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 5, ternaries 1 (4 pts) (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.
NotebookTable.NotebookTable (cognitive 28) frontend/apps/web/src/pages/notebook/components/NotebookTable.tsx:39— NotebookTable.NotebookTable has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 15 (21 pts), boolean chains 3, if/else 3, error handling 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 190, handleDownload, getOwnerDisplayName, …). 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.
utils.appendTreeData::findAndAppend (cognitive 28) frontend/apps/web/src/pages/uns/store/utils.ts:124— utils.appendTreeData::findAndAppend has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (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.
CloudSyncConnectModal.CloudSyncConnectModal (cognitive 28) frontend/apps/web/src/pages/uns/components/uns-dashboard/CloudSyncConnectModal.tsx:23— CloudSyncConnectModal.CloudSyncConnectModal has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 9, ternaries 9, if/else 8, error handling 1 (2 pts) (nesting depth added 1). Most of this is not in the body itself: 11 of the 28 points are its own statements and the rest belongs to 5 function items inside it that branch (handleSave, a function literal at line 35, handleTest, …). 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.
TaskDetailModal.TaskDetailModal (cognitive 28) frontend/apps/web/src/pages/vision/TaskDetailModal.tsx:20— TaskDetailModal.TaskDetailModal has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 16, ternaries 9 (11 pts), if/else 1 (nesting depth added 2). Of this number, 22 points are the body's own statements and 6 belong to 6 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.
uns.filterExportNodes (cognitive 27) REDACTED:1091— uns.filterExportNodes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 5 (7 pts), boolean chains 3 (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.
use-model-viewer.useModelViewer (cognitive 27) frontend/apps/anchor/src/viewer/use-model-viewer.ts:56— use-model-viewer.useModelViewer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 6, ternaries 5 (nesting depth added 1). None of this is in the body itself: all 27 points belong to 12 function literals inside it that branch (lines 155, 132, 80, …). 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.
core-adapter.toLegacyResource (cognitive 27) frontend/apps/web/src/apis/core-api/core-adapter.ts:656— core-adapter.toLegacyResource has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 8 (14 pts), boolean chains 13 (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.
dataingest.splitSQLList (cognitive 26) REDACTED:893— dataingest.splitSQLList has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 14). 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.
flow.orderNodesForSubflowLoad (cognitive 26) backend/internal/domain/flow/nodered_payload.go:526— flow.orderNodesForSubflowLoad has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 7 (9 pts), boolean chains 1 (nesting depth added 7). Of this number, 16 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.
Service.mergeGlobalConfigs (cognitive 26) backend/internal/domain/flow/nodered_payload.go:872— Service.mergeGlobalConfigs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (nesting depth added 14). 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.
IAMRepo.SaveResource (cognitive 26) backend/internal/repo/iam.go:1329— IAMRepo.SaveResource has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 2 (nesting depth added 7). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 1348). 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.
Store.Seed (cognitive 26) backend/internal/repo/seed.go:15— Store.Seed has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 4 (nesting depth added 5). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 27). 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.
UnsRepo.includeUnsRecycleAncestors (cognitive 26) backend/internal/repo/uns_node.go:322— UnsRepo.includeUnsRecycleAncestors has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 5 (7 pts) (nesting depth added 11). Of this number, 23 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.
index.withIntlTable.IntlTableWrapper (cognitive 26) frontend/apps/web/src/components/pro-table/index.tsx:314— index.withIntlTable.IntlTableWrapper has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 4 (9 pts), boolean chains 6 (nesting depth added 8). None of this is in the body itself: all 26 points belong to 6 function literals inside it that branch (lines 365, 353, 327, …). 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.
ProTreeSelect.ProTreeSelect::loadData (cognitive 26) frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx:188— ProTreeSelect.ProTreeSelect::loadData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts) (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.
index.FleetRuntimePage (cognitive 26) frontend/apps/web/src/pages/fleet-runtime/index.tsx:64— index.FleetRuntimePage has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (10 pts), boolean chains 7, if/else 6, error handling 2, match/switch 1 (nesting depth added 1). 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 literals inside it that branch (lines 259, 75, 110, …). 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.
index.edgeNodeConnectionObjectFromRecord (cognitive 26) frontend/apps/web/src/pages/mqtt-auth/index.tsx:192— index.edgeNodeConnectionObjectFromRecord has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11 (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.
ResultsPanel.ResultsPanel (cognitive 26) frontend/apps/web/src/pages/vision/ResultsPanel.tsx:36— ResultsPanel.ResultsPanel has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 9 (11 pts), boolean chains 9, if/else 5 (6 pts) (nesting depth added 3). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 206, renderCard, a function literal at line 53, …). 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.
Service.Create (cognitive 25) backend/internal/domain/flow/service.go:86— Service.Create has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 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.
Service.PlatformMembers (cognitive 25) backend/internal/domain/iam/platform_members.go:68— Service.PlatformMembers has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 3 (nesting depth added 9). Of this number, 22 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.
uns.aggregateOpenapiHistoryBucket (cognitive 25) backend/internal/logic/openapi/v1/uns/openapi_contract.go:669— uns.aggregateOpenapiHistoryBucket has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (9 pts), match/switch 2 (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.
runtime-regression.runAtomicityFaultInjection (cognitive 25) deploy/regression/runtime-regression.mjs:552— runtime-regression.runAtomicityFaultInjection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8, error handling 2 (3 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, 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.
index.ComBreadcrumb (cognitive 25) frontend/apps/web/src/components/com-breadcrumb/index.tsx:19— index.ComBreadcrumb has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6, loops 2 (3 pts), ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 67, 41, 34, …). 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.
useTips.useTips (cognitive 25) frontend/apps/web/src/hooks/useTips.ts:18— useTips.useTips has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 2, ternaries 2 (nesting depth added 10). None of this is in the body itself: all 25 points belong to 6 function literals inside it that branch (lines 27, 54, 112, …). 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.
index.ComTags (cognitive 25) frontend/apps/web/src/layout/components/com-tags/index.tsx:89— index.ComTags has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 2 of the 25 points are its own statements and the rest belongs to 12 function items inside it that branch (handleContextMenu, a function literal at line 191, a function literal at line 226, …). 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.
index.LaunchpadPage (cognitive 25) frontend/apps/web/src/pages/launchpad/index.tsx:17— index.LaunchpadPage has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 5 (7 pts), ternaries 2 (3 pts), error handling 2 (nesting depth added 3). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 8 function items inside it that branch (handleAppClick, a function literal at line 114, a function literal at line 34, …). 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.
Details.Details (cognitive 25) frontend/apps/web/src/pages/uns/components/topic-detail/Details.tsx:14— Details.Details has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 17, if/else 4, ternaries 3 (4 pts) (nesting depth added 1). Of this number, 15 points are the body's own statements and 10 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.
index.TableSelect (cognitive 25) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/table-select/index.tsx:25— index.TableSelect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 7). None of this is in the body itself: all 25 points belong to 7 function items inside it that branch (handleTableList, a function literal at line 115, a function literal at line 126, …). 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.
Config.Normalize (cognitive 24) backend/internal/config/config.go:101— Config.Normalize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24. 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.
Service.listMissingRuntimeNodes (cognitive 24) backend/internal/domain/flow/nodered_missing.go:285— Service.listMissingRuntimeNodes has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 4 (6 pts) (nesting depth added 10). Of this number, 22 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.
uns.parseOpenapiHistoryAggregation (cognitive 24) backend/internal/logic/openapi/v1/uns/openapi_contract.go:578— uns.parseOpenapiHistoryAggregation has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2, 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.
UnsRepo.UpdateUnsNode (cognitive 24) backend/internal/repo/uns_node.go:150— UnsRepo.UpdateUnsNode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 1 (nesting depth added 4). 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 159). 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.
runtime-regression.runFoundationJourney (cognitive 24) deploy/regression/runtime-regression.mjs:646— runtime-regression.runFoundationJourney has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 9, error handling 1, loops 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, 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.
core-adapter.mapFlow (cognitive 24) frontend/apps/web/src/apis/core-api/core-adapter.ts:903— core-adapter.mapFlow has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, ternaries 8. 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.
CloudSyncConnectModal.CloudSyncConnectModal (cognitive 24) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:54— CloudSyncConnectModal.CloudSyncConnectModal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 26, ternaries 12 (15 pts), if/else 11 (14 pts), error handling 3 (4 pts) (nesting depth added 7). 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 (CloudSyncConnectModal.CloudSyncConnectModal::handleSave) 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.
useGuideSteps.useGuideSteps (cognitive 24) frontend/apps/web/src/hooks/useGuideSteps.ts:16— useGuideSteps.useGuideSteps has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 24 points belong to 4 function literals inside it that branch (lines 23, 22, 27, …). 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.
ImportAppModal.ImportAppModal (cognitive 24) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:67— ImportAppModal.ImportAppModal has cognitive complexity 24 (threshold 15). Drivers by points: if/else 66 (74 pts), boolean chains 46, error handling 17 (21 pts), ternaries 14 (15 pts) (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: 2 other methods here (ImportAppModal.ImportAppModal::doUpload, ImportAppModal.ImportAppModal::onSave) 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.
uns-tree.UnsTree (cognitive 24) frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx:41— uns-tree.UnsTree has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 7, error handling 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 253, handleRenderLoadMoreNode, a function literal at line 95, …). 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.
Dashboard.DetailDashboard (cognitive 24) frontend/apps/web/src/pages/uns/components/topic-detail/Dashboard.tsx:56— Dashboard.DetailDashboard has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 10 (13 pts), boolean chains 6, if/else 4, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 92, 158, 221, …). 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.
index.ReverseModal (cognitive 24) frontend/apps/web/src/pages/uns/components/reverse-modal/index.tsx:21— index.ReverseModal has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 10, ternaries 5 (7 pts), if/else 4, match/switch 2 (3 pts) (nesting depth added 3). 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 (a function literal at line 156, getDataTypeOptions, a function literal at line 91, …). 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.
dataingest.lastIdentifier (cognitive 23) REDACTED:959— dataingest.lastIdentifier has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 9). Of this number, 19 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.
flow.nodeRedLinkContextNodes (cognitive 23) backend/internal/domain/flow/nodered_payload.go:125— flow.nodeRedLinkContextNodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 3, 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.
flow.prepareNodeRedRuntimeNodes (cognitive 23) backend/internal/domain/flow/nodered_payload.go:732— flow.prepareNodeRedRuntimeNodes has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 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.
Service.resolveMissingNodeTarget (cognitive 23) backend/internal/domain/flow/nodered_missing.go:462— Service.resolveMissingNodeTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 4 (6 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.
createTreeState.prepareFileParent (cognitive 23) backend/internal/domain/uns/batch_create.go:161— createTreeState.prepareFileParent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (22 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.
Service.createByNamespacePath (cognitive 23) REDACTED:495— Service.createByNamespacePath has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (3 pts), 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.
handlerx.UploadMultipartAssets (cognitive 23) backend/internal/handler/handlerx/asset_upload.go:25— handlerx.UploadMultipartAssets has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 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.
IAMRepo.listResources (cognitive 23) backend/internal/repo/iam.go:1251— IAMRepo.listResources has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 6 (8 pts), boolean chains 2 (nesting depth added 6). Of this number, 21 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.
legacy-icon-map.resolveLegacyLucideIcon (cognitive 23) frontend/apps/web/src/components/lucide-icon/legacy-icon-map.ts:108— legacy-icon-map.resolveLegacyLucideIcon has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 7, loops 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.
useFleetContainerLogs.logsReducer (cognitive 23) frontend/apps/web/src/pages/fleet-shared/useFleetContainerLogs.ts:72— useFleetContainerLogs.logsReducer has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 5 (10 pts), boolean chains 6, if/else 3 (6 pts), match/switch 1 (nesting depth added 8). Of this number, 16 points are the body's own statements and 7 belong to 3 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.
index.Content (cognitive 23) frontend/apps/web/src/pages/uns/components/export-modal/index.tsx:70— index.Content has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 8 (13 pts), if/else 7, boolean chains 3 (nesting depth added 5). Of this number, 14 points are the body's own statements and 9 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.
WritDownDataButton.WritDownData (cognitive 23) frontend/apps/web/src/pages/uns/components/WritDownDataButton.tsx:20— WritDownDataButton.WritDownData has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 5, if/else 4, match/switch 2 (nesting depth added 6). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 82, a function literal at line 56, getFormItemRestProps, …). 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.
uns.validateCreatePathParts (cognitive 22) REDACTED:1856— uns.validateCreatePathParts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 pts), boolean chains 3 (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.
Service.ensureTopicTypeParentForFile (cognitive 22) REDACTED:413— Service.ensureTopicTypeParentForFile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (22 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.
Service.commandToNode (cognitive 22) REDACTED:1917— Service.commandToNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 4 (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, 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.
uns.expandOpenapiTopics (cognitive 22) backend/internal/logic/openapi/v1/uns/openapi_contract.go:787— uns.expandOpenapiTopics has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 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.
repo.listUnsRecycleSubtreeByParent (cognitive 22) backend/internal/repo/uns_helpers.go:55— repo.listUnsRecycleSubtreeByParent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (3 pts), boolean chains 2 (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.
repo.ensureUnsFileTopicParent (cognitive 22) backend/internal/repo/uns_helpers.go:271— repo.ensureUnsFileTopicParent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3 (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.
repo.ensureRestoreFileTopicParent (cognitive 22) backend/internal/repo/uns_helpers.go:338— repo.ensureRestoreFileTopicParent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (21 pts), 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.
index.ProModal (cognitive 22) frontend/apps/web/src/components/pro-modal/index.tsx:33— index.ProModal has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 8 (12 pts), boolean chains 5, if/else 5 (nesting depth added 4). Of this number, 14 points are the body's own statements and 8 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.
index.IframeWrapper (cognitive 22) frontend/apps/web/src/components/iframe-wrapper/index.tsx:3— index.IframeWrapper has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (nesting depth added 12). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 12, 21, 27, …). 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.
index.ClusterPage (cognitive 22) frontend/apps/web/src/pages/cluster/index.tsx:26— index.ClusterPage has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 14, ternaries 4, if/else 3, error handling 1. Most of this is not in the body itself: 3 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 41, handshake, createToken, …). 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.
index.RoutesTab (cognitive 22) frontend/apps/web/src/pages/routing-management/components/routes-tab/index.tsx:19— index.RoutesTab has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (9 pts), ternaries 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 22 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 38, 125, 30, …). 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.
dataingest.resolveHistoryAggregationFields (cognitive 21) backend/internal/domain/dataingest/history_query.go:291— dataingest.resolveHistoryAggregationFields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (4 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.
Service.WriteOpenAPIValue (cognitive 21) backend/internal/domain/dataingest/service.go:286— Service.WriteOpenAPIValue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (3 pts), boolean chains 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.
repo.roleResourceIDsByURIs (cognitive 21) backend/internal/repo/iam.go:819— repo.roleResourceIDsByURIs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 6). 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, 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.
repo.recycleRestorePlan (cognitive 21) backend/internal/repo/uns_helpers.go:161— repo.recycleRestorePlan has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (5 pts) (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.
runtime-regression.runDefaultAdminUserJourney (cognitive 21) deploy/regression/runtime-regression.mjs:414— runtime-regression.runDefaultAdminUserJourney has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, error handling 2 (3 pts) (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.
mapping-table.MappingTable (cognitive 21) frontend/apps/anchor/src/pages/instance-detail/mapping-table.tsx:153— mapping-table.MappingTable has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (15 pts), boolean chains 5, if/else 1 (nesting depth added 5). None of this is in the body itself: all 21 points belong to 7 function items inside it that branch (a function literal at line 258, a function literal at line 194, bindingCell, …). 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.
CookieContext.CookieContext (cognitive 21) frontend/apps/web/src/CookieContext.tsx:21— CookieContext.CookieContext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 1 (3 pts) (nesting depth added 8). None of this is in the body itself: all 21 points belong to 2 function literals inside it that branch (lines 26, 59). 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.
CloudSyncConnectModal.CloudSyncConnectModal::handleSave (cognitive 21) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:118— CloudSyncConnectModal.CloudSyncConnectModal::handleSave has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), error handling 2 (3 pts), ternaries 2 (nesting depth added 2). 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 (CloudSyncConnectModal.CloudSyncConnectModal) 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.
index.Index (cognitive 21) frontend/apps/web/src/components/com-tag-filter/index.tsx:18— index.Index has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 8 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 69, a function literal at line 45, handleScroll, …). 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.
FleetContainerLogsDrawer.FleetContainerLogsDrawer (cognitive 21) frontend/apps/web/src/pages/fleet-shared/FleetContainerLogsDrawer.tsx:117— FleetContainerLogsDrawer.FleetContainerLogsDrawer has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), ternaries 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 8 function items inside it that branch (handleDownloadLogs, a function literal at line 234, handleTabDragEnd, …). 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.
MenuContent.MenuContent (cognitive 21) frontend/apps/web/src/pages/menu-configuration/components/menu-content/MenuContent.tsx:32— MenuContent.MenuContent has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 8 (9 pts), boolean chains 8, if/else 4 (nesting depth added 1). Most of this is not in the body itself: 10 of the 21 points are its own statements and the rest belongs to 3 function items inside it that branch (onSave, a function literal at line 63, onCancel). 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.
utils.listToTree (cognitive 21) frontend/apps/web/src/pages/menu-configuration/store/utils.ts:3— utils.listToTree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7 (nesting depth added 6). None of this is in the body itself: all 21 points belong to 3 function literals inside it that branch (lines 27, 24, 6). 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.
NotebookSidebar.NotebookSidebar (cognitive 21) frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx:258— NotebookSidebar.NotebookSidebar has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 8, boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 450, a function literal at line 428, a function literal at line 312, …). 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.
CameraInputsPanel.CameraInputsPanel (cognitive 21) frontend/apps/web/src/pages/vision/CameraInputsPanel.tsx:32— CameraInputsPanel.CameraInputsPanel has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, ternaries 6, if/else 2. Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 162, reconnect, a function literal at line 126, …). 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.
ResultDetailModal.ResultDetailModal (cognitive 21) frontend/apps/web/src/pages/vision/ResultDetailModal.tsx:38— ResultDetailModal.ResultDetailModal has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 4, ternaries 3. Of this number, 18 points are the body's own statements and 3 belong to 3 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.
utils.guideConfig (cognitive 21) REDACTED:186— utils.guideConfig has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, ternaries 2 (3 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.
request.service.interceptors.response.use() (cognitive 21) frontend/apps/web/src/utils/request.ts:104— request.service.interceptors.response.use() has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, ternaries 1 (3 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.
multipart-upload.uploadWithMultipart (cognitive 21) frontend/apps/web/src/utils/multipart-upload.ts:321— multipart-upload.uploadWithMultipart has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 7, error handling 2 (4 pts), loops 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.
flow.parseInstalledNodeTypes (cognitive 20) backend/internal/domain/flow/nodered_missing.go:185— flow.parseInstalledNodeTypes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (6 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.
Service.deployRuntime (cognitive 20) backend/internal/domain/flow/service.go:927— Service.deployRuntime has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (20 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.
uns.UnsNewMsgHandler (cognitive 20) backend/internal/handler/core/uns/unsImportExportHandlers.go:149— uns.UnsNewMsgHandler has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). None of this is in the body itself: all 20 points belong to one function literal inside it that branches (line 150). 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.
uns.openapiUnsWrite (cognitive 20) backend/internal/logic/openapi/v1/uns/openapi_contract.go:89— uns.openapiUnsWrite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, match/switch 1 (2 pts), 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.
IAMRepo.SaveResourceAction (cognitive 20) backend/internal/repo/iam.go:1501— IAMRepo.SaveResourceAction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, 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.
softDeleteDeleteClause.ModifyStatement (cognitive 20) backend/internal/repo/soft_delete.go:101— softDeleteDeleteClause.ModifyStatement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 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.
runtime-regression.cleanupFoundationJourney (cognitive 20) deploy/regression/runtime-regression.mjs:478— runtime-regression.cleanupFoundationJourney has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, error handling 4 (8 pts), if/else 4 (nesting depth added 4). Of this number, 16 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.
index.CustomMenuHeader (cognitive 20) frontend/apps/web/src/layout/custom-menu-header/index.tsx:15— index.CustomMenuHeader has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, ternaries 7, if/else 3. Of this number, 11 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.
index.AccountManagement (cognitive 20) frontend/apps/web/src/pages/account-management/index.tsx:141— index.AccountManagement has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 9, boolean chains 8, if/else 3. Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (renderOperationIcon, a function literal at line 317, renderStatusToggleIcon, …). 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.
TopDom.TopDom (cognitive 20) frontend/apps/web/src/pages/uns/TopDom.tsx:19— TopDom.TopDom has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 8 (13 pts), boolean chains 4, if/else 3 (nesting depth added 5). Of this number, 12 points are the body's own statements and 8 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.
SinkWriter.ensurePhysicalForRecords (cognitive 19) REDACTED:209— SinkWriter.ensurePhysicalForRecords has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). 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, 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.
flow.valueReferencesID (cognitive 19) backend/internal/domain/flow/nodered_payload.go:1230— flow.valueReferencesID has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 11). 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.
Service.importLabels (cognitive 19) REDACTED:1167— Service.importLabels has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 pts) (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.
index.ComUploadPicture (cognitive 19) frontend/apps/web/src/components/com-upload-picture/index.tsx:19— index.ComUploadPicture has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 2 (nesting depth added 4). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 4 function items inside it that branch (beforeUpload, a function literal at line 92, openFileDialog, …). 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.
MemberModal.MemberModal::onSave (cognitive 19) frontend/apps/web/src/pages/project/components/tabs-content/members/MemberModal.tsx:164— MemberModal.MemberModal::onSave has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts), error handling 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.
Binding.Binding (cognitive 19) frontend/apps/web/src/pages/uns/components/topic-detail/binding/Binding.tsx:23— Binding.Binding has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 4). 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 items inside it that branch (onScroll, a function literal at line 124, a function literal at line 39, …). 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.
RecycleTree.RecycleTree (cognitive 19) frontend/apps/web/src/pages/uns/components/uns-tree/RecycleTree.tsx:61— RecycleTree.RecycleTree has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 5. Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 136, 191, 89, …). 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.
uns.openapiUnsRead (cognitive 18) backend/internal/logic/openapi/v1/uns/openapi_contract.go:32— uns.openapiUnsRead has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2, 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.
Store.migrateUserContacts (cognitive 18) backend/internal/repo/user_contact_migration.go:10— Store.migrateUserContacts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 14). 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.
UnsRepo.CreateUnsNode (cognitive 18) backend/internal/repo/uns_node.go:96— UnsRepo.CreateUnsNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (18 pts) (nesting depth added 4). Most of this is not in the body itself: 3 of the 18 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.
runtime-regression.runFlowCopyJourney (cognitive 18) deploy/regression/runtime-regression.mjs:756— runtime-regression.runFlowCopyJourney has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, error handling 2 (3 pts), 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.
core-adapter.toLegacyResources (cognitive 18) frontend/apps/web/src/apis/core-api/core-adapter.ts:706— core-adapter.toLegacyResources has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (8 pts), loops 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 6 function items inside it that branch (buttonParentId, a function literal at line 707, a function literal at line 746, …). 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.
flow.createFlow (cognitive 18) frontend/apps/web/src/apis/core-api/flow.ts:220— flow.createFlow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, ternaries 2 (nesting depth added 4). Of this number, 17 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.
uns.ds2fs (cognitive 18) frontend/apps/web/src/apis/core-api/uns.ts:363— uns.ds2fs has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 6 (12 pts), boolean chains 6 (nesting depth added 6). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 365). 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.
index.ProDraggerUpload (cognitive 18) frontend/apps/web/src/components/com-dragger-upload/index.tsx:23— index.ProDraggerUpload has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 3 function items inside it that branch (beforeUpload, a function literal at line 91, openFileDialog). 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.
column-fit.fitColumnsToContainer (cognitive 18) frontend/apps/web/src/components/pro-table/column-fit.ts:66— column-fit.fitColumnsToContainer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 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.
MenuIconField.MenuIconField (cognitive 18) frontend/apps/web/src/pages/menu-configuration/components/menu-content/MenuIconField.tsx:29— MenuIconField.MenuIconField has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 2 (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 34, 44, 74, …). 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.
index.Module (cognitive 18) frontend/apps/web/src/pages/menu-configuration/index.tsx:19— index.Module has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 5 (7 pts), if/else 6, boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (onAddExternalMenu, a function literal at line 123, a function literal at line 75, …). 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.
Service.BuildAuditLog (cognitive 17) backend/internal/domain/audit/service.go:246— Service.BuildAuditLog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16 (17 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.
flow.removeWireReferences (cognitive 17) backend/internal/domain/flow/nodered_payload.go:1161— flow.removeWireReferences has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (6 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.
Service.addRuntimeGlobalNodes (cognitive 17) backend/internal/domain/flow/nodered_payload.go:369— Service.addRuntimeGlobalNodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 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.
HTTPGateway.serveNodeRedFlowPayload (cognitive 17) backend/internal/gateway/http.go:97— HTTPGateway.serveNodeRedFlowPayload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 2 (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.
IAMRepo.CreateUser (cognitive 17) backend/internal/repo/iam.go:249— IAMRepo.CreateUser has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1. Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 268). 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.
runtime-regression.inspectMockFlow (cognitive 17) deploy/regression/runtime-regression.mjs:84— runtime-regression.inspectMockFlow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 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.
ResizableTitle.ResizableTitle (cognitive 17) frontend/apps/web/src/components/pro-table/ResizableTitle.tsx:22— ResizableTitle.ResizableTitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 2. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (handleMouseMove, a function literal at line 100, a function literal at line 119, …). 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.
EditAppModal.EditAppModal (cognitive 17) frontend/apps/web/src/pages/project/components/EditAppModal.tsx:24— EditAppModal.EditAppModal has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 4, error handling 1, ternaries 1. Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (onSave, onMediaSelect, onOpen). 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.
index.Module::getItems (cognitive 17) frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:227— index.Module::getItems has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 11 (13 pts), boolean chains 4 (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.
JsonTree.JsonForm (cognitive 17) frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/JsonTree.tsx:56— JsonTree.JsonForm has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 6, loops 1, ternaries 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function items inside it that branch (replaceNodeInTree::traverse, updateChildrenNewDataPaths, a function literal at line 75, …). 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.
FunctionList.FunctionList (cognitive 17) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/timeSeries/FunctionList.tsx:9— FunctionList.FunctionList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 6, ternaries 1. Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 7 function items inside it that branch (fillFunctions, onChange, resetFormula, …). 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.
dataingest.normalizeLatestPayload (cognitive 16) backend/internal/domain/dataingest/latest_cache.go:149— dataingest.normalizeLatestPayload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 1 (3 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.
Service.flushLoop (cognitive 16) backend/internal/domain/dataingest/service.go:598— Service.flushLoop has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 2 (6 pts), if/else 3 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). Of this number, 13 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.
uns.isAliasFormatOK (cognitive 16) REDACTED:2234— uns.isAliasFormatOK has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, 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.
splat-viewer.useSplatViewer (cognitive 16) frontend/apps/anchor/src/viewer/splat-viewer.tsx:83— splat-viewer.useSplatViewer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 3, error handling 2, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 3 function literals inside it that branch (lines 103, 94, 178). 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.
tag-overlay-layout.formatDataTagPreviewValue (cognitive 16) frontend/apps/anchor/src/pages/instance-detail/tag-overlay-layout.ts:121— tag-overlay-layout.formatDataTagPreviewValue has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 3 (7 pts), if/else 5 (6 pts), boolean chains 2, 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.
use-scene-editor.useSceneEditor (cognitive 16) frontend/apps/anchor/src/viewer/use-scene-editor.ts:103— use-scene-editor.useSceneEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, loops 1 (nesting depth added 2). None of this is in the body itself: all 16 points belong to 7 function literals inside it that branch (lines 190, 134, 234, …). 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.
index.SceneQrViewer (cognitive 16) frontend/apps/anchor/src/pages/qr-viewer/index.tsx:213— index.SceneQrViewer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 5, ternaries 3, loops 1 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 254, 280, 314, …). 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.
uns.listUns (cognitive 16) frontend/apps/web/src/apis/core-api/uns.ts:122— uns.listUns has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2 (3 pts) (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.
uns.copyNodePayload (cognitive 16) frontend/apps/web/src/apis/core-api/uns.ts:433— uns.copyNodePayload has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 1, ternaries 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.
index.CodeEditor (cognitive 16) frontend/apps/web/src/components/com-formula/code-editor/index.tsx:46— index.CodeEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 3 (nesting depth added 1). 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 74, 115, 125, …). 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.
SideMenuList.SideMenuList (cognitive 16) frontend/apps/web/src/layout/custom-nav/components/SideMenuList.tsx:14— SideMenuList.SideMenuList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, ternaries 1 (nesting depth added 4). 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 items inside it that branch (handleClickOutside, a function literal at line 34, menuLabel, …). 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.
ProjectGrid.ProjectGrid (cognitive 16) frontend/apps/web/src/pages/launchpad/components/ProjectGrid.tsx:19— ProjectGrid.ProjectGrid has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, ternaries 6 (8 pts) (nesting depth added 2). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 67, 30). 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.
AppMediaFields.AppMediaFields::renderPreview (cognitive 16) frontend/apps/web/src/pages/project/components/AppMediaFields.tsx:43— AppMediaFields.AppMediaFields::renderPreview has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9 (14 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.
index.CertificatesTab (cognitive 16) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12— index.CertificatesTab 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 11 function literals inside it that branch (lines 19, 112, 116, …). 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.
utils.processedCheckedKeys (cognitive 16) frontend/apps/web/src/pages/uns/store/utils.ts:282— utils.processedCheckedKeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). Of this number, 15 points are the body's own statements and 1 belongs 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.
Functions.Functions (cognitive 16) frontend/apps/web/src/pages/uns/components/uns-dashboard/Functions.tsx:111— Functions.Functions has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 4, ternaries 2. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 171, a function literal at line 126, 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×1
REDACTED
D4 · Code Duplication· Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (7 members, 50+ identical tokens) backend/internal/handler/core/asset/assetUnbindHandler.go:16— backend/internal/handler/core/asset/assetUnbindHandler.go:16-32 | backend/internal/handler/core/iam/roleCrudHandlers.go:60-77 | backend/internal/handler/core/iam/userDeleteHandler.go:16-32 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:14-28 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:62-76 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelDeleteHandler.go:17-33 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelDetailHandler.go:17-33 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (5 members, 50+ identical tokens) backend/internal/handler/core/apikey/apiKeyListHandler.go:16— backend/internal/handler/core/apikey/apiKeyListHandler.go:16-32 | backend/internal/handler/core/iam/roleListHandler.go:15-31 | backend/internal/handler/core/iam/userListHandler.go:15-31 | backend/internal/handler/core/uns/unsLabelListHandler.go:16-32 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelListHandler.go:17-33 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) backend/internal/repo/uns_node.go:322— backend/internal/repo/uns_node.go:322-379 | backend/internal/repo/uns_node.go:418-479 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (63 corresponding lines) · ×1
Edited copy of a member (63 corresponding lines) backend/internal/repo/uns_helpers.go:271— backend/internal/repo/uns_helpers.go:271-336 | backend/internal/repo/uns_helpers.go:338-400 — These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) backend/internal/logic/core/iam/userCreateLogic.go:34— backend/internal/logic/core/iam/userCreateLogic.go:34-67 | backend/internal/logic/core/iam/userUpdateLogic.go:35-75 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) backend/internal/domain/flow/service.go:279— backend/internal/domain/flow/service.go:279-312 | backend/internal/domain/flow/service.go:340-367 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) backend/internal/domain/uns/batch_create.go:161— backend/internal/domain/uns/batch_create.go:161-208 | REDACTED:413-460 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) REDACTED:462— REDACTED:462-493 | REDACTED:583-608 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) backend/internal/domain/flow/nodered_payload.go:919— backend/internal/domain/flow/nodered_payload.go:919-938 | backend/internal/domain/flow/nodered_payload.go:940-964 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×1
Edited copies of one member (3 members, 15+ corresponding lines) backend/internal/repo/flow.go:158— backend/internal/repo/flow.go:158-181 | backend/internal/repo/flow.go:394-415 | backend/internal/repo/flow.go:452-466 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 17+ corresponding lines) · ×1
Edited copies of one member (6 members, 17+ corresponding lines) backend/internal/handler/core/auth/currentUserConfigPatchHandler.go:17— backend/internal/handler/core/auth/currentUserConfigPatchHandler.go:17-33 | backend/internal/handler/core/auth/currentUserConfigPutHandler.go:17-33 | backend/internal/handler/core/auth/currentUserConfigUpdateHandler.go:14-30 | backend/internal/handler/core/auth/currentUserPasswordUpdateHandler.go:16-32 | backend/internal/handler/core/auth/currentUserProfileUpdateHandler.go:17-33 | backend/internal/handler/core/auth/loginHandler.go:15-31 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 17+ corresponding lines) · ×1
Edited copies of one member (7 members, 17+ corresponding lines) backend/internal/handler/openapi/v1/uns/openapiUnsCreateHandler.go:15— backend/internal/handler/openapi/v1/uns/openapiUnsCreateHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsDeleteHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsHistoryHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsReadHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsSearchHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsUpdateHandler.go:15-31 | backend/internal/handler/openapi/v1/uns/openapiUnsWriteHandler.go:19-35 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) backend/internal/domain/flow/nodered_payload.go:1205— backend/internal/domain/flow/nodered_payload.go:1205-1228 | backend/internal/domain/flow/nodered_payload.go:1230-1257 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) backend/internal/domain/dataingest/definition.go:211— backend/internal/domain/dataingest/definition.go:211-228 | backend/internal/domain/iam/service.go:334-353 | backend/internal/logic/openapi/v1/auth/openapiWhoamiLogic.go:56-71 | backend/internal/repo/iam.go:1136-1152 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×1
Edited copy of a member (19 corresponding lines) backend/internal/domain/uns/batch_create.go:346— backend/internal/domain/uns/batch_create.go:346-364 | REDACTED:560-581 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) backend/internal/logic/core/asset/assetBindLogic.go:33— backend/internal/logic/core/asset/assetBindLogic.go:33-42 | backend/internal/logic/core/asset/assetUploadLogic.go:33-42 | backend/internal/logic/core/uns/unsLabelCrudLogic.go:37-45 | backend/internal/logic/core/uns/unsLabelCrudLogic.go:47-55 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×1
Edited copy of a member (6 corresponding lines) backend/internal/repo/outbox.go:96— backend/internal/repo/outbox.go:96-101 | backend/internal/repo/outbox.go:103-119 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 11+ corresponding lines) · ×1
Edited copies of one member (8 members, 11+ corresponding lines) backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:17— backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:17-27 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:29-39 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:41-51 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:53-63 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:65-75 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:77-87 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:89-99 | backend/internal/handler/openapi/v1/flow/openapiFlowLegacyHandlers.go:101-111 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (8 corresponding lines) · ×1
Edited copy of a member (8 corresponding lines) backend/internal/repo/iam.go:173— backend/internal/repo/iam.go:173-180 | backend/internal/repo/iam.go:182-189 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 11+ corresponding lines) · ×1
Edited copies of one member (3 members, 11+ corresponding lines) backend/internal/handler/core/system/healthzHandler.go:15— backend/internal/handler/core/system/healthzHandler.go:15-25 | backend/internal/handler/core/system/metricsHandler.go:15-25 | backend/internal/handler/core/system/readyzHandler.go:15-25 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 8+ corresponding lines) · ×1
Edited copies of one member (3 members, 8+ corresponding lines) backend/internal/logic/core/flow/flowCreateLogic.go:34— backend/internal/logic/core/flow/flowCreateLogic.go:34-46 | backend/internal/logic/core/flow/flowDeployLogic.go:33-41 | backend/internal/logic/core/flow/flowStatusUpdateLogic.go:32-39 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 8+ corresponding lines) · ×1
Edited copies of one member (4 members, 8+ corresponding lines) backend/internal/repo/flow.go:231— backend/internal/repo/flow.go:231-238 | backend/internal/repo/flow.go:240-249 | backend/internal/repo/flow.go:253-262 | backend/internal/repo/flow.go:339-348 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) backend/internal/logic/core/apikey/apiKeyDeleteLogic.go:32— backend/internal/logic/core/apikey/apiKeyDeleteLogic.go:32-38 | backend/internal/logic/core/flow/flowDataSaveLogic.go:33-40 | backend/internal/logic/core/flow/flowDeleteLogic.go:33-40 | backend/internal/logic/core/uns/unsExportJobCreateLogic.go:32-38 | backend/internal/logic/core/uns/unsImportJobCreateLogic.go:32-38 | backend/internal/logic/core/uns/unsNodeDeleteLogic.go:33-40 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 10+ corresponding lines) · ×1
Edited copies of one member (6 members, 10+ corresponding lines) backend/internal/repo/apikey.go:252— backend/internal/repo/apikey.go:252-263 | backend/internal/repo/asset.go:233-244 | backend/internal/repo/async_job.go:109-118 | backend/internal/repo/gateway.go:59-70 | backend/internal/repo/uns_label.go:56-67 | backend/internal/repo/uns_template.go:77-88 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×1
Edited copies of one member (3 members, 5+ corresponding lines) backend/internal/repo/asset.go:144— backend/internal/repo/asset.go:144-148 | backend/internal/repo/uns_label.go:27-31 | backend/internal/repo/uns_template.go:27-31 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Duplicated block (31–32 lines × 2) backend/internal/repo/uns_node.go:348— backend/internal/repo/uns_node.go:348-379 | backend/internal/repo/uns_node.go:449-479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:348` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (22 lines × 2) backend/internal/logic/core/flow/audit.go:56— backend/internal/logic/core/flow/audit.go:56-77 | backend/internal/logic/core/uns/audit.go:46-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) backend/internal/repo/uns_node.go:323— backend/internal/repo/uns_node.go:323-343 | backend/internal/repo/uns_node.go:419-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:323` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (20 lines × 2) backend/internal/domain/uns/batch_create.go:286— backend/internal/domain/uns/batch_create.go:286-305 | REDACTED:1947-1966 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (16 lines × 2) backend/internal/handler/core/asset/assetUploadHandler.go:63— backend/internal/handler/core/asset/assetUploadHandler.go:63-78 | backend/internal/handler/handlerx/asset_upload.go:54-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/asset/assetUploadHandler.go:63` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) backend/internal/repo/uns_node.go:120— backend/internal/repo/uns_node.go:120-133 | backend/internal/repo/uns_node.go:168-181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/uns_node.go:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 3) backend/internal/repo/flow.go:45— backend/internal/repo/flow.go:45-57 | backend/internal/repo/flow_version.go:37-49 | backend/internal/repo/flow_version.go:83-95 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/flow.go:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) backend/internal/repo/iam.go:820— backend/internal/repo/iam.go:820-834 | backend/internal/repo/iam.go:890-904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/iam.go:820` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) backend/internal/domain/flow/nodered_payload.go:1036— backend/internal/domain/flow/nodered_payload.go:1036-1047 | backend/internal/domain/flow/nodered_payload.go:1051-1062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/domain/flow/nodered_payload.go:1036` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 4) backend/internal/repo/apikey_scope.go:40— backend/internal/repo/apikey_scope.go:40-49 | backend/internal/repo/iam.go:823-832 | backend/internal/repo/iam.go:893-902 | backend/internal/repo/iam.go:1210-1219 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/apikey_scope.go:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) backend/internal/logic/core/iam/userCreateLogic.go:52— backend/internal/logic/core/iam/userCreateLogic.go:52-61 | backend/internal/logic/core/iam/userUpdateLogic.go:60-69 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/logic/core/iam/userCreateLogic.go:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–10 lines × 2) backend/internal/repo/flow.go:172— backend/internal/repo/flow.go:172-181 | backend/internal/repo/flow.go:458-466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/flow.go:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 4) backend/internal/domain/dataingest/latest_cache.go:120— backend/internal/domain/dataingest/latest_cache.go:120-128 | backend/internal/repo/flow.go:46-54 | backend/internal/repo/flow_version.go:38-46 | backend/internal/repo/flow_version.go:84-92 — there are 4 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/domain/dataingest/latest_cache.go:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 3) backend/internal/domain/flow/nodered_payload.go:357— backend/internal/domain/flow/nodered_payload.go:357-365 | backend/internal/domain/flow/nodered_payload.go:459-467 | backend/internal/domain/flow/nodered_payload.go:481-489 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (6 lines × 7) backend/internal/handler/core/asset/assetUnbindHandler.go:17— backend/internal/handler/core/asset/assetUnbindHandler.go:17-22 | backend/internal/handler/core/iam/roleCrudHandlers.go:61-66 | backend/internal/handler/core/iam/userDeleteHandler.go:17-22 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:15-20 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:63-68 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelDeleteHandler.go:18-23 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelDetailHandler.go:18-23 — before extracting anything, compare `backend/internal/handler/openapi/v1/uns/openapiUnsLabelDeleteHandler.go` and `backend/internal/handler/openapi/v1/uns/openapiUnsLabelDetailHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/asset/assetUnbindHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 5) backend/internal/handler/core/apikey/apiKeyListHandler.go:17— backend/internal/handler/core/apikey/apiKeyListHandler.go:17-22 | backend/internal/handler/core/iam/roleListHandler.go:16-21 | backend/internal/handler/core/iam/userListHandler.go:16-21 | backend/internal/handler/core/uns/unsLabelListHandler.go:17-22 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelListHandler.go:18-23 — before extracting anything, compare `backend/internal/handler/core/iam/roleListHandler.go` and `backend/internal/handler/core/iam/userListHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/apikey/apiKeyListHandler.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 4) backend/internal/handler/core/uns/unsLabelCrudHandlers.go:31— backend/internal/handler/core/uns/unsLabelCrudHandlers.go:31-36 | backend/internal/handler/core/uns/unsLabelCrudHandlers.go:47-52 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelCreateHandler.go:18-23 | backend/internal/handler/openapi/v1/uns/openapiUnsLabelUpdateHandler.go:18-23 — before extracting anything, compare `backend/internal/handler/openapi/v1/uns/openapiUnsLabelCreateHandler.go` and `backend/internal/handler/openapi/v1/uns/openapiUnsLabelUpdateHandler.go` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/handler/core/uns/unsLabelCrudHandlers.go:31` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 3) REDACTED:425— REDACTED:425-432 | REDACTED:764-771 | backend/internal/domain/flow/nodered_payload.go:1324-1331 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (18 lines × 2) backend/internal/repo/outbox.go:47— backend/internal/repo/outbox.go:47-64 | backend/internal/repo/outbox.go:73-91 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `backend/internal/repo/outbox.go:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
No structured logging — No logging call was found in the 853 JavaScript/TypeScript, Go production file(s) this check read across 8 module(s). Each was searched for its ecosystem's logging libraries (Go: log, log/slog, zap, zerolog, logrus, klog, hclog, logr; JavaScript/TypeScript: pino, winston, bunyan, log4js, loglevel, consola, the NestJS Logger) and for a call on a receiver named `log`/`logger` (or ending in `Logger`/`_logger`) with a level verb. It cannot see logging through a repo-local wrapper named otherwise, or in source it did not read — this is 'no logging found by this walk', not a verdict that nothing here logs. If it is right, production issues will be hard to diagnose.
Low domain coverage — Domain coverage is 8%, against a bar of 50% for this row — the layer carrying the business rules is the least covered part of the codebase that matters most. Measured over the types this analyzer classifies as domain (aggregates, value objects, domain services), so code the classifier does not place in the domain is neither counted for nor against this figure.
Duplication concentrated across 24 sibling directories (61 clone groups) frontend/apps/web/src/pages/collection-flow/index.tsx:21— 61 duplicated blocks under frontend/apps/web/src/pages/ have copies in at least two of the sibling directories account-management, audit-log, cluster, collection-flow, event-flow, fleet-management (+18 more sibling(s) not listed) — 33 of them are reported below, and 28 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 61 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 61 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 61 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.
Duplication concentrated across 6 sibling directories (57 clone groups) frontend/apps/web/src/components/cloud-sync/index.tsx:911— 57 duplicated blocks under frontend/apps/web/src/ have copies in at least two of the sibling directories apis, components, layout, pages, routers, utils — 52 of them are reported below, and 5 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 57 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 57 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 57 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.
Duplication concentrated across 10 sibling directories (17 clone groups) frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224— 17 duplicated blocks under frontend/apps/web/src/pages/uns/components/ have copies in at least two of the sibling directories data-subscript, export-modal, label-detail, model-detail, reverse-modal, schema-modal (+4 more sibling(s) not listed) — 12 of them are reported below, and 5 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.
Duplication concentrated across 5 sibling directories (14 clone groups) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12— 14 duplicated blocks under frontend/apps/web/src/pages/routing-management/components/ have copies in at least two of the sibling directories certificates-tab, consumers-tab, plugins-tab, routes-tab, services-tab — 10 of them are reported below, and 4 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 14 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 14 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 14 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.
Duplication concentrated across 6 sibling directories (12 clone groups) frontend/apps/anchor/src/pages/model-library/index.tsx:34— 12 duplicated blocks under frontend/apps/anchor/src/pages/ have copies in at least two of the sibling directories instance-detail, model-detail, model-library, qr-viewer, scene-editor, scene-library — 10 of them are reported below, and 2 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 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 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 12 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.
Duplication concentrated across 2 sibling directories (10 clone groups) frontend/apps/anchor/src/theme/theme-token.ts:2— 10 duplicated blocks under frontend/apps/ have copies in at least two of the sibling directories anchor, web — 7 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 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 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 10 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.
Duplication concentrated across 4 sibling directories (6 clone groups) frontend/apps/web/src/pages/project/components/tabs-content/apps/index.tsx:234— 6 duplicated blocks under frontend/apps/web/src/pages/project/components/tabs-content/ have copies in at least two of the sibling directories apps, flows, members, roles — 1 of them are reported below, and 5 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 6 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 6 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 6 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.
Wholesale file copy (509 identical lines × 2 files) frontend/apps/web/src/pages/collection-flow/index.tsx:21— frontend/apps/web/src/pages/collection-flow/index.tsx:21 · frontend/apps/web/src/pages/event-flow/index.tsx:10 — these 2 files are line-for-line copies of one another — 509 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.
Wholesale file copy (450 identical lines × 2 files) REDACTED:1— REDACTED:1 · REDACTED:1 — these 2 files are line-for-line copies of one another — 450 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.
Duplicated block (294 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:911— frontend/apps/web/src/components/cloud-sync/index.tsx:911 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:1135 — 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 (271 matched lines × 2 locations) · ×1
Duplicated block with local edits (271 matched lines × 2 locations) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:334— frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:334 · frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:115 — the two spans are one implementation copied and then locally edited — 1487 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 (263 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:404— frontend/apps/web/src/components/cloud-sync/index.tsx:404 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:499 — 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.
Wholesale file copy (258 identical lines × 2 files) REDACTED:6— REDACTED:6 · REDACTED:6 — these 2 files are line-for-line copies of one another — 258 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 with local edits (189 matched lines × 2 locations) · ×1
Duplicated block with local edits (189 matched lines × 2 locations) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12— frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:12 · frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx:23 — the two spans are one implementation copied and then locally edited — 1123 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 (183 matched lines × 2 locations) · ×1
Duplicated block with local edits (183 matched lines × 2 locations) frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:50— frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:50 · frontend/apps/web/src/pages/vision/CameraInputsPanel.tsx:30 — the two spans are one implementation copied and then locally edited — 1087 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 (182 matched lines × 2 locations) · ×1
Duplicated block with local edits (182 matched lines × 2 locations) frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:73— frontend/apps/web/src/pages/notebook/components/HistoryPanel.tsx:73 · frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx:54 — the two spans are one implementation copied and then locally edited — 1086 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 (176 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:701— frontend/apps/web/src/components/cloud-sync/index.tsx:701 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:871 — 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 (148 matched lines × 2 locations) · ×1
Duplicated block with local edits (148 matched lines × 2 locations) frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:127— frontend/apps/web/src/pages/vision/AlgorithmsPanel.tsx:127 · frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:212 — the two spans are one implementation copied and then locally edited — 877 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 (145 matched lines × 2 locations) · ×1
Duplicated block with local edits (145 matched lines × 2 locations) frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:168— frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:168 · frontend/apps/web/src/pages/uns/store/treeStore.tsx:236 — the two spans are one implementation copied and then locally edited — 873 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 (144 matched lines × 2 locations) · ×1
Duplicated block with local edits (144 matched lines × 2 locations) frontend/apps/anchor/src/viewer/use-model-viewer.ts:88— frontend/apps/anchor/src/viewer/use-model-viewer.ts:88 · frontend/apps/anchor/src/viewer/use-scene-editor.ts:139 — the two spans are one implementation copied and then locally edited — 1019 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.
Wholesale file copy (138 identical lines × 2 files) frontend/apps/anchor/src/theme/theme-token.ts:2— frontend/apps/anchor/src/theme/theme-token.ts:2 · frontend/apps/web/src/theme/theme-token.ts:1 — these 2 files are line-for-line copies of one another — 138 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 with local edits (138 matched lines × 2 locations) · ×1
Duplicated block with local edits (138 matched lines × 2 locations) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:68— frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:68 · frontend/apps/web/src/pages/uns/components/uns-dashboard/CloudSyncConnectModal.tsx:25 — the two spans are one implementation copied and then locally edited — 890 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 (119 matched lines × 2 locations) · ×1
Duplicated block with local edits (119 matched lines × 2 locations) frontend/apps/web/src/apis/core-api/event-flow.ts:4— frontend/apps/web/src/apis/core-api/event-flow.ts:4 · frontend/apps/web/src/apis/core-api/flow.ts:28 — the two spans are one implementation copied and then locally edited — 1099 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 (103 matched lines × 2 locations) · ×1
Duplicated block with local edits (103 matched lines × 2 locations) frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:59— frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx:59 · frontend/apps/web/src/pages/uns/components/import-modal/JsonDom.tsx:51 — the two spans are one implementation copied and then locally edited — 667 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 (91 matched lines × 2 locations) · ×1
Duplicated block with local edits (91 matched lines × 2 locations) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:59— frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx:59 · frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:386 — the two spans are one implementation copied and then locally edited — 555 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 (73 matched lines × 2 locations) · ×1
Duplicated block with local edits (73 matched lines × 2 locations) frontend/apps/web/src/pages/account-management/components/useAddUser.tsx:36— frontend/apps/web/src/pages/account-management/components/useAddUser.tsx:36 · frontend/apps/web/src/pages/account-management/components/useResetPassword.tsx:18 — the two spans are one implementation copied and then locally edited — 322 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 (70 matched lines × 2 locations) · ×1
Duplicated block with local edits (70 matched lines × 2 locations) frontend/apps/web/src/pages/vision/AlgorithmImportModal.tsx:10— frontend/apps/web/src/pages/vision/AlgorithmImportModal.tsx:10 · frontend/apps/web/src/pages/vision/AlgorithmUpdateModelModal.tsx:11 — the two spans are one implementation copied and then locally edited — 568 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 (66 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:2153— frontend/apps/web/src/components/cloud-sync/index.tsx:2153 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2865 — 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 (65 matched lines × 2 locations) · ×1
Duplicated block with local edits (65 matched lines × 2 locations) frontend/apps/web/src/pages/account-management/index.tsx:49— frontend/apps/web/src/pages/account-management/index.tsx:49 · frontend/apps/web/src/pages/audit-log/index.tsx:65 — the two spans are one implementation copied and then locally edited — 529 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 (64 lines × 2 locations) frontend/apps/web/src/pages/launchpad/components/AppTable.tsx:22— frontend/apps/web/src/pages/launchpad/components/AppTable.tsx:22 · frontend/apps/web/src/pages/launchpad/components/ProjectTable.tsx:27 — 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 (61 matched lines × 2 locations) · ×1
Duplicated block with local edits (61 matched lines × 2 locations) frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:298— frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:298 · frontend/apps/web/src/pages/fleet-runtime/index.tsx:266 — the two spans are one implementation copied and then locally edited — 350 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 (60 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:1982— frontend/apps/web/src/components/cloud-sync/index.tsx:1982 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:2682 — 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 (60 matched lines × 2 locations) · ×1
Duplicated block with local edits (60 matched lines × 2 locations) frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224— frontend/apps/web/src/pages/uns/components/model-detail/index.tsx:224 · frontend/apps/web/src/pages/uns/components/topic-detail/index.tsx:329 — the two spans are one implementation copied and then locally edited — 356 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 (59 lines × 2 locations) frontend/apps/web/src/components/cloud-sync/index.tsx:102— frontend/apps/web/src/components/cloud-sync/index.tsx:102 · frontend/apps/web/src/pages/mqtt-auth/index.tsx:111 — 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.
Complex function MqttAuthPage (cyclomatic 70, cognitive 62) frontend/apps/web/src/pages/mqtt-auth/index.tsx:372— MqttAuthPage has cyclomatic complexity 70 and cognitive complexity 62; 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.
Complex function ProCard (cyclomatic 67, cognitive 58) frontend/apps/web/src/components/pro-card/ProCard.tsx:16— ProCard has cyclomatic complexity 67 and cognitive complexity 58; 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.
Complex function mapUnsNode (cyclomatic 58, cognitive 41) frontend/apps/web/src/apis/core-api/core-adapter.ts:818— mapUnsNode has cyclomatic complexity 58 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.
Complex function buttonParentResourceKey (cyclomatic 56, cognitive 46) frontend/apps/web/src/apis/core-api/core-adapter.ts:513— buttonParentResourceKey has cyclomatic complexity 56 and cognitive complexity 46; 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.
Complex function runBrowserRegression (cyclomatic 53, cognitive 64) deploy/regression/runtime-regression.mjs:237— runBrowserRegression has cyclomatic complexity 53 and cognitive complexity 64; 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.
Complex function (anonymous) (cyclomatic 50, cognitive 91) frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:88— (anonymous) has cyclomatic complexity 50 and cognitive complexity 91; 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.
Complex function renderBranchEdgeNodeContent (cyclomatic 49, cognitive 57) frontend/apps/web/src/pages/mqtt-auth/index.tsx:2325— renderBranchEdgeNodeContent has cyclomatic complexity 49 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 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.
Complex function RegionEditor (cyclomatic 49, cognitive 25) frontend/apps/web/src/pages/vision/RegionEditor.tsx:22— RegionEditor has cyclomatic complexity 49 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.
Complex function MqttAuthPage (cyclomatic 48, cognitive 48) frontend/apps/web/src/components/cloud-sync/index.tsx:310— MqttAuthPage has cyclomatic complexity 48 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 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.
Complex function (anonymous) (cyclomatic 46, cognitive 80) frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.tsx:92— (anonymous) has cyclomatic complexity 46 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.
Complex function getFormData (cyclomatic 41, cognitive 79) frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:132— getFormData has cyclomatic complexity 41 and cognitive complexity 79; 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.
Complex function InstanceDetailPage (cyclomatic 41, cognitive 37) frontend/apps/anchor/src/pages/instance-detail/index.tsx:52— InstanceDetailPage has cyclomatic complexity 41 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.
Complex function (anonymous) (cyclomatic 41, cognitive 28) frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:67— (anonymous) has cyclomatic complexity 41 and cognitive complexity 28; 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.
Complex function loadData (cyclomatic 37, cognitive 83) frontend/apps/web/src/pages/uns/store/treeStore.tsx:202— loadData has cyclomatic complexity 37 and cognitive complexity 83; 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.
Complex function (anonymous) (cyclomatic 37, cognitive 48) frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:736— (anonymous) has cyclomatic complexity 37 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 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.
Complex function CodeSnippet (cyclomatic 37, cognitive 47) frontend/apps/web/src/components/code-snippet/index.tsx:158— CodeSnippet has cyclomatic complexity 37 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.
Complex function runRuntimeRegression (cyclomatic 37, cognitive 46) deploy/regression/runtime-regression.mjs:1159— runRuntimeRegression has cyclomatic complexity 37 and cognitive complexity 46; 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.
Complex function runFlowFolderJourney (cyclomatic 37, cognitive 38) deploy/regression/runtime-regression.mjs:887— runFlowFolderJourney has cyclomatic complexity 37 and cognitive complexity 38; 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.
Complex function FleetNodeDetailPage (cyclomatic 37, cognitive 32) frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:147— FleetNodeDetailPage has cyclomatic complexity 37 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.
Complex function (anonymous) (cyclomatic 36, cognitive 41) frontend/apps/anchor/src/viewer/use-scene-editor.ts:458— (anonymous) has cyclomatic complexity 36 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 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.
Complex function mapFlow (cyclomatic 35, cognitive 25) frontend/apps/web/src/apis/core-api/core-adapter.ts:903— mapFlow has cyclomatic complexity 35 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.
Complex function CollectionFlow (cyclomatic 32, cognitive 32) frontend/apps/web/src/pages/collection-flow/index.tsx:76— CollectionFlow has cyclomatic complexity 32 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.
Complex function (anonymous) (cyclomatic 30, cognitive 30) frontend/apps/web/src/components/lucide-icon/menu-icon-map.ts:63— (anonymous) has cyclomatic complexity 30 and cognitive complexity 30; 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.
Complex function TaskDetailModal (cyclomatic 29, cognitive 28) frontend/apps/web/src/pages/vision/TaskDetailModal.tsx:20— TaskDetailModal has cyclomatic complexity 29 and cognitive complexity 28; 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.
Complex function copyNodePayload (cyclomatic 29, cognitive 18) frontend/apps/web/src/apis/core-api/uns.ts:433— copyNodePayload has cyclomatic complexity 29 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.
Complex function toUnsPayload (cyclomatic 29, cognitive 16) frontend/apps/web/src/apis/core-api/uns.ts:23— toUnsPayload has cyclomatic complexity 29 and cognitive complexity 16; 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.
Complex function (anonymous) (cyclomatic 28, cognitive 38) frontend/apps/web/src/pages/uns/components/use-create-modal/path-utils.ts:66— (anonymous) has cyclomatic complexity 28 and cognitive complexity 38; 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.
Complex function EventFlow (cyclomatic 28, cognitive 29) frontend/apps/web/src/pages/event-flow/index.tsx:60— EventFlow has cyclomatic complexity 28 and cognitive complexity 29; 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.
Complex function runFoundationJourney (cyclomatic 27, cognitive 24) deploy/regression/runtime-regression.mjs:646— runFoundationJourney has cyclomatic complexity 27 and cognitive complexity 24; 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.
Complex function CloudSyncConnectModal (cyclomatic 27, cognitive 23) frontend/apps/web/src/components/cloud-sync/CloudSyncConnectModal.tsx:54— CloudSyncConnectModal has cyclomatic complexity 27 and cognitive complexity 23; 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.
Complex function renderBranchEdgeNodeContent (cyclomatic 27, cognitive 22) frontend/apps/web/src/components/cloud-sync/index.tsx:1828— renderBranchEdgeNodeContent has cyclomatic complexity 27 and cognitive complexity 22; 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.
Complex function LicenseActivation (cyclomatic 27, cognitive 21) frontend/apps/web/src/pages/license-activation/index.tsx:20— LicenseActivation has cyclomatic complexity 27 and cognitive complexity 21; 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.
Complex function (anonymous) (cyclomatic 26, cognitive 22) frontend/apps/web/src/apis/core-api/core-adapter.ts:660— (anonymous) has cyclomatic complexity 26 and cognitive complexity 22; 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.
Complex function updateBaseStore (cyclomatic 25, cognitive 34) frontend/apps/web/src/stores/base/index.ts:170— updateBaseStore has cyclomatic complexity 25 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.
Complex function (anonymous) (cyclomatic 24, cognitive 19) frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:32— (anonymous) has cyclomatic complexity 24 and cognitive complexity 19; 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.
Complex function ReverseGeneration (cyclomatic 24, cognitive 18) frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/ReverseGeneration.tsx:24— ReverseGeneration has cyclomatic complexity 24 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.
Complex function edgeNodeConnectionObjectFromRecord (cyclomatic 23, cognitive 26) frontend/apps/web/src/pages/mqtt-auth/index.tsx:192— edgeNodeConnectionObjectFromRecord has cyclomatic complexity 23 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 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.
Complex function (anonymous) (cyclomatic 23, cognitive 23) frontend/apps/web/src/components/lucide-icon/legacy-icon-map.ts:108— (anonymous) has cyclomatic complexity 23 and cognitive complexity 23; 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.
R3 · Large Files· frontend/apps/web/src/pages/mqtt-auth/index.tsx · ×1
frontend/apps/web/src/pages/mqtt-auth/index.tsx: 2898 lines of code frontend/apps/web/src/pages/mqtt-auth/index.tsx:1— frontend/apps/web/src/pages/mqtt-auth/index.tsx has 2898 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· frontend/apps/web/src/components/cloud-sync/index.tsx · ×1
frontend/apps/web/src/components/cloud-sync/index.tsx: 2170 lines of code frontend/apps/web/src/components/cloud-sync/index.tsx:1— frontend/apps/web/src/components/cloud-sync/index.tsx has 2170 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· deploy/regression/runtime-regression.mjs · ×1
deploy/regression/runtime-regression.mjs: 1256 lines of code deploy/regression/runtime-regression.mjs:1— deploy/regression/runtime-regression.mjs has 1256 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· frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx · ×1
frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx: 1050 lines of code frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx:1— frontend/apps/web/src/pages/uns/components/uns-tree/index.tsx has 1050 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· frontend/apps/anchor/src/pages/scene-editor/index.tsx · ×1
frontend/apps/anchor/src/pages/scene-editor/index.tsx: 974 lines of code frontend/apps/anchor/src/pages/scene-editor/index.tsx:1— frontend/apps/anchor/src/pages/scene-editor/index.tsx has 974 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· frontend/apps/web/src/apis/core-api/core-adapter.ts · ×1
frontend/apps/web/src/apis/core-api/core-adapter.ts: 898 lines of code frontend/apps/web/src/apis/core-api/core-adapter.ts:1— frontend/apps/web/src/apis/core-api/core-adapter.ts has 898 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· frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx · ×1
frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx: 898 lines of code frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:1— frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx has 898 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· frontend/apps/web/src/pages/project/components/ImportAppModal.tsx · ×1
frontend/apps/web/src/pages/project/components/ImportAppModal.tsx: 893 lines of code frontend/apps/web/src/pages/project/components/ImportAppModal.tsx:1— frontend/apps/web/src/pages/project/components/ImportAppModal.tsx has 893 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· frontend/apps/web/src/pages/collection-flow/index.tsx · ×1
frontend/apps/web/src/pages/collection-flow/index.tsx: 863 lines of code frontend/apps/web/src/pages/collection-flow/index.tsx:1— frontend/apps/web/src/pages/collection-flow/index.tsx has 863 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· frontend/apps/web/src/pages/event-flow/index.tsx · ×1
frontend/apps/web/src/pages/event-flow/index.tsx: 809 lines of code frontend/apps/web/src/pages/event-flow/index.tsx:1— frontend/apps/web/src/pages/event-flow/index.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· frontend/apps/web/src/components/com-group-button/UserPopover.tsx · ×1
frontend/apps/web/src/components/com-group-button/UserPopover.tsx: 802 lines of code frontend/apps/web/src/components/com-group-button/UserPopover.tsx:1— frontend/apps/web/src/components/com-group-button/UserPopover.tsx has 802 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· frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx · ×1
frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx: 761 lines of code frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx:1— frontend/apps/web/src/pages/uns/components/use-create-modal/form-content/index.tsx has 761 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· frontend/apps/web/src/pages/uns/store/treeStore.tsx · ×1
frontend/apps/web/src/pages/uns/store/treeStore.tsx: 711 lines of code frontend/apps/web/src/pages/uns/store/treeStore.tsx:1— frontend/apps/web/src/pages/uns/store/treeStore.tsx has 711 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 690 lines of code REDACTED:1— REDACTED has 690 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· frontend/apps/anchor/src/pages/instance-detail/index.tsx · ×1
frontend/apps/anchor/src/pages/instance-detail/index.tsx: 653 lines of code frontend/apps/anchor/src/pages/instance-detail/index.tsx:1— frontend/apps/anchor/src/pages/instance-detail/index.tsx has 653 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· frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx · ×1
frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx: 649 lines of code frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx:1— frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx has 649 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· frontend/apps/web/src/routers/index.tsx · ×1
frontend/apps/web/src/routers/index.tsx: 606 lines of code frontend/apps/web/src/routers/index.tsx:1— frontend/apps/web/src/routers/index.tsx has 606 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 575 lines of code REDACTED:1— REDACTED has 575 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
REDACTED: 575 lines of code REDACTED:1— REDACTED has 575 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· frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx · ×1
frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx: 565 lines of code frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx:1— frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx has 565 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· frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx · ×1
frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx: 563 lines of code frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx:1— frontend/apps/web/src/pages/uns/components/reverse-modal/source-form/json/index.tsx has 563 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· frontend/apps/web/src/pages/notebook/editor.tsx · ×1
frontend/apps/web/src/pages/notebook/editor.tsx: 560 lines of code frontend/apps/web/src/pages/notebook/editor.tsx:1— frontend/apps/web/src/pages/notebook/editor.tsx has 560 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· frontend/apps/anchor/src/viewer/use-scene-editor.ts · ×1
frontend/apps/anchor/src/viewer/use-scene-editor.ts: 543 lines of code frontend/apps/anchor/src/viewer/use-scene-editor.ts:1— frontend/apps/anchor/src/viewer/use-scene-editor.ts has 543 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· frontend/apps/web/src/pages/uns/components/EditButton.tsx · ×1
frontend/apps/web/src/pages/uns/components/EditButton.tsx: 542 lines of code frontend/apps/web/src/pages/uns/components/EditButton.tsx:1— frontend/apps/web/src/pages/uns/components/EditButton.tsx has 542 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· frontend/apps/web/src/apis/core-api/uns.ts · ×1
frontend/apps/web/src/apis/core-api/uns.ts: 527 lines of code frontend/apps/web/src/apis/core-api/uns.ts:1— frontend/apps/web/src/apis/core-api/uns.ts has 527 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· frontend/apps/anchor/src/i18n/index.ts · ×1
frontend/apps/anchor/src/i18n/index.ts: 517 lines of code frontend/apps/anchor/src/i18n/index.ts:1— frontend/apps/anchor/src/i18n/index.ts has 517 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· frontend/apps/web/src/pages/routing-management/index.tsx · ×1
frontend/apps/web/src/pages/routing-management/index.tsx: 516 lines of code frontend/apps/web/src/pages/routing-management/index.tsx:1— frontend/apps/web/src/pages/routing-management/index.tsx has 516 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· frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx · ×1
frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx: 513 lines of code frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx:1— frontend/apps/web/src/pages/fleet-management/FleetManagementPanel.tsx has 513 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· frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx · ×1
frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx: 513 lines of code frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx:1— frontend/apps/web/src/pages/project/components/ReplaceAppModal.tsx has 513 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· frontend/apps/anchor/src/pages/model-detail/index.tsx · ×1
frontend/apps/anchor/src/pages/model-detail/index.tsx: 505 lines of code frontend/apps/anchor/src/pages/model-detail/index.tsx:1— frontend/apps/anchor/src/pages/model-detail/index.tsx has 505 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· frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx · ×1
frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx: 505 lines of code frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx:1— frontend/apps/web/src/pages/uns/components/topic-detail/topology/TopologyChart.tsx has 505 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· frontend/apps/web/src/pages/vision/TaskFormModal.tsx · ×1
frontend/apps/web/src/pages/vision/TaskFormModal.tsx: 479 lines of code frontend/apps/web/src/pages/vision/TaskFormModal.tsx:1— frontend/apps/web/src/pages/vision/TaskFormModal.tsx has 479 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· frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx · ×1
frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx: 463 lines of code frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx:1— frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx has 463 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· frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx · ×1
frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx: 457 lines of code frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx:1— frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx has 457 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· frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx · ×1
frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx: 448 lines of code frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx:1— frontend/apps/web/src/pages/vision/AnalysisTasksPanel.tsx has 448 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· frontend/apps/anchor/src/viewer/use-model-viewer.ts · ×1
frontend/apps/anchor/src/viewer/use-model-viewer.ts: 447 lines of code frontend/apps/anchor/src/viewer/use-model-viewer.ts:1— frontend/apps/anchor/src/viewer/use-model-viewer.ts has 447 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· frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx · ×1
frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx: 447 lines of code frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx:1— frontend/apps/web/src/pages/notebook/components/NotebookSidebar.tsx has 447 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· frontend/apps/web/src/pages/permission-management/index.tsx · ×1
frontend/apps/web/src/pages/permission-management/index.tsx: 443 lines of code frontend/apps/web/src/pages/permission-management/index.tsx:1— frontend/apps/web/src/pages/permission-management/index.tsx has 443 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· frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx · ×1
frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx: 435 lines of code frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx:1— frontend/apps/web/src/pages/uns/components/use-create-modal/index.tsx has 435 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· frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx · ×1
frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx: 426 lines of code frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx:1— frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Test Coverage — 0% of 535 production file(s) reachable from 0 test file(s) via the import graph — 'production' here is the RESIDUE: every source file left once tests, tooling, generated output, config, declarations and declaration-only modules, fixture corpora, type fixtures, behaviour-free data modules, re-export barrels, registration/constant data modules and service workers are set aside, so the percentage is taken over a smaller denominator than the workspace's file count
No test script — test ✗ · lint ✓ · typecheck ✓ — read from this repository's package.json scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
Dead file (~2300 LoC) frontend/apps/web/src/components/cloud-sync/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~673 LoC) frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~583 LoC) frontend/apps/web/src/pages/routing-management/components/services-tab/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~472 LoC) frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/localization/index.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
Dead file (~393 LoC) frontend/apps/web/src/pages/localization/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~338 LoC) frontend/apps/web/src/pages/uns/components/label-detail/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~292 LoC) frontend/apps/web/src/pages/uns/components/uns-tree/RecycleTree.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~285 LoC) frontend/apps/web/src/pages/uns/components/topic-detail/FetchData.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/topic-detail/SqlQuery.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
Dead file (~269 LoC) frontend/apps/web/src/pages/notebook/components/VersionDrawer.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~266 LoC) frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~264 LoC) frontend/apps/web/src/pages/uns/components/WritDownDataButton.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~216 LoC) frontend/apps/web/src/pages/menu-configuration/components/menu-setting/useMenuSetting.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~183 LoC) frontend/apps/web/src/pages/project/components/tabs-content/flows/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~177 LoC) frontend/apps/web/src/pages/home/guide-steps.ts— no import path from any entry point (47 application, 14 tooling, 0 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 (~149 LoC) frontend/apps/web/src/pages/project/components/tabs-content/uns/Namespace.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/project/components/tabs-content/uns/index.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
Dead file (~143 LoC) frontend/apps/web/src/pages/uns/components/data-subscript/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~131 LoC) frontend/apps/web/src/components/com-upload-picture/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~126 LoC) frontend/apps/web/src/components/pro-codemirror/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.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
Dead file (~119 LoC) frontend/apps/web/src/pages/uns/components/schema-modal/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~116 LoC) frontend/apps/web/src/pages/notebook/components/ExportModal.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~115 LoC) frontend/apps/web/src/components/com-dragger-upload/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/localization/components/use-locales-settings/index.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
Dead file (~112 LoC) frontend/apps/web/src/layout/custom-nav/components/SideMenuList.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/layout/custom-nav/index.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
Dead file (~109 LoC) frontend/apps/web/src/pages/uns/components/label-modal/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~104 LoC) frontend/apps/web/src/pages/uns/components/data-subscript/FolderTable.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/pages/uns/components/data-subscript/index.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
Dead file (~103 LoC) frontend/apps/web/src/pages/uns/components/data-subscript/TagTable.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~102 LoC) frontend/apps/web/src/layout/components/HelpNav.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (frontend/apps/web/src/layout/custom-nav/index.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
Dead file (~94 LoC) frontend/apps/web/src/pages/aboutus/index.tsx— no import path from any entry point (47 application, 14 tooling, 0 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 (~91 LoC) frontend/apps/web/src/pages/routing-management/hooks/useKongModal.tsx— no import path from any entry point (47 application, 14 tooling, 0 test roots considered), but 5 in-repo import(s) from 5 other file(s) do name it (frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.tsx, frontend/apps/web/src/pages/routing-management/components/consumers-tab/index.tsx, frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx and 2 more) — 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
Dead file (~87 LoC) frontend/apps/web/src/pages/home/components/OverviewList.tsx— no import path from any entry point (47 application, 14 tooling, 0 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
Unused dependency '@codemirror/lang-html' frontend/apps/web/package.json:18— Declared in frontend/apps/web/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 '@codemirror/lang-javascript' frontend/apps/web/package.json:19— Declared in frontend/apps/web/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 '@codemirror/lang-sql' frontend/apps/web/package.json:21— Declared in frontend/apps/web/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 '@codemirror/lang-xml' frontend/apps/web/package.json:22— Declared in frontend/apps/web/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 '@codemirror/lang-yaml' frontend/apps/web/package.json:23— Declared in frontend/apps/web/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 '@internal/scripts' frontend/apps/web/package.json:80— Declared in frontend/apps/web/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 'blueimp-md5' frontend/apps/web/package.json:39— Declared in frontend/apps/web/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 'js-yaml' frontend/apps/web/package.json:48— Declared in frontend/apps/web/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 'react-markdown' frontend/apps/web/package.json:61— Declared in frontend/apps/web/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 'recharts' frontend/apps/web/package.json:66— Declared in frontend/apps/web/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 'rehype-highlight' frontend/apps/web/package.json:67— Declared in frontend/apps/web/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 'remark-breaks' frontend/apps/web/package.json:68— Declared in frontend/apps/web/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 'remark-gfm' frontend/apps/web/package.json:69— Declared in frontend/apps/web/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 'screenfull' frontend/apps/web/package.json:71— Declared in frontend/apps/web/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 'use-intl' frontend/apps/web/package.json:74— Declared in frontend/apps/web/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 'rolldown' frontend/packages/scripts/package.json:19— Declared in frontend/packages/scripts/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.
X2 · Cancellation propagation· Async function without AbortSignal · ×1
Async function without AbortSignal: loadAndApplyTheme frontend/apps/web/src/stores/base/index.ts:140— `loadAndApplyTheme` 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 })`.
X3 · Exception handling· Discarded error (assigned to `_`, then its result used) · ×1
Discarded error (assigned to `_`, then its result used) backend/internal/repo/migration_versioned.go:186— `value, _ := strconv.Atoi(parts[index])` writes the call's error to `_` and then uses `value` as if the call succeeded. When `strconv.Atoi` fails, `value` is its zero value (nil for a pointer, a map or an interface), so the program panics later or goes on with a default it never chose, and nothing records why. Check the error before using `value` (return it, wrapped with what was being done), or, if the failure genuinely cannot matter, say why in a comment on the line.
Orphaned file frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.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 frontend/apps/web/src/pages/uns/components/export-modal/treeStore.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 frontend/apps/web/src/pages/localization/components/use-locales-settings/index.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 frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.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 frontend/apps/web/src/components/pro-card/ProCard.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 frontend/apps/web/src/pages/localization/index.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 frontend/apps/web/src/components/code-snippet/index.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 frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.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 frontend/apps/web/src/pages/routing-management/components/routes-tab/index.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 frontend/apps/web/src/pages/uns/components/EditDetailButton.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 frontend/apps/web/src/pages/uns/store/utils.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 frontend/apps/web/src/pages/uns/components/model-detail/index.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 frontend/apps/web/src/pages/uns/components/label-detail/index.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 frontend/apps/web/src/pages/uns/components/topic-detail/FetchData.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 frontend/apps/web/src/pages/menu-configuration/components/menu-tree/SortableTree.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 frontend/apps/web/src/pages/uns/components/use-create-modal/components/file/ReverseGeneration.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 frontend/apps/web/src/components/pro-tree/index.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 REDACTED: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 frontend/apps/web/src/components/draggable/index.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 frontend/apps/web/src/utils/request.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 frontend/apps/web/src/hooks/usePagination.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 frontend/apps/web/src/pages/uns/components/WritDownDataButton.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 frontend/apps/web/src/pages/routing-management/components/certificates-tab/index.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 frontend/apps/web/src/layout/components/com-tags/index.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 frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.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.
Duplicated predicate backend/internal/domain/uns/batch_create.go:300— `cmd.SystemTopicFolder && nameTopicType != 0 && (topicType == 0 || topicType == nameTopicType)` appears character-identically in 2 files — backend/internal/domain/uns/batch_create.go, REDACTED. 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 backend/internal/domain/flow/service.go:403— `flow.FlowType == 1 && flow.NodeType == 2` appears character-identically in 2 files — backend/internal/domain/flow/service.go, backend/internal/repo/flow.go. 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 backend/internal/gateway/http.go:536— `path == prefix || strings.HasPrefix(path, prefix+"/")` appears character-identically in 2 files — backend/internal/gateway/http.go, backend/internal/repo/util.go. 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 backend/internal/logic/core/uns/unsNodeSaveCommand.go:28— `req.MockData || req.AddFlow || req.WithFlow` appears character-identically in 2 files — backend/internal/logic/core/uns/unsNodeSaveCommand.go, backend/internal/logic/openapi/v1/uns/helper.go. 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 backend/internal/logic/core/uns/unsNodeSaveCommand.go:27— `req.WithFlow || req.AddFlow || req.MockData` appears character-identically in 2 files — backend/internal/logic/core/uns/unsNodeSaveCommand.go, backend/internal/logic/openapi/v1/uns/helper.go. 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 backend/internal/logic/core/flow/audit.go:13— `svcCtx == nil || svcCtx.App == nil || svcCtx.App.Audit == nil` appears character-identically in 2 files — backend/internal/logic/core/flow/audit.go, backend/internal/logic/core/uns/audit.go. 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 frontend/apps/web/src/apis/core-api/event-flow.ts:55— `!category || category === 'all' || item.category === category` appears character-identically in 2 files — frontend/apps/web/src/apis/core-api/event-flow.ts, frontend/apps/web/src/apis/core-api/flow.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 frontend/apps/anchor/src/viewer/use-model-viewer.ts:264— `!container.clientWidth || !container.clientHeight` appears character-identically in 2 files — frontend/apps/anchor/src/viewer/use-model-viewer.ts, frontend/apps/anchor/src/viewer/use-scene-editor.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 frontend/apps/web/src/components/cloud-sync/index.tsx:483— `!edgeNodeRequested || !canConnectCloudSync` appears character-identically in 2 files — frontend/apps/web/src/components/cloud-sync/index.tsx, frontend/apps/web/src/pages/mqtt-auth/index.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 frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx:161— `!enableAutoCategorization && 'uns-tree-node-count--plain'` appears character-identically in 2 files — frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx, frontend/apps/web/src/pages/uns/components/uns-tree/index.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 REDACTED:157— `!flowIframeRef.current || event.source !== flowIframeRef.current.contentWindow` appears character-identically in 2 files — REDACTED, REDACTED. 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 frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx:169— `!folderTopicType || !enableAutoCategorization` appears character-identically in 2 files — frontend/apps/web/src/pages/uns/components/export-modal/uns-tree.tsx, frontend/apps/web/src/pages/uns/components/uns-tree/index.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 REDACTED:536— `!forcingEditableWorkspace && isContextWorkspaceId(targetId)` appears character-identically in 2 files — REDACTED, REDACTED. 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:91— `!hasContext() || !isFlowPayloadUrl(rawUrl)` appears character-identically in 2 files — REDACTED, REDACTED. 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:8— `!internalToken || req.get(internalTokenHeader) === internalToken` appears character-identically in 2 files — REDACTED, deploy/mount/sourceflow/settings.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 REDACTED:75— `!method || method.toUpperCase() === 'GET' || method.toUpperCase() === 'HEAD'` appears character-identically in 2 files — REDACTED, REDACTED. 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 frontend/apps/web/src/components/pro-tree/HighlightText.tsx:14— `!needle || !haystack.toLowerCase().includes(needle.toLowerCase())` appears character-identically in 2 files — frontend/apps/web/src/components/pro-tree/HighlightText.tsx, frontend/apps/web/src/pages/uns/components/uns-tree/HighlightText.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 frontend/apps/web/src/components/cloud-sync/index.tsx:1004— `!ordered.includes(key) && !hiddenErrorItemKeys.has(key)` appears character-identically in 2 files — frontend/apps/web/src/components/cloud-sync/index.tsx, frontend/apps/web/src/pages/mqtt-auth/index.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 frontend/apps/web/src/components/cloud-sync/index.tsx:155— `!parsed || typeof parsed !== 'object' || Array.isArray(parsed)` appears character-identically in 2 files — frontend/apps/web/src/components/cloud-sync/index.tsx, frontend/apps/web/src/pages/mqtt-auth/index.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 REDACTED:411— `!subflowId || ownedWorkspaces.has(subflowId)` appears character-identically in 2 files — REDACTED, REDACTED. 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 frontend/apps/web/src/pages/launchpad/app-detail.tsx:143— `!tabName || location.state?.tabName === tabName` appears character-identically in 2 files — frontend/apps/web/src/pages/launchpad/app-detail.tsx, frontend/apps/web/src/pages/launchpad/project-detail.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 frontend/apps/web/src/components/com-group-button/UserPopover.tsx:565— `!value || getFieldValue('oldPassword') !== value` appears character-identically in 2 files — frontend/apps/web/src/components/com-group-button/UserPopover.tsx, frontend/apps/web/src/pages/settings/AccountSettingsPanel.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 frontend/apps/web/src/components/com-group-button/UserPopover.tsx:594— `!value || getFieldValue('password') === value` appears character-identically in 4 files — frontend/apps/web/src/components/com-group-button/UserPopover.tsx, frontend/apps/web/src/components/default-password-reminder/index.tsx, frontend/apps/web/src/pages/account-management/components/useResetPassword.tsx, frontend/apps/web/src/pages/settings/AccountSettingsPanel.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 REDACTED:589— `!window.RED || !RED.events || !RED.workspaces` appears character-identically in 2 files — REDACTED, REDACTED. 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:296— `!window.RED || !RED.events || !document.body` appears character-identically in 2 files — REDACTED, REDACTED. 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.
Anemic entity: APIKey backend/internal/repo/apikey.go:16— `APIKey` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysApiKey backend/internal/repo/apikey.go:45— `sysApiKey` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: AssetFile backend/internal/repo/asset.go:12— `AssetFile` is an aggregate/entity with 17 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: AssetBinding backend/internal/repo/asset.go:41— `AssetBinding` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: AsyncJob backend/internal/repo/async_job.go:18— `AsyncJob` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: Flow backend/internal/repo/flow.go:15— `Flow` is an aggregate/entity with 13 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: GatewayRoute backend/internal/repo/gateway.go:14— `GatewayRoute` is an aggregate/entity with 18 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: User backend/internal/repo/iam.go:17— `User` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: ResourceAction backend/internal/repo/iam.go:80— `ResourceAction` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysUserInfo backend/internal/repo/iam.go:93— `sysUserInfo` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysRoleInfo backend/internal/repo/iam.go:107— `sysRoleInfo` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysResourceInfo backend/internal/repo/iam.go:120— `sysResourceInfo` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysResourceAction backend/internal/repo/iam.go:138— `sysResourceAction` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: sysWorkspaceUser backend/internal/repo/iam.go:160— `sysWorkspaceUser` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: CreateTime backend/internal/repo/model_fields.go:11— `CreateTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: OnlyTime backend/internal/repo/model_fields.go:15— `OnlyTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: DeletedTimeField backend/internal/repo/model_fields.go:20— `DeletedTimeField` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: SoftTime backend/internal/repo/model_fields.go:30— `SoftTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: CreatorTime backend/internal/repo/model_fields.go:46— `CreatorTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: CreatorCreateTime backend/internal/repo/model_fields.go:56— `CreatorCreateTime` is an aggregate/entity with 1 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: OutboxEvent backend/internal/repo/outbox.go:12— `OutboxEvent` is an aggregate/entity with 12 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UnsLabel backend/internal/repo/uns_label.go:8— `UnsLabel` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UnsNamespaceNodeVersion backend/internal/repo/uns_namespace_node_version.go:16— `UnsNamespaceNodeVersion` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UnsNode backend/internal/repo/uns_node.go:14— `UnsNode` is an aggregate/entity with 21 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Anemic entity: UnsTemplate backend/internal/repo/uns_template.go:8— `UnsTemplate` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
Silent fallback default on error backend/internal/domain/audit/service.go:739— `marshalDetail` turns a non-nil `err` into `return "{}"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:712— `metricColumnNumber` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error backend/internal/domain/flow/service.go:425— `userNameMap` turns a non-nil `err` into `return map[int64]string{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:1804— `importTopicType` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:2678— `topicTypeFromNamespace` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error REDACTED:2686— `topicTypeByPart` turns a non-nil `err` into `return 0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error backend/internal/gateway/http.go:177— `flowIDFromReferer` turns a non-nil `err` into `return ""` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error backend/internal/logic/openapi/v1/flow/openapiFlowLegacyLogic.go:274— `legacyFlowNodes` turns a non-nil `err` into `return []any{}` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error backend/internal/logic/openapi/v1/uns/openapi_contract.go:990— `openapiSchemaFieldsJSON` turns a non-nil `err` into `return "[]"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default on error backend/internal/logic/openapi/v1/uns/openapi_contract.go:1001— `openapiStringMapJSON` turns a non-nil `err` into `return "{}"` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or return it. 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 `if` or in the doc comment, and the row stops firing.
Silent fallback default in catch frontend/apps/web/src/apis/core-api/home.ts:54— `getHomeClusterNodes` 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 frontend/apps/web/src/apis/core-api/home.ts:66— `getHomeRecents` 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 frontend/apps/web/src/components/cloud-sync/index.tsx:162— `parseTokenMetadata` 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 frontend/apps/web/src/pages/audit-log/presentation.ts:149— `getUnsPathFromDetail` 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 frontend/apps/web/src/pages/fleet-management/FleetNodeDetailPage.tsx:124— `parseFleetAuditDetail` 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 frontend/apps/web/src/pages/mqtt-auth/index.tsx:172— `parseTokenMetadata` 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.
IC1 · Incompleteness & stubs· Empty method body · ×4
Empty method body frontend/apps/web/src/contexts/tabs-context.ts:11— `onRefreshTab` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body frontend/apps/web/src/contexts/tabs-context.ts:12— `onCloseTab` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body frontend/apps/web/src/contexts/tabs-context.ts:13— `onCloseOtherTab` has an empty body — confirm it's an intentional no-op and not an unfinished method.
Empty method body frontend/apps/web/src/contexts/tabs-context.ts:14— `onRemoveTab` has an empty body — confirm it's an intentional no-op and not an unfinished method.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×3
Projects may be oversized for their cohesion frontend/apps/web/package.json:1— `frontend/apps/web` (79484 LoC, 762 module-visible types across 181 directories) overshoots its size bounds. 3 of 7 build unit(s) (Go, npm) overshoot their size bounds, lowering Project Cohesion to 1.9/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 REDACTED:1— `backend` (29667 LoC, 312 module-visible types across 61 directories) overshoots its size bounds. 3 of 7 build unit(s) (Go, npm) overshoot their size bounds, lowering Project Cohesion to 1.9/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 frontend/apps/anchor/package.json:1— `frontend/apps/anchor` (7477 LoC, 71 module-visible types across 16 directories) overshoots its size bounds. 3 of 7 build unit(s) (Go, npm) overshoot their size bounds, lowering Project Cohesion to 1.9/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.
X7 · Silent fallback defaults· Pending state with no failure state · ×2
Pending state with no failure state frontend/apps/web/src/App.tsx:255— The view draws `Loading...` under `loading && ! isLaunchpadSite`, 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 frontend/apps/web/src/layout/custom-menu-header/components/LogoImg.tsx:50— The view draws `<LoadingDots color= />` under `! imageSrc`, but `imageSrc` 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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: frontend/apps/web/src/pages/collection-flow/index.tsx, frontend/apps/web/src/pages/event-flow/index.tsx, REDACTED, frontend/apps/web/src/pages/open-data/index.tsx, frontend/apps/web/src/pages/uns/components/import-modal/ImportDom.tsx, frontend/apps/web/src/pages/uns/components/import-modal/JsonDom.tsx, frontend/apps/web/src/pages/open-data/ServerTabs.tsx. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 2 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 (9 single-owned of 385 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; 385 of the 840 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: frontend/apps/web/src/pages/routing-management/index.tsx, frontend/apps/web/src/pages/uns/components/use-create-modal/path-utils.ts.
Documentation: no map of the repository's parts README.md:1— The repository has 6 units (`frontend`, `anchor`, `web`, `anchor-bridge`, `scripts`, ...); `README.md` and the documents it links name none of them. Add a short list of the parts and what each does.
No ADRs found backend/backend.go:4— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `backend/backend.go` makes this repository a deployable product (line 4).
D21 · Naming Consistency· `durationMS` spells `MS` where 17 names in the project spell it `Ms` · ×1
`durationMS` spells `MS` where 17 names in the project spell it `Ms` backend/internal/repo/migration_versioned.go:225— 17 of 18 names in project backend spell the token `Ms` (17 of 18; unit: names in project backend containing `Ms`). Peers: DataIngestConf.FlushIntervalMs (backend/internal/config/config.go:75); HistoryQuery.StartMs (backend/internal/domain/dataingest/history_query.go:27); HistoryQuery.EndMs (backend/internal/domain/dataingest/history_query.go:28); HistoryQuery.IntervalMs (backend/internal/domain/dataingest/history_query.go:34); historyQueryMeta.RequestedIntervalMs (backend/internal/domain/dataingest/history_query.go:43). Rename to `durationMs`. [rule N6]
redundant comment frontend/apps/web/src/pages/uns/types.tsx:14— "type?: number | null;" repeats the code it sits on: 3 of its 3 words (type, number, null) are already in `pathType?: number | null;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D28 · Secrets (history)· Rotate the exposed credentials · ×1
D34 · Knowledge Freshness· Further orphaned files (smaller) · ×1
Further orphaned files (smaller) — 113 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: frontend/apps/web/src/components/pro-tree-select/ProTreeSelect.tsx, frontend/apps/web/src/pages/uns/components/export-modal/treeStore.tsx, frontend/apps/web/src/pages/localization/components/use-locales-settings/index.tsx, frontend/apps/web/src/pages/uns/components/use-create-modal/form-step/index.tsx, frontend/apps/web/src/components/pro-card/ProCard.tsx, frontend/apps/web/src/pages/localization/index.tsx, frontend/apps/web/src/components/code-snippet/index.tsx, frontend/apps/web/src/pages/routing-management/components/plugins-tab/index.tsx (and 105 more) (118 orphaned of 385 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; 385 of the 840 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.
No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
No tests/ separation — Tests aren't where this ecosystem separates them — a `_test.go` file beside the code it tests is the convention, and none is present.
No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No dependency-update automation frontend/apps/anchor/package.json:11— `frontend/apps/anchor/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X2 · Cancellation propagation· Not all functions that make a request accept a context.Context or an AbortSignal · ×1
Not all functions that make a request accept a context.Context or an AbortSignal — Only 8/9 functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial) accept a context.Context or an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, a cancelled request, a shutdown, an expired deadline. Take a `signal` (Go: `ctx context.Context`) 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 — 1/5 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.
Null assertions (`!`) override strict null checking — ~0.6 `!` null assertions per 1k TypeScript source lines — 52 assertion(s) across the 92657 source line(s) of the 557 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: REDACTED (6), frontend/apps/anchor/src/viewer/use-scene-editor.ts (5), frontend/apps/web/src/pages/uns/store/utils.ts (4). 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.
Outdated: github.com/alicebob/miniredis/v2 — `github.com/alicebob/miniredis/v2` is required at v2.38.0 in REDACTED, but v2.40.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/alicebob/miniredis/v2@v2.40.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/golang-jwt/jwt/v5 — `github.com/golang-jwt/jwt/v5` is required at v5.3.0 in REDACTED, but v5.3.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/golang-jwt/jwt/v5@v5.3.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/jackc/pgx/v5 — `github.com/jackc/pgx/v5` is required at v5.7.6 in REDACTED, but v5.13.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/jackc/pgx/v5@v5.13.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/minio/minio-go/v7 — `github.com/minio/minio-go/v7` is required at v7.0.88 in REDACTED, but v7.4.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/minio/minio-go/v7@v7.4.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/moby/moby/api — `github.com/moby/moby/api` is required at v1.55.0 in REDACTED, but v1.57.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/moby/moby/api@v1.57.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/moby/moby/client — `github.com/moby/moby/client` is required at v0.5.0 in REDACTED, but v0.6.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/moby/moby/client@v0.6.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/pelletier/go-toml/v2 — `github.com/pelletier/go-toml/v2` is required at v2.2.2 in REDACTED, but v2.4.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/pelletier/go-toml/v2@v2.4.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/redis/go-redis/v9 — `github.com/redis/go-redis/v9` is required at v9.14.0 in REDACTED, but v9.23.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/redis/go-redis/v9@v9.23.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/stretchr/testify — `github.com/stretchr/testify` is required at v1.11.1 in REDACTED, but v1.12.1 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/stretchr/testify@v1.12.1 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: github.com/zeromicro/go-zero — `github.com/zeromicro/go-zero` is required at v1.9.0 in REDACTED, but v1.11.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get github.com/zeromicro/go-zero@v1.11.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/crypto — `golang.org/x/crypto` is required at v0.51.0 in REDACTED, but v0.59.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/crypto@v0.59.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: golang.org/x/sys — `golang.org/x/sys` is required at v0.45.0 in REDACTED, but v0.50.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get golang.org/x/sys@v0.50.0 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/driver/postgres — `gorm.io/driver/postgres` is required at v1.6.0 in REDACTED, but v1.6.3 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/driver/postgres@v1.6.3 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: gorm.io/gorm — `gorm.io/gorm` is required at v1.31.1 in REDACTED, but v1.31.2 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get gorm.io/gorm@v1.31.2 && go mod tidy` and commit the updated REDACTED and go.sum.
Outdated: modernc.org/sqlite — `modernc.org/sqlite` is required at v1.46.1 in REDACTED, but v1.62.0 is the module's current release — so this build is missing every fix published since, including any security fix. Run `go get modernc.org/sqlite@v1.62.0 && go mod tidy` and commit the updated REDACTED and go.sum.
doc comments repeat the names frontend/apps/web/src/utils/storage.ts:4— 0 of 5 documented parameters and 0 of 9 summaries in `web` only repeat the member or parameter name (e.g. "" for `key`). 4 documentation tag(s) are empty. 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.
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 1 file(s) — `frontend/apps/web/src/pages/vision/components/CameraFormModal.tsx` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
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.
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.
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.
Run 01a1e4ff-eb27-782b-aedd-315861f9765e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 151 · Warnings: 1406 · Recommendations: 225 · Info: 16 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 15:35 UTC.
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.