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

DavidAlphaFox/aihtml

Measured 15 November 2026, 08:02 UTC, at code version b4d3439

CAI score 29out of 100 At risk Up 2 since the last survey

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 medium codebase: 74,589 lines of product code in 3 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Event-Driven, 10

Findings by how serious they are

89 critical 741 serious 58 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 08:02 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 ▸

52of 52 dimensions measured by tools.
879of 888 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
52dimensions across 9 lenses, read from 74,589 lines of product code in 3 projects.
Chapters

Executive summary

DavidAlphaFox/aihtml is rated At risk because critical security findings are open, most of them in the packages it uses. It scores 29 out of 100, which the At risk rating leaves unchanged.

Event-Driven, at 10, is the weakest lens and counts most in the score. The best first step is stopping the event handlers from waiting on other services, worth about 16 points. Raising Event-Driven to 70 would lift the score to about 44.

Six known security holes in the packages the code depends on can be used by attackers. Two places in the code run text as code, which an attacker could use, and thirty-nine controls can't be used without a mouse. Updating the vulnerable packages, replacing text run as code with direct calls and making the controls work with a keyboard would close these risks. The 21 form fields without a label need a label.

The product code is 74,589 lines, about €77,000 to rebuild.

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

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Event-Driven 10 · counts for 45%Accessibility 33 · counts for 25%Production Readiness 36 · counts for 14%Code Health 59 · counts for 8%Maturity 67 · counts for 4%Security and Compliance 71 · counts for 2%Performance 85 · counts for 1%Architecture 90 · counts for 1%Event Sourcing 100 · counts for 0%

If Event-Driven rose from 10 to 70, the lowest score rated Strong, the score would rise from 29 to about 44.

Code composition: what the lines of code are
Product code 83%Tests 17%
New since the last survey: 115 findings

These 115 critical or serious findings weren't in the previous survey, on 30 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Code Duplication · Edited copy of a member (13 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copy of a member (36 corresponding lines) apps/aihtml/src/aihtml_datepicker.erl
  • Code Duplication · Edited copy of a member (38 corresponding lines) apps/aihtml/src/aihtml_cascader.erl
  • Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) apps/aihtml/src/aihtml_drawer.erl
  • Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl
  • Code Duplication · Edited copy of a member (19 corresponding lines) apps/aihtml/src/aihtml_dropdown_button.erl
  • Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) apps/aihtml/src/aihtml_input.erl
  • Code Duplication · Edited copy of a member (12 corresponding lines) apps/aihtml/src/aihtml_cascader.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) apps/aihtml/src/aihtml_lib_markdown.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_listbox.erl
  • Code Duplication · Edited copy of a member (12 corresponding lines) apps/aihtml/src/aihtml_checkbox.erl
  • Code Duplication · Edited copy of a member (21 corresponding lines) apps/aihtml/src/aihtml_donut_chart.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) apps/aihtml/src/aihtml_area_chart.erl
  • Code Duplication · Edited copy of a member (9 corresponding lines) apps/aihtml/src/aihtml_checkbox_group.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_heatmap_calendar.erl
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) apps/aihtml/src/aihtml_checkbox.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_lib_chart.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copy of a member (14 corresponding lines) apps/aihtml/src/aihtml_checkbox_group.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_activity_bar.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) apps/aihtml/src/aihtml_combobox.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) apps/aihtml/src/aihtml_lib_markdown.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_lib_layout.erl
  • Code Duplication · Edited copy of a member (9 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) apps/aihtml/src/aihtml_markdown_editor.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_lib_button.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_lib_markdown.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_lib_display.erl
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) apps/aihtml/src/aihtml_dock_layout.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_combobox.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_i18n.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_lib_choice.erl
  • Code Duplication · Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_datagrid.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_lib_overlay.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml/src/aihtml_lib_choice.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_datagrid.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_action.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml/src/aihtml_password_input.erl
  • Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) apps/aihtml/src/aihtml_area_chart.erl
  • Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml/src/aihtml_lib_scroll.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_button.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_datagrid.erl
  • Code Duplication · Edited copies of one member (4 members, 3+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl
  • Code Duplication · Edited copies of one member (3 members, 6+ corresponding lines) apps/aihtml/src/aihtml_datagrid.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) apps/aihtml/src/aihtml_timepicker.erl
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) apps/aihtml/src/aihtml_activity_bar.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copies of one member (3 members, 3+ corresponding lines) apps/aihtml/src/aihtml_lib_form.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copies of one member (5 members, 2+ corresponding lines) apps/aihtml/src/aihtml_dropdownlist.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) apps/aihtml/src/aihtml_sup.erl
  • Code Duplication · Edited copies of one member (8 members, 3+ corresponding lines) apps/aihtml/src/aihtml_colorpicker.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_combobox.erl
  • Code Duplication · Edited copies of one member (4 members, 2+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_pivotgrid.erl
  • Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_chart.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) apps/aihtml_cowboy/src/aihtml_cowboy_events.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) apps/aihtml/src/aihtml_calendar.erl
  • Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) apps/aihtml/src/aihtml_dock_layout.erl
  • Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_dock.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_action.erl
  • Code Duplication · Edited copies of one member (5 members, 1+ corresponding lines) apps/aihtml/src/aihtml_lib_layout.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml.erl
  • Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_date.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_lib_layout.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_datagrid.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_badge.erl
  • Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) apps/aihtml_example/src/aihtml_example_calendar_app.erl
  • Code Duplication · Edited copy of a member (8 corresponding lines) apps/aihtml_example/src/aihtml_example_file_manager.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_activity_bar.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_checkbox.erl
  • Code Duplication · Edited copy of a member (6 corresponding lines) apps/aihtml_example/src/aihtml_example_dashboard.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_area_chart.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_sheet.erl
  • Code Duplication · Edited copy of a member (7 corresponding lines) apps/aihtml_example/src/aihtml_example_actions.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_cascader.erl
  • Code Duplication · Edited copy of a member (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl
  • Code Duplication · Edited copy of a member (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl
  • Code Duplication · Edited copy of a member (3 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_tree.erl
  • Code Duplication · Edited copy of a member (2 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_area_chart.erl
  • Dependency Vulnerabilities · REDACTED
  • Cyclomatic Complexity · Complex function render (cyclomatic 23, cognitive 34) REDACTED
  • Cyclomatic Complexity · Complex function mount (cyclomatic 23, cognitive 23) apps/aihtml/assets/js/components/markdown_editor.ts
  • Cyclomatic Complexity · Complex function matchCond (cyclomatic 23, cognitive 13) apps/aihtml/assets/js/components/datatable.ts
  • Cyclomatic Complexity · Complex function #keydown (cyclomatic 23, cognitive 13) apps/aihtml/assets/js/components/datatable.ts
  • Cyclomatic Complexity · Complex function dragEnd (cyclomatic 22, cognitive 36) apps/aihtml/assets/js/components/scheduler.ts
  • Cyclomatic Complexity · Complex function renderCard (cyclomatic 22, cognitive 21) REDACTED
  • Cyclomatic Complexity · Complex function keydown (cyclomatic 21, cognitive 25) apps/aihtml/assets/js/components/sortable.ts
  • Cyclomatic Complexity · Complex function expand (cyclomatic 21, cognitive 22) apps/aihtml/assets/js/components/_lib_rrule.ts
  • Cyclomatic Complexity · Complex function #syncLayout (cyclomatic 21, cognitive 22) apps/aihtml/assets/js/components/pivotgrid.ts
  • Cyclomatic Complexity · Complex function #morphNode (cyclomatic 21, cognitive 20) apps/aihtml/assets/js/runtime/swap.ts
  • Cyclomatic Complexity · Complex function calNormalize (cyclomatic 21, cognitive 19) apps/aihtml/assets/js/components/calendar.ts
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 20) apps/aihtml/assets/js/components/pivotgrid.ts
  • Cyclomatic Complexity · Complex function key (cyclomatic 20, cognitive 18) apps/aihtml/assets/js/components/transfer.ts
  • Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 16) apps/aihtml/assets/js/components/listmenu.ts
  • Cyclomatic Complexity · Complex function dragEnd (cyclomatic 19, cognitive 32) apps/aihtml/assets/js/components/calendar.ts

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 616 findings

These 616 critical or serious findings were in the previous survey, on 30 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · render-markdown.taskListRule (cyclomatic 24) scripts/render-markdown.mjs
  • Cognitive Complexity · render-markdown.taskListRule (cognitive 46) scripts/render-markdown.mjs
  • Cognitive Complexity · mustache.tokenize (cognitive 26) REDACTED
  • Static Analysis (SAST) · Medium: insecure-request REDACTED
  • Dependency Vulnerabilities · Medium CVE: EEF-[CVE redacted] REDACTED
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/dropdown_button.ts
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/expander.ts
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/formatted_input.ts
  • Code Duplication · Duplicated block (7 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/number_input.ts
  • Code Duplication · Duplicated block with local edits (7 matched lines × 2 locations) apps/aihtml/assets/js/components/responsive_panel.ts
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/steps.ts
  • Code Duplication · Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/runtime/swap.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/_lib_layout.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/_lib_overlay.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/activity_bar.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/calendar.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/calendar.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/cascader.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/combobox.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/command.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/datepicker.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/datetime_input.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/dock_layout.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/docking.ts
  • Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) apps/aihtml/assets/js/components/dropdownlist.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (6 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/pivotgrid.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/repeat_button.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/ribbon.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/scrollbar.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) apps/aihtml/assets/js/components/scrollview.ts
  • Code Duplication · Duplicated block (6 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (6 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) apps/aihtml/assets/js/components/_lib_overlay.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/colorpicker.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/datagrid.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/datepicker.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/dock_layout.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/dragdrop.ts
  • Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) apps/aihtml/assets/js/components/listmenu.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/markdown_editor.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) apps/aihtml/assets/js/components/pagination.ts
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/pivotgrid.ts
  • Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (5 lines × 2 locations) apps/aihtml/assets/js/components/tree.ts
  • Code Duplication · Duplicated block with local edits (5 matched lines × 2 locations) apps/aihtml/assets/js/runtime/actions.ts
  • Test Coverage · No test reaches this file REDACTED
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/datagrid.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/pivotgrid.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/markdown_editor.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/dock_layout.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/_lib_chart.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/calendar.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/scheduler.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/datatable.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/_lib_overlay.ts
  • Test Coverage · No test reaches this file REDACTED
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/datetime_input.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/runtime/actions.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/menu.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/datepicker.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/upload.ts
  • Test Coverage · No test reaches this file REDACTED
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/gantt.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/combobox.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/ribbon.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/cascader.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/sortable.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/colorpicker.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/runtime/swap.ts
  • Test Coverage · No test reaches this file REDACTED
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/docking.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/treegrid.ts
  • Test Coverage · No test reaches this file REDACTED
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/scrollbar.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/swimlane.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/formatted_input.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/tree.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/dropdownlist.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/range_selector.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/slider.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/dragdrop.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/pagination.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/tooltip.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/toolbar.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/_lib_table.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/runtime/behaviours.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/listmenu.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/runtime/controller.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/listbox.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/window.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/scrollview.ts
  • Test Coverage · No test reaches this file apps/aihtml/assets/js/components/navigationbar.ts
Rebuild cost: about €77,000 · Estimate
Cost to rebuild€25,000 to €130,000, for 424 to 1,346 hours of work, about 0.5 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 29. 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.
SizeMedium: 74,589 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
Raises the score by about 16 points · Medium effort · Handler temporal coupling
2
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.
Raises the score by about 3 points · Medium effort · Visual & motion safety
3
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 3 points · Medium effort · Keyboard semantics

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 €77,000 to build again, about 0.5 person-years of work. Its weakest lens is Event-Driven, at 10 (Critical). Event-Driven is about whether the parts of the system can rely on the messages they send each other. Because the weakest lens counts most in the score, work on Event-Driven also moves the score most.
Based on: the rebuild estimate · the Event-Driven grade · how much each lens counts
What to do: Start with the Event-Driven actions in Top priorities.
If you do one thing first · First action
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free. Of all the actions in this report, it raises the score most for the work it takes: about 16 points for medium effort. 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 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 196,484 lines over the last 90 days, which is about 796,852 lines a year. At that pace, the extra work comes to an estimated 81.5 to 488.8 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 · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch aihtml aihtml aihtml_cowboy aihtml_cowboy aihtml_cowboy->aihtml

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.

239 modules, with 86 dependencies between them. One loop runs through 2 of the modules, marked above the diagonal.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 components._lib_choice2 components._lib_dnd3 components._lib_dock4 components._lib_rrule5 components.button_group6 components.checkbox7 components.colorpicker8 components.datatable9 components.dock_layout10 components.docking11 components.gantt12 components.range_selector13 runtime.controller14 runtime.dom15 components._lib_picker16 components._lib_table17 components.calendar18 components.checkbox_group19 components.datagrid20 components.datepicker21 components.datetime_input22 components.markdown_editor23 components.scheduler24 components.scrollbar25 components.slider26 components.timepicker27 runtime28 runtime.behaviours29 runtime.float30 runtime.push31 components._lib_button32 components._lib_overlay33 components.node_graph34 components.pivotgrid35 components.treegrid36 core37 runtime.swap38 components39 runtime.actions40 runtime.fetch
1 components._lib_choice
2 components._lib_dnd
3 components._lib_dock
4 components._lib_rrule
5 components.button_group
6 components.checkbox
7 components.colorpicker
8 components.datatable
9 components.dock_layout
10 components.docking
11 components.gantt
12 components.range_selector
13 runtime.controller
14 runtime.dom
15 components._lib_picker1
16 components._lib_table1
17 components.calendar1
18 components.checkbox_group2
19 components.datagrid1
20 components.datepicker1
21 components.datetime_input1
22 components.markdown_editor1
23 components.scheduler1
24 components.scrollbar1
25 components.slider1
26 components.timepicker11
27 runtime21
28 runtime.behaviours1
29 runtime.float1
30 runtime.push1
31 components._lib_button11
32 components._lib_overlay2
33 components.node_graph15
34 components.pivotgrid13
35 components.treegrid1
36 core1112
37 runtime.swap11
38 components13112110143531563324112412132
39 runtime.actions1111
40 runtime.fetch111
Uses a module listed above itPart of a loopThe module itself
1 components._lib_choice2 components._lib_dnd3 components._lib_dock4 components._lib_rrule5 components.button_group6 components.checkbox7 components.colorpicker8 components.datatable9 components.dock_layout10 components.docking11 components.gantt12 components.range_selector13 runtime.controller14 runtime.dom15 components._lib_picker16 components._lib_table17 components.calendar18 components.checkbox_group19 components.datagrid20 components.datepicker21 components.datetime_input22 components.markdown_editor23 components.scheduler24 components.scrollbar25 components.slider26 components.timepicker27 runtime28 runtime.behaviours29 runtime.float30 runtime.push31 components._lib_button32 components._lib_overlay33 components.node_graph34 components.pivotgrid35 components.treegrid36 core37 runtime.swap38 components39 runtime.actions40 runtime.fetchcomponents._lib_choice1components._lib_dnd2components._lib_dock3components._lib_rrule4components.button_group5components.checkbox6components.colorpicker7components.datatable8components.dock_layout9components.docking10components.gantt11components.range_selector12runtime.controller13runtime.dom14components._lib_picker15components._lib_table16components.calendar17components.checkbox_group18components.datagrid19components.datepicker20components.datetime_input21components.markdown_editor22components.scheduler23components.scrollbar24components.slider25components.timepicker26runtime27runtime.behaviours28runtime.float29runtime.push30components._lib_button31components._lib_overlay32components.node_graph33components.pivotgrid34components.treegrid35core36runtime.swap37components38runtime.actions39runtime.fetch4011121111111112111111215131111211131121101435315633241124121321111111+199 more modules (most-connected shown)

At a glance — Code Health · 59% · Adequate ·

At a glance — Architecture · 90% · Adequate · gated by D26 ·

At a glance — Maturity · 67% · Adequate · gated by M2 ·

At a glance — Readiness · 36% · Weak · gated by P1, P3 ·

At a glance — Security · 71% · Checked 2 of 9 ·

At a glance — Event-Driven · 10% · Critical · gated by ED1 ·

At a glance — Event Sourcing · 100% · Exemplary ·

At a glance — Accessibility · 33% · Weak · gated by AC4, AC6 ·

At a glance — Performance · 85% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection12High / Critical
A03:2025 — Software Supply Chain Failures7High / Critical

Roadmap

Top priorities: Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free; 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; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.

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

Do thisHelpsEffortDimension
Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.+15.6 ptsMediumHandler temporal coupling
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.+2.6 ptsMediumVisual & motion safety
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.6 ptsMediumKeyboard semantics
Add a CI workflow that builds and runs the test suite on every push/PR.+2.0 ptsMediumCI/CD gates
Run what this repository's stack ships: dialyzer or elvis — 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.+2.0 ptsMediumSecurity & performance tooling
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with rebar.config.+0.6 ptsLowADR Quality
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+1.2 ptsMediumForms & labels
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+1.1 ptsMediumPage structure

File quality

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

FileScoreBandWorst signal
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.6MixedDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedDependency Vulnerabilities: High CVE: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
apps/aihtml/assets/js/components/dock_layout.ts7.0MixedCyclomatic Complexity: DockLayoutController.setup (cyclomatic 86)
apps/aihtml/assets/js/components/pivotgrid.ts7.0MixedCyclomatic Complexity: PivotgridController.setup (cyclomatic 65)
apps/aihtml/src/aihtml_datagrid.erl7.0MixedCyclomatic Complexity: aihtml_datagrid.render (cyclomatic 46)
apps/aihtml/assets/js/components/datagrid.ts7.0MixedCyclomatic Complexity: DatagridController.#keydown (cyclomatic 46)
apps/aihtml/assets/js/components/scheduler.ts7.0MixedCyclomatic Complexity: SchedulerController.setup (cyclomatic 43)
apps/aihtml/src/aihtml_gantt.erl7.0MixedCyclomatic Complexity: aihtml_gantt.render (cyclomatic 39)
apps/aihtml/assets/js/components/markdown_editor.ts7.0MixedCyclomatic Complexity: SlashMenu.plugin (cyclomatic 31)
apps/aihtml/src/aihtml_lib_markdown.erl7.0MixedCyclomatic Complexity: aihtml_lib_markdown.r_list (cyclomatic 26)
apps/aihtml/src/aihtml_calendar.erl7.0MixedGod Classes: FileTooLong: src/aihtml_calendar.erl
apps/aihtml/src/aihtml_datatable.erl7.0MixedCyclomatic Complexity: aihtml_datatable.render_datatable (cyclomatic 81)
apps/aihtml/assets/js/components/calendar.ts7.0MixedCyclomatic Complexity: CalendarController.dragStart (cyclomatic 27)

How the grades work

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

Critical — 89

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 — 741

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 — 58

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

Could not be resolved — 25

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 52 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 52 dimensions across the health lenses
D1D2D3D4D5D13D14D15D17D19D20D24D26D27D28D29D30D34D35D43AC2AC3AC4AC5AC6AX10AX3AX4ED1ES1M1M2M3M4P1P10P2P3P6PF3R1R10R2R3R5R6R7R8R9X28X3X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1de3a-4e93-7a19-8753-3442d2c15b33.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — 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. Coverage NOT MEASURED: test source is present (.erl, .mjs, .js) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — 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. Test source is present (.erl, .mjs, .js) and this repository declares a rebar3 project (repository root, 125 test files), but it was not re-run: the analyzer environment could not run it. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 1 package.json manifest(s) and its 1 committed lockfile(s) WERE read; what went unanswered is the currency half, because it grades the production `dependencies` a lockfile resolves and these manifests declare none — only 23 devDependencies, which D12 does not grade. So registry.npmjs.org was never asked, and there was nothing here for it to grade. This is a true statement about the repository and NOT a gap on our side: the lockfile was resolved, and no reader we could write would find a production dependency in it.
  • 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 package.json, but the licence verdict published here was taken over its Hex package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (2 contributor(s) across 676 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 1 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D21 Naming Consistency — 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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — 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. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (apps/aihtml_cowboy/src/aihtml_cowboy.app.src), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • 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 — 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. Tracing effort is measured over resolved call sites, and all 563 sampled here came from .erl files. This repository's .ts source is a material share of its production lines and contributed none, so the score above is a verdict about the part that was read. Not a finding that the unread half navigates well — it is unmeasured.
  • 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. `apps/aihtml/assets/js/components/dragdrop.ts`, `apps/aihtml/assets/js/components/pivotgrid.ts`, `apps/aihtml/assets/js/components/sortable.ts`, `apps/aihtml/assets/js/runtime/vendor.ts`, `apps/aihtml/priv/static/js/markdown_editor-BH6-jFzM.js`, … (+7 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • 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. 7 further occurrence(s) are not listed individually; the score already reflects all 47.
  • AC6 Visual & motion safety — 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. 390 further occurrence(s) are not listed individually; the score already reflects all 430.
  • AX6 Interface segregation — 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.
  • AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 35 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • 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.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Erlang is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Erlang is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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. 48 further occurrence(s) are not listed individually; the score already reflects all 88.
  • 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. 93 further occurrence(s) are not listed individually; the score already reflects all 133.
  • 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.
  • X12 Unreachable branch — 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.
  • X16 Unfloored truncation loop — 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.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X21 Side-effecting pattern guard — 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.
  • X24 Document value interpolated into markup unescaped — 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 — 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.
  • X30 Support guard that admits what it rejects — 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.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X7 Silent fallback defaults — 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. X7 measured the part of this repository it reads (C#, Python, TypeScript/JavaScript, Rust, Go, Java, Kotlin, Scala, PHP, Ruby, Swift and Dart), and its Erlang source is outside the check's reach, so the card covers only part of the product. That is a gap in this analyzer's language reach — not a finding that the unread source is free of silent defaults.

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.
  • D13 Secret Scanning: Secret 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.
  • 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.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • 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.
  • 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.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.1 / 10Adequate✓ Tool-verified

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

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

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

186 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was DockLayoutController.setup at 86. A further 3 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 aihtml_html.add_attr at 17 — they are counted neither in the figure above nor in this dimension's score.

DockLayoutController.setup (cyclomatic 86)apps/aihtml/assets/js/components/dock_layout.ts:620
aihtml_datatable.render_datatable (cyclomatic 81)apps/aihtml/src/aihtml_datatable.erl:152
NodeGraphController.wireViewport (cyclomatic 78)REDACTED:1987
PivotgridController.setup (cyclomatic 65)apps/aihtml/assets/js/components/pivotgrid.ts:734
MaskedInputController.setup (cyclomatic 52)REDACTED:83

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

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with DockLayoutController.setup (cyclomatic 86), aihtml_datatable.render_datatable (cyclomatic 81), NodeGraphController.wireViewport (cyclomatic 78). — 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 4 together lifts Cyclomatic Complexity from 5.1 to about 5.7/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.

D2 · Cognitive Complexity5.0 / 10Weak✓ Tool-verified

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

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

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

183 method(s) exceeded the cognitive complexity threshold of 15; the worst was PivotgridController.setup at 96.

PivotgridController.setup (cognitive 96)apps/aihtml/assets/js/components/pivotgrid.ts:734
aihtml_datatable.render_datatable (cognitive 91)apps/aihtml/src/aihtml_datatable.erl:152
NodeGraphController.wireViewport (cognitive 91)REDACTED:1987
DockLayoutController.setup (cognitive 81)apps/aihtml/assets/js/components/dock_layout.ts:620
MenuController.#keydown (cognitive 73)apps/aihtml/assets/js/components/menu.ts:405

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

What to do

  1. Bring the 6 bodies over 60 down to 60 or less in Cognitive Complexity — start with PivotgridController.setup (cognitive 96), aihtml_datatable.render_datatable (cognitive 91), NodeGraphController.wireViewport (cognitive 91). — 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 6 together lifts Cognitive Complexity from 5.0 to about 5.7/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.

D3 · God Classes8.4 / 10Strong✓ Tool-verified

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

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

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

33 god class(es) detected.

FileTooLong: src/aihtml_lib_markdown.erl · ×18apps/aihtml/src/aihtml_lib_markdown.erl
TooManyMethods: DatagridController · ×7apps/aihtml/assets/js/components/datagrid.ts:394
TooManyFunctions: aihtml_action · ×5apps/aihtml/src/aihtml_action.erl:46
MethodTooLong: DockLayoutController.setup · ×3apps/aihtml/assets/js/components/dock_layout.ts:620

What to do

  1. Resolve the 18 FileTooLong finding(s) in God Classes — start with aihtml_lib_markdown.erl, REDACTED, aihtml.erl. — One of this dimension's main actionable groups (18 warning-level).
  2. Resolve the 7 TooManyMethods finding(s) in God Classes — start with datagrid.ts, REDACTED, pivotgrid.ts. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 5 TooManyFunctions finding(s) in God Classes — start with aihtml_action.erl, aihtml_dock_layout.erl, aihtml_tile_layout.erl. — One of this dimension's main actionable groups (5 warning-level).

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

D4 · Code Duplication9.0 / 10Stronggated by 114 serious findings✓ Tool-verified

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.

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

27 duplicated block group(s) detected. 2.4 % of the production lines (1,785 of 74,589) are in a reported copy. A further 87 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 17 of the 114 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population. Measured on part of this repository only: .ts (41% 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 (5 corresponding lines) · ×9apps/aihtml/src/aihtml_lib_display.erl:61
Edited copy of a member (2 corresponding lines) · ×8apps/aihtml/src/aihtml_calendar.erl:460
Duplicated block (6 lines × 2) · ×8apps/aihtml/src/aihtml_command.erl:265
Edited copy of a member (11 corresponding lines) · ×7apps/aihtml/src/aihtml_listbox.erl:122
Edited copy of a member (4 corresponding lines) · ×7apps/aihtml/src/aihtml_calendar.erl:203

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

What to do

  1. Resolve the 9 Edited copy of a member (5 corresponding lines) finding(s) in Code Duplication — start with aihtml_combobox.erl (2), aihtml_lib_display.erl, aihtml_lib_choice.erl. — One of this dimension's main actionable groups (9 warning-level).
  2. Resolve the 8 Edited copy of a member (2 corresponding lines) finding(s) in Code Duplication — start with aihtml_calendar.erl (3), aihtml_pivotgrid.erl, aihtml_action.erl. — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 8 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with aihtml_command.erl, aihtml_heatmap_calendar.erl, aihtml_lib_form.erl. — One of this dimension's main actionable groups (8 warning-level).

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

D5 · Coupling6.0 / 10Adequate✓ Tool-verified

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

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

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

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

2 production modules (OTP), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 1 module(s) off the main sequence.

Off the main sequence: aihtml

What to do

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

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 of 3 shipped Hex package(s) use a banned license. Licences were resolved from hex.pm over the packages a consumer installs — this repository's REDACTED, which is already the transitive closure a consumer installs. rebar3 writes that lock for the DEFAULT profile ONLY, so a dependency declared inside `{profiles, [{test, [{deps, […]}]}]}` has no entry in it and is excluded here for the reason the Mix arm excludes an `only: [:dev, :test]` declaration: it is not installed by anything that depends on this repository. Each licence is the one hex.pm publishes for the package's current release. A further 1 package(s) the closure reaches resolve from git, a path or a local override and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's Hex package dependencies and nothing else. The repository also declares package.json, 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

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

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

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

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

Top hotspots: apps/aihtml/src/aihtml_range_selector.erl (7×30=210); apps/aihtml/assets/js/components/cascader.ts (5×35=175); apps/aihtml/assets/js/components/combobox.ts (5×32=160)

Hotspot: apps/aihtml/src/aihtml_range_selector.erl · ×16apps/aihtml/src/aihtml_range_selector.erl:67

What to do

  1. Resolve the 16 Hotspot finding(s) in Churn × Complexity Hotspots — start with aihtml_range_selector.erl, cascader.ts, combobox.ts. — One of this dimension's main actionable groups (16 warning-level).

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 deducted task-comment markers across 74589 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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

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

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

1 of 1 documentation facets pass in full. 4 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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.

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

No architecture decision records were found.

No ADRs foundrebar.config:31

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with rebar.config. — 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.

D24 · Comment Value9.9 9.7 / 10Exemplary✓ Tool-verified

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

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

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

1 of 941 judged comments only repeat the code they sit on (0.1 %). 31 comment(s) in another language or script were not judged.

redundant commentapps/aihtml/assets/js/components/notification.ts:61

✓ On the Gold path — maintain.

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

D26 · Project Cohesion3.3 / 10Weak✓ Tool-verified

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

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

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

1 of 3 build units (npm, rebar3) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

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

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

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

0 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated. Measured over the .erl source only — this repository's .ts was not sampled for call sites, so this score covers part of the tree, not all of it.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)4.2 / 10Weak✓ Tool-verified

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

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

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

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

12 finding(s): 0 critical, 2 high, 10 medium, 0 low. semgrep hit a parse error in 18 file(s) — `apps/aihtml/assets/js/components/dragdrop.ts` (line 91, line 161, line 196), `apps/aihtml/assets/js/components/pivotgrid.ts` (line 252), `apps/aihtml/assets/js/components/sortable.ts` (line 206, line 271, line 280), `apps/aihtml/assets/js/runtime/vendor.ts` (line 53), `apps/aihtml/priv/static/js/calendar-Cu5csNDk.js`, … (+13 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

What to do

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

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

D30 · Dependency Vulnerabilities5.4 / 10Adequate✓ Tool-verified

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

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

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

7 finding(s): 1 critical, 5 high, 1 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

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

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 309 of the 527 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels5.1 / 10Adequate✓ 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 control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×2) — REDACTED:1464, apps/aihtml_example/priv/dashboard_pages/banking.html:1
  • This <label> has no for 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 for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×17) — apps/aihtml_example/priv/dashboard_pages/blog-create.html:1, apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1, apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×19) — apps/aihtml_example/priv/dashboard_pages/blog-create.html:1, apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1, apps/aihtml_example/priv/dashboard_pages/blog.html:1, …
  • 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). (×2) — apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1, apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1

What to do

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

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

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

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

  • Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one. (×19) — apps/aihtml_example/priv/dashboard_pages/analytics.html:1, apps/aihtml_example/priv/dashboard_pages/blog-create.html:1, apps/aihtml_example/priv/dashboard_pages/blog-detail.html:1, …
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — apps/aihtml_example/priv/dashboard_pages/file.html:1

What to do

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

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

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

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

  • This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — apps/aihtml/templates/dock_layout_float.mustache:1
  • The repo's own CSS styles .ah-node-graph-link-hit with `cursor: pointer`, so this <path> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml/templates/node_graph_link.mustache:1
  • The repo's own CSS styles .ah-chip with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml/templates/tag_input_chip.mustache:1
  • The repo's own CSS styles .dash-task-check with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/analytics.html:1
  • The repo's own CSS styles .pc-dropzone with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×6) — apps/aihtml_example/priv/dashboard_pages/blog-create.html:1, apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1, apps/aihtml_example/priv/dashboard_pages/product-create.html:1, …
  • The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×11) — apps/aihtml_example/priv/dashboard_pages/blog-create.html:1, apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1, apps/aihtml_example/priv/dashboard_pages/job-create.html:1, …
  • The repo's own CSS styles .bl-tag with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/blog-detail.html:1
  • The repo's own CSS styles .ch-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/chat.html:1
  • The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×10) — apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1, apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1, apps/aihtml_example/priv/dashboard_pages/invoice.html:1, …
  • The repo's own CSS styles .us-check with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. (×4) — apps/aihtml_example/priv/dashboard_pages/invoice.html:1, apps/aihtml_example/priv/dashboard_pages/product-create.html:1, apps/aihtml_example/priv/dashboard_pages/product-edit.html:1, …
  • The repo's own CSS styles .pd-thumb with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/product-detail.html:1
  • The repo's own CSS styles .pd-swatch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/product-detail.html:1
  • The repo's own CSS styles .us-pcard-social-btn with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler. — apps/aihtml_example/priv/dashboard_pages/user-cards.html:1

What to do

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

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

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

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

AC6 · Visual & motion safety1.0 / 10Critical✓ Tool-verified

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

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

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

  • `.ah-node-graph-group-delete:hover` sets color: #ff665c on background-color: #ff665c — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.ah-pm-sel-toolbar button.active` sets color: #fff on background-color: #ff6b45 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-conv-value` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-news-new` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-tl-status` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-task-due[data-urgent=true]` sets color: #b76e00 on background-color: #fff5cc — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-traffic-icon` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.dash-board .ah-sortable-handle` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.bk-tx-status` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.bo-table th` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.fl-folder-avatar-more` sets color: #637381 on background-color: #f0f2f4 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.ec-promo-badge` sets color: #fff on background-color: #ff5630 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.kb-search` sets color: #919eab on background-color: #fff — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.kb-chip.is-active` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.kb-chip[data-priority=high].is-active` sets color: #fff on background-color: #ff5630 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.kb-chip[data-priority=medium].is-active` sets color: #fff on background-color: #ffab00 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.kb-chip[data-priority=low].is-active` sets color: #fff on background-color: #00b8d9 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.ch-search` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.ch-item-badge` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-tab-badge[data-color=default]` sets color: #637381 on background-color: #f0f2f4 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-search` sets color: #919eab on background-color: #fff — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-avatar` sets color: #8e33ff on background-color: #efd6ff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-table th` sets color: #637381 on background-color: #919eab — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-upload-ring` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-pcard-social-btn:hover` sets color: #00a76f on background-color: #00a76f — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-pf-tab.is-active` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-post-tool` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-plan-current` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.us-addr-kind` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.pc-dropzone` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.iv-table th` sets color: #637381 on background-color: #919eab — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.bl-tag:hover` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.bl-tag-chip.is-on` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.jb-candidates` sets color: #637381 on background-color: #00a76f — 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.jb-tag` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.jd-benefit-avatar` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.jf-tag.is-on` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.tc-chip[data-active=true]` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.tc-check[data-active=true] .tc-check-box` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2
  • `.ml-folder-count[data-tone=warning]` sets color: #b76e00 on background-color: #fff5cc — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from). — apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2

What to do

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

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

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

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

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

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

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

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

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

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

ED1 · Handler temporal coupling1.0 / 10Critical✓ Tool-verified

Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).

Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.

  • `aihtml_example_clock` clause `tick/1#25` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker). — apps/aihtml_example/src/aihtml_example_clock.erl:21

What to do

  • Remove synchronous peer round-trips (gen_server:call / hand-rolled receive) and blocking sleeps from OTP message handlers — cast a follow-up or resolve state locally, so processes stay temporally decoupled and deadlock-free.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the event-sourcing replay fold reconstructs state purely from the event (no wall clock, UUID or randomness) so replay is reproducible.

Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • 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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

P1 · CI/CD 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.
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

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

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

P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

  • `apps/aihtml/assets/js/runtime/behaviours.ts` reports through `console.*` at line 162 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/aihtml/assets/js/runtime/behaviours.ts:162
  • `apps/aihtml/assets/js/runtime/behaviours.ts` reports through `console.*` at line 226 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/aihtml/assets/js/runtime/behaviours.ts:226
  • `apps/aihtml/assets/js/runtime/fetch.ts` reports through `console.*` at line 107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — apps/aihtml/assets/js/runtime/fetch.ts:107

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add dialyzer or elvis — 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.
  • `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`. — package.json:20

What to do

  • Run what this repository's stack ships: dialyzer or elvis — 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.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

  • 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.
PF3 · Async & latency hygiene8.5 / 10Strong✓ Tool-verified

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

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

  • `execFileSync` in `buildRuntime` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — scripts/serve.mjs:40

What to do

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

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

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

R10 · Code Duplication7.8 / 10Strong✓ Tool-verified

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

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

  • apps/aihtml/assets/js/components/cascader.ts:73 · apps/aihtml/assets/js/components/combobox.ts:60 — the two spans are one implementation copied and then locally edited — 819 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. — apps/aihtml/assets/js/components/cascader.ts:73
  • apps/aihtml/assets/js/components/gantt.ts:387 · apps/aihtml/assets/js/components/scheduler.ts:542 — the two spans are one implementation copied and then locally edited — 359 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. — apps/aihtml/assets/js/components/gantt.ts:387
  • apps/aihtml/assets/js/components/dragdrop.ts:213 · apps/aihtml/assets/js/components/sortable.ts:289 — the two spans are one implementation copied and then locally edited — 219 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. — apps/aihtml/assets/js/components/dragdrop.ts:213
  • apps/aihtml/assets/js/components/_lib_overlay.ts:433 · apps/aihtml/assets/js/components/window.ts:143 — the two spans are one implementation copied and then locally edited — 96 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. — apps/aihtml/assets/js/components/_lib_overlay.ts:433
  • apps/aihtml/assets/js/components/datepicker.ts:37 · apps/aihtml/assets/js/components/datetime_input.ts:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/datepicker.ts:37
  • apps/aihtml/assets/js/components/radiobutton.ts:20 · apps/aihtml/assets/js/components/switch_button.ts:7 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/radiobutton.ts:20
  • apps/aihtml/assets/js/components/calendar.ts:672 · apps/aihtml/assets/js/components/scheduler.ts:124 — the two spans are one implementation copied and then locally edited — 140 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. — apps/aihtml/assets/js/components/calendar.ts:672
  • apps/aihtml/assets/js/components/datepicker.ts:251 · apps/aihtml/assets/js/components/formatted_input.ts:270 — the two spans are one implementation copied and then locally edited — 61 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. — apps/aihtml/assets/js/components/datepicker.ts:251
  • apps/aihtml/assets/js/components/activity_bar.ts:57 · apps/aihtml/assets/js/components/segmented_control.ts:41 — the two spans are one implementation copied and then locally edited — 71 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. — apps/aihtml/assets/js/components/activity_bar.ts:57
  • apps/aihtml/assets/js/components/calendar.ts:264 · apps/aihtml/assets/js/components/calendar.ts:327 — all 2 copies are in the same file, 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. — apps/aihtml/assets/js/components/calendar.ts:264
  • apps/aihtml/assets/js/components/datatable.ts:759 · apps/aihtml/assets/js/components/treegrid.ts:368 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/datatable.ts:759
  • apps/aihtml/assets/js/components/datetime_input.ts:365 · apps/aihtml/assets/js/components/formatted_input.ts:271 — the two spans are one implementation copied and then locally edited — 61 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. — apps/aihtml/assets/js/components/datetime_input.ts:365
  • apps/aihtml/assets/js/components/formatted_input.ts:151 · REDACTED:167 — the two spans are one implementation copied and then locally edited — 80 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. — apps/aihtml/assets/js/components/formatted_input.ts:151
  • apps/aihtml/assets/js/components/formatted_input.ts:129 · apps/aihtml/assets/js/components/number_input.ts:45 — the two spans are one implementation copied and then locally edited — 97 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. — apps/aihtml/assets/js/components/formatted_input.ts:129
  • apps/aihtml/assets/js/components/gantt.ts:123 · apps/aihtml/assets/js/components/gantt.ts:139 — the two spans are one implementation copied and then locally edited — 88 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. — apps/aihtml/assets/js/components/gantt.ts:123
  • apps/aihtml/assets/js/components/responsive_panel.ts:83 · apps/aihtml/assets/js/components/ribbon.ts:112 — the two spans are one implementation copied and then locally edited — 70 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. — apps/aihtml/assets/js/components/responsive_panel.ts:83
  • apps/aihtml/assets/js/components/_lib_chart.ts:152 · apps/aihtml/assets/js/components/_lib_chart.ts:754 — the two spans are one implementation copied and then locally edited — 103 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. — apps/aihtml/assets/js/components/_lib_chart.ts:152
  • apps/aihtml/assets/js/components/colorpicker.ts:99 · apps/aihtml/assets/js/components/responsive_panel.ts:53 — the two spans are one implementation copied and then locally edited — 69 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. — apps/aihtml/assets/js/components/colorpicker.ts:99
  • apps/aihtml/assets/js/components/formatted_input.ts:58 · REDACTED:67 — 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. — apps/aihtml/assets/js/components/formatted_input.ts:58
  • apps/aihtml/assets/js/components/formatted_input.ts:265 · apps/aihtml/assets/js/components/markdown_editor.ts:914 — the two spans are one implementation copied and then locally edited — 83 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. — apps/aihtml/assets/js/components/formatted_input.ts:265
  • apps/aihtml/assets/js/components/menu.ts:156 · apps/aihtml/assets/js/components/navbar.ts:82 — the two spans are one implementation copied and then locally edited — 58 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. — apps/aihtml/assets/js/components/menu.ts:156
  • apps/aihtml/assets/js/components/nav_tree.ts:28 · apps/aihtml/assets/js/components/sidenav.ts:69 — the two spans are one implementation copied and then locally edited — 76 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. — apps/aihtml/assets/js/components/nav_tree.ts:28
  • apps/aihtml/assets/js/components/combobox.ts:262 · apps/aihtml/assets/js/components/dropdownlist.ts:225 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/combobox.ts:262
  • apps/aihtml/assets/js/components/command.ts:35 · apps/aihtml/assets/js/components/transfer.ts:173 — the two spans are one implementation copied and then locally edited — 62 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. — apps/aihtml/assets/js/components/command.ts:35
  • scripts/screenshots.mjs:52 · scripts/test-js.mjs:100 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — scripts/screenshots.mjs:52
  • apps/aihtml/assets/js/components/_lib_chart.ts:730 · apps/aihtml/assets/js/components/datagrid.ts:336 — the two spans are one implementation copied and then locally edited — 51 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. — apps/aihtml/assets/js/components/_lib_chart.ts:730
  • apps/aihtml/assets/js/components/button_group.ts:28 · apps/aihtml/assets/js/components/segmented_control.ts:18 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/button_group.ts:28
  • apps/aihtml/assets/js/components/calendar.ts:513 · apps/aihtml/assets/js/components/scheduler.ts:381 — 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. — apps/aihtml/assets/js/components/calendar.ts:513
  • apps/aihtml/assets/js/components/colorpicker.ts:149 · apps/aihtml/assets/js/components/colorpicker.ts:160 — all 2 copies are in the same file, 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. — apps/aihtml/assets/js/components/colorpicker.ts:149
  • apps/aihtml/assets/js/components/datagrid.ts:280 · apps/aihtml/assets/js/components/pivotgrid.ts:666 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — apps/aihtml/assets/js/components/datagrid.ts:280
  • apps/aihtml/assets/js/components/datatable.ts:211 · apps/aihtml/assets/js/components/treegrid.ts:75 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/datatable.ts:211
  • apps/aihtml/assets/js/components/datatable.ts:538 · apps/aihtml/assets/js/components/treegrid.ts:313 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/datatable.ts:538
  • apps/aihtml/assets/js/components/datatable.ts:741 · apps/aihtml/assets/js/components/treegrid.ts:351 — 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. — apps/aihtml/assets/js/components/datatable.ts:741
  • apps/aihtml/assets/js/components/dock_layout.ts:648 · apps/aihtml/assets/js/components/ribbon.ts:428 — 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. — apps/aihtml/assets/js/components/dock_layout.ts:648
  • apps/aihtml/assets/js/components/input.ts:26 · apps/aihtml/assets/js/components/password_input.ts:49 — 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. — apps/aihtml/assets/js/components/input.ts:26
  • REDACTED:1857 · REDACTED:1924 — all 2 copies are in the same file, 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. — REDACTED:1857
  • apps/aihtml/assets/js/components/sidenav.ts:87 · apps/aihtml/assets/js/components/window.ts:205 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — apps/aihtml/assets/js/components/sidenav.ts:87
  • apps/aihtml/assets/js/components/window.ts:34 · apps/aihtml/assets/js/components/window.ts:51 — the two spans are one implementation copied and then locally edited — 56 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. — apps/aihtml/assets/js/components/window.ts:34
  • apps/aihtml/assets/js/components/datagrid.ts:1533 · apps/aihtml/assets/js/components/pivotgrid.ts:1607 — 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. — apps/aihtml/assets/js/components/datagrid.ts:1533
  • apps/aihtml/assets/js/components/datepicker.ts:11 · apps/aihtml/assets/js/components/datetime_input.ts:15 — 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. — apps/aihtml/assets/js/components/datepicker.ts:11

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.
R2 · Cyclomatic Complexity5.0 / 10Adequate✓ Tool-verified

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

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

  • (anonymous) has cyclomatic complexity 51 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:2071
  • #keydown has cyclomatic complexity 49 and cognitive complexity 70; 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. — apps/aihtml/assets/js/components/menu.ts:405
  • #onKey has cyclomatic complexity 49 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/pivotgrid.ts:1529
  • #keydown has cyclomatic complexity 46 and cognitive complexity 52; 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. — apps/aihtml/assets/js/components/datagrid.ts:1209
  • keydown has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/dropdownlist.ts:255
  • eventKey has cyclomatic complexity 38 and cognitive complexity 66; 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. — apps/aihtml/assets/js/components/scheduler.ts:642
  • key has cyclomatic complexity 38 and cognitive complexity 33; 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. — apps/aihtml/assets/js/components/datetime_input.ts:528
  • #click has cyclomatic complexity 36 and cognitive complexity 51; 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. — apps/aihtml/assets/js/components/datagrid.ts:1276
  • key has cyclomatic complexity 35 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/cascader.ts:389
  • key has cyclomatic complexity 32 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 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. — apps/aihtml/assets/js/components/datepicker.ts:442
  • key has cyclomatic complexity 32 and cognitive complexity 35; 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. — apps/aihtml/assets/js/components/listbox.ts:182
  • keydown has cyclomatic complexity 30 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/tree.ts:250
  • #menuAction has cyclomatic complexity 29 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. — apps/aihtml/assets/js/components/pivotgrid.ts:1375
  • (anonymous) has cyclomatic complexity 28 and cognitive complexity 33; 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. — apps/aihtml/assets/js/components/formatted_input.ts:104
  • view has cyclomatic complexity 27 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. — apps/aihtml/assets/js/components/datepicker.ts:297
  • key has cyclomatic complexity 27 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — apps/aihtml/assets/js/components/docking.ts:320
  • key has cyclomatic complexity 26 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/combobox.ts:391
  • dragStart has cyclomatic complexity 26 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. — apps/aihtml/assets/js/components/calendar.ts:763
  • place has cyclomatic complexity 26 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. — apps/aihtml/assets/js/components/scheduler.ts:215
  • #keydown has cyclomatic complexity 24 and cognitive complexity 15; 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. — apps/aihtml/assets/js/components/treegrid.ts:322
  • render has cyclomatic complexity 23 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. — REDACTED:280
  • mount 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. — apps/aihtml/assets/js/components/markdown_editor.ts:1341
  • matchCond has cyclomatic complexity 23 and cognitive complexity 13; 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. — apps/aihtml/assets/js/components/datatable.ts:106
  • #keydown has cyclomatic complexity 23 and cognitive complexity 13; 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. — apps/aihtml/assets/js/components/datatable.ts:709
  • dragEnd has cyclomatic complexity 22 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — apps/aihtml/assets/js/components/scheduler.ts:596
  • renderCard has cyclomatic complexity 22 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. — REDACTED:922
  • keydown has cyclomatic complexity 21 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 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. — apps/aihtml/assets/js/components/sortable.ts:391
  • expand has cyclomatic complexity 21 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 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. — apps/aihtml/assets/js/components/_lib_rrule.ts:70
  • #syncLayout has cyclomatic complexity 21 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 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. — apps/aihtml/assets/js/components/pivotgrid.ts:957
  • #morphNode has cyclomatic complexity 21 and cognitive complexity 20; 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. — apps/aihtml/assets/js/runtime/swap.ts:291
  • calNormalize has cyclomatic complexity 21 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. — apps/aihtml/assets/js/components/calendar.ts:156
  • (anonymous) has cyclomatic complexity 20 and cognitive complexity 20; 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. — apps/aihtml/assets/js/components/pivotgrid.ts:1335
  • key has cyclomatic complexity 20 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. — apps/aihtml/assets/js/components/transfer.ts:170
  • (anonymous) has cyclomatic complexity 20 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. — apps/aihtml/assets/js/components/listmenu.ts:86
  • dragEnd has cyclomatic complexity 19 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. — apps/aihtml/assets/js/components/calendar.ts:875
  • clockKey has cyclomatic complexity 19 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:454
  • insert has cyclomatic complexity 19 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. — REDACTED:310
  • updateText has cyclomatic complexity 19 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 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. — apps/aihtml/assets/js/components/_lib_chart.ts:516
  • (anonymous) has cyclomatic complexity 19 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 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. — apps/aihtml/assets/js/components/number_input.ts:43
  • #eventPayload has cyclomatic complexity 19 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 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. — apps/aihtml/assets/js/runtime/actions.ts:158
R3 · Large Files4.2 / 10Weak✓ 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.

  • REDACTED has 1989 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
  • apps/aihtml/assets/js/components/datagrid.ts has 1569 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/datagrid.ts:1
  • apps/aihtml/assets/js/components/pivotgrid.ts has 1499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/pivotgrid.ts:1
  • apps/aihtml/assets/js/components/markdown_editor.ts has 1442 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/markdown_editor.ts:1
  • apps/aihtml/assets/js/components/dock_layout.ts has 1281 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/dock_layout.ts:1
  • apps/aihtml/assets/js/components/_lib_chart.ts has 880 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/_lib_chart.ts:1
  • apps/aihtml/assets/js/components/calendar.ts has 864 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/calendar.ts:1
  • apps/aihtml/assets/js/components/scheduler.ts has 734 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/scheduler.ts:1
  • apps/aihtml/assets/js/components/datatable.ts has 726 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/datatable.ts:1
  • apps/aihtml/assets/js/components/_lib_overlay.ts has 621 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/_lib_overlay.ts:1
  • REDACTED 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:1
  • apps/aihtml/assets/js/components/datetime_input.ts has 599 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/datetime_input.ts:1
  • apps/aihtml/assets/js/runtime/actions.ts 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. — apps/aihtml/assets/js/runtime/actions.ts:1
  • apps/aihtml/assets/js/components/menu.ts has 476 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/menu.ts:1
  • apps/aihtml/assets/js/components/datepicker.ts has 469 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/datepicker.ts:1
  • REDACTED has 449 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
  • apps/aihtml/assets/js/components/upload.ts has 449 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/upload.ts:1
  • apps/aihtml/assets/js/components/gantt.ts has 427 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/gantt.ts:1
  • apps/aihtml/assets/js/components/combobox.ts has 425 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/combobox.ts:1
  • apps/aihtml/assets/js/components/cascader.ts has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — apps/aihtml/assets/js/components/cascader.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling6.7 / 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 eslint as package.json scripts and run them in CI.
R7 · Dead Code10.0 / 10Exemplary✓ 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.

R8 · Dependency Hygiene6.0 / 10Adequate✓ Tool-verified

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

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

  • Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — scripts/gen-markdown-data.mjs:21, scripts/gen-markdown-data.mjs:18

What to do

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

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

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

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.

X3 · Exception handling4.4 / 10Weak✓ Tool-verified

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

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

  • `catch error:_` 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) — apps/aihtml_cowboy/src/aihtml_cowboy_action.erl:118, apps/aihtml/src/aihtml_datatable.erl:665
  • `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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. (×4) — apps/aihtml/src/aihtml_action.erl:183, apps/aihtml/src/aihtml_datagrid.erl:1322, apps/aihtml/src/aihtml_scheduler.erl:865, …
  • 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. (×24) — apps/aihtml/assets/js/runtime/actions.ts:421, apps/aihtml/assets/js/runtime/confirm.ts:33, apps/aihtml/assets/js/runtime/i18n.ts:29, …
  • `catch (_e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — apps/aihtml/assets/js/components/markdown_editor.ts:907
  • `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — apps/aihtml/assets/js/components/popover.ts:29

What to do

  • Swallowed exception (caught, then discarded)
X5 · Nullable reference types9.4 / 10Exemplary✓ Tool-verified

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

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

  • ~1.4 `!` null assertions per 1k TypeScript source lines — 47 assertion(s) across the 33190 source line(s) of the 126 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: apps/aihtml/assets/js/components/markdown_editor.ts (13), apps/aihtml/assets/js/components/calendar.ts (6), REDACTED (5). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

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

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health59%AdequateAcceptable, with room to improve.
Architecture90%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity67%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness36%Weak — gated by P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security71%Checked 2 of 9Solid.
Event-Driven10%Critical — gated by ED1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event Sourcing100%ExemplaryStrongest area.
Accessibility33%Weak — gated by AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance85%StrongSolid.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 34 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X31 Test-only surface in a production module — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 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.
  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 70 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.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AX1 Captive dependencies — Not applicable: the BEAM has no dependency-injection container — state lives in processes, and no process is handed an instance whose lifetime another one scopes; 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.
  • AX2 Stateful singletons — Not applicable: Erlang processes share no mutable memory — state lives in a process's own mailbox — so there is no shared object to race on. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — AX6 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — ~26717 lines of test source are present (.erl, .mjs, .js) 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.
  • D11 Test Reliability — Test reliability not included — the .erl suite was found but not re-run
  • D12 Dependency Hygiene — Dependency currency not established — this repository declares no production dependency to grade
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • 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.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 1 candidate(s) found and not reported.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • 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. 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
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 12 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.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • 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.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) was not measured: of the 289 type(s) found, none both holds instance state and has two or more methods whose shared use of it could be read (2 with fewer than two methods, 287 stateless), so LCOM4 is undefined for every type in this repository. Not scored — the metric does not apply here, and this is not a finding about this repository.
  • 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
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 116 value object(s); 2 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES2 Immutable events — not applicable — the code was read and holds no persisted event, so there is nothing for this check to judge
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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 Erlang, JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R4 Test Coverage — 2 test file(s) reach none of 128 production file(s) via imports — exercised outside the JS import graph (integration/bundled), not import-reachable
  • 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.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X16 Unfloored truncation loop — X16 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • 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.
  • X21 Side-effecting pattern guard — X21 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X24 Document value interpolated into markup unescaped — X24 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob — 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: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. Erlang processes share no heap: a value sent to another process arrives as a copy, so no collection is reachable from two processes at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — X29 reached only 41% of this repository's production lines — erlang (44,269 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — X30 reached only 41% of this repository's production lines — erlang (44,269 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 — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 89 finding(s)
AC4 · Keyboard semantics · Clickable element isn't keyboard-operable · ×39
  • Clickable element isn't keyboard-operable apps/aihtml/templates/node_graph_link.mustache:1 — The repo's own CSS styles .ah-node-graph-link-hit with `cursor: pointer`, so this <path> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml/templates/tag_input_chip.mustache:1 — The repo's own CSS styles .ah-chip with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/analytics.html:1 — The repo's own CSS styles .dash-task-check with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/blog-create.html:1 — The repo's own CSS styles .pc-dropzone with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/blog-create.html:1 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/blog-detail.html:1 — The repo's own CSS styles .bl-tag with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1 — The repo's own CSS styles .pc-dropzone with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/chat.html:1 — The repo's own CSS styles .ch-item with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/invoice.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/invoice.html:1 — The repo's own CSS styles .us-check with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/job-create.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/job-create.html:1 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/job-edit.html:12 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/job-edit.html:12 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/order.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/order.html:1 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — The repo's own CSS styles .pc-dropzone with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — The repo's own CSS styles .us-select with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — The repo's own CSS styles .us-check with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — The repo's own CSS styles .us-switch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-detail.html:1 — The repo's own CSS styles .pd-thumb with `cursor: pointer`, so this <div> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • Clickable element isn't keyboard-operable apps/aihtml_example/priv/dashboard_pages/product-detail.html:1 — The repo's own CSS styles .pd-swatch with `cursor: pointer`, so this <span> is a control — but it has no role, no tabindex="0" and no key handler, so it can only be reached with a mouse. Use a <button>, or add role + tabindex="0" + a key handler.
  • + 14 more in this group — see findings.md.
AC2 · Forms & labels · <label> that labels no control · ×17
  • <label> that labels no control apps/aihtml_example/priv/dashboard_pages/blog-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/invoice.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/job-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/job-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/job-edit.html:12 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/order.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/product-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/product.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/tour-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/tour-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/user-create.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/user-edit.html:1 — This <label> has no for 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 for="<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 apps/aihtml_example/priv/dashboard_pages/user.html:1 — This <label> has no for 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 for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC2 · Forms & labels · <input> without a programmatic label · ×14
  • <input> without a programmatic label REDACTED:1464 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/banking.html:1 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/blog.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/chat.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/file-manager.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/invoice.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/job.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/kanban.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/mail.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/order.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/product.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/tour.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/user-profile.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label apps/aihtml_example/priv/dashboard_pages/user.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
AC2 · Forms & labels · <textarea> without a programmatic label · ×7
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/blog-create.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/job-create.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/job-edit.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/tour-create.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/tour-edit.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <textarea> without a programmatic label apps/aihtml_example/priv/dashboard_pages/user-profile.html:1 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D30 · Dependency Vulnerabilities · High CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×2
  • <button> with no accessible text apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1 — 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).
  • <button> with no accessible text apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1 — 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).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import 'entities' · ×1
  • Unlisted import 'entities' scripts/gen-markdown-data.mjs:21 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'uc.micro' · ×1
  • Unlisted import 'uc.micro' scripts/gen-markdown-data.mjs:18 — Imported but not declared in any reachable package.json — installs work only by hoisting accident.
Serious — 741 finding(s)
X3 · Exception handling · Swallowed exception (empty catch) · ×24
  • Swallowed exception (empty catch) apps/aihtml/assets/js/runtime/actions.ts:421 — 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) apps/aihtml/assets/js/runtime/confirm.ts:33 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/aihtml/assets/js/runtime/i18n.ts:29 — 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) apps/aihtml/assets/js/runtime/swap.ts:217 — 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) apps/aihtml/assets/js/runtime/swap.ts:236 — 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) apps/aihtml/assets/js/runtime/theme.ts:58 — 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) apps/aihtml/assets/js/components/_lib_overlay.ts:94 — 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) apps/aihtml/assets/js/components/_lib_overlay.ts:488 — 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) apps/aihtml/assets/js/components/_lib_picker.ts:73 — 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) apps/aihtml/assets/js/components/_lib_scroll.ts:22 — 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) apps/aihtml/assets/js/components/command.ts:181 — 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) apps/aihtml/assets/js/components/datetime_input.ts:404 — 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) apps/aihtml/assets/js/components/dragdrop.ts:221 — 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) apps/aihtml/assets/js/components/dropdown_button.ts:58 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:278 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:764 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1328 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1367 — 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) apps/aihtml/assets/js/components/slider.ts:81 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) apps/aihtml/assets/js/components/slider.ts:94 — 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) apps/aihtml/assets/js/components/sortable.ts:274 — 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) apps/aihtml/assets/js/components/sortable.ts:306 — 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) apps/aihtml/assets/js/components/splitter.ts:70 — 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) apps/aihtml/assets/js/components/upload.ts:342 — 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.
AC3 · Page structure · Heading level jumps from h1 to h3 · ×19
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/analytics.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/blog-create.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/blog-detail.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/blog-edit.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/blog.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/course.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/file.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/invoice-create.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/invoice-edit.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/job-create.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/job-edit.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/job.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/order-detail.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/product-create.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/product-edit.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/tour-create.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/tour-detail.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/tour-edit.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
  • Heading level jumps from h1 to h3 apps/aihtml_example/priv/dashboard_pages/tour.html:1 — Skipping heading levels breaks the document outline assistive tech relies on. Don't jump levels — increase by at most one.
D3 · God Classes · FileTooLong · ×18
  • FileTooLong: src/aihtml_lib_markdown.erl apps/aihtml/src/aihtml_lib_markdown.erl — FileTooLong — 2301 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 216 functions. The bar is 500 significant lines; this is 1801 over it, 4.60× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1549 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1049 over it, 3.10× 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: src/aihtml.erl apps/aihtml/src/aihtml.erl — FileTooLong — 1252 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 258 functions. The bar is 500 significant lines; this is 752 over it, 2.50× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: components/datagrid.ts apps/aihtml/assets/js/components/datagrid.ts — FileTooLong — 1225 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 725 over it, 2.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: components/pivotgrid.ts apps/aihtml/assets/js/components/pivotgrid.ts — FileTooLong — 1181 significant lines (blank, comment-only and punctuation-only lines excluded), about 60% of them inside a single declaration: pathOf (712-1627). The bar is 500 significant lines; this is 681 over it, 2.36× 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: src/aihtml_datagrid.erl apps/aihtml/src/aihtml_datagrid.erl — FileTooLong — 1143 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 90 functions. The bar is 500 significant lines; this is 643 over it, 2.29× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: components/markdown_editor.ts apps/aihtml/assets/js/components/markdown_editor.ts — FileTooLong — 1108 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 608 over it, 2.22× 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/dock_layout.ts apps/aihtml/assets/js/components/dock_layout.ts — FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 485 over it, 1.97× 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: src/aihtml_pivotgrid.erl apps/aihtml/src/aihtml_pivotgrid.erl — FileTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 84 functions. The bar is 500 significant lines; this is 409 over it, 1.82× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/aihtml_scheduler.erl apps/aihtml/src/aihtml_scheduler.erl — FileTooLong — 797 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 70 functions. The bar is 500 significant lines; this is 297 over it, 1.59× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: components/calendar.ts apps/aihtml/assets/js/components/calendar.ts — FileTooLong — 655 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 155 over it, 1.31× 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: src/aihtml_datatable.erl apps/aihtml/src/aihtml_datatable.erl — FileTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 37 functions. The bar is 500 significant lines; this is 142 over it, 1.28× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/aihtml_node_graph.erl apps/aihtml/src/aihtml_node_graph.erl — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 72 functions. The bar is 500 significant lines; this is 126 over it, 1.25× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: components/_lib_chart.ts apps/aihtml/assets/js/components/_lib_chart.ts — FileTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 123 over it, 1.25× 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/scheduler.ts apps/aihtml/assets/js/components/scheduler.ts — FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: Drag (308-789). The bar is 500 significant lines; this is 69 over it, 1.14× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: components/datatable.ts apps/aihtml/assets/js/components/datatable.ts — FileTooLong — 560 significant lines (blank, comment-only and punctuation-only lines excluded), about 81% of them inside a single declaration: pushUrl (182-768). The bar is 500 significant lines; this is 60 over it, 1.12× 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: src/aihtml_calendar.erl apps/aihtml/src/aihtml_calendar.erl — FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 50 functions. The bar is 500 significant lines; this is 24 over it, 1.05× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
  • FileTooLong: src/aihtml_lib_chart.erl apps/aihtml/src/aihtml_lib_chart.erl — FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded), declaring 61 functions. The bar is 500 significant lines; this is 19 over it, 1.04× the bar. In this language a module is exactly one source file, so its length cannot be moved into sibling files of the same module. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no one module has to be read whole to change one of them.
D15 · Churn × Complexity Hotspots · Hotspot · ×16
  • Hotspot: apps/aihtml/src/aihtml_range_selector.erl apps/aihtml/src/aihtml_range_selector.erl:67 — apps/aihtml/src/aihtml_range_selector.erl changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in aihtml_range_selector.render at line 67. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_range_selector.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/cascader.ts apps/aihtml/assets/js/components/cascader.ts:389 — apps/aihtml/assets/js/components/cascader.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in CascaderController.key at line 389. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/cascader.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/combobox.ts apps/aihtml/assets/js/components/combobox.ts:70 — apps/aihtml/assets/js/components/combobox.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in ComboboxController.setup at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/combobox.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/src/aihtml_gantt.erl apps/aihtml/src/aihtml_gantt.erl:85 — apps/aihtml/src/aihtml_gantt.erl changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in aihtml_gantt.render at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_gantt.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml_example/src/aihtml_example_actions.erl apps/aihtml_example/src/aihtml_example_actions.erl:131 — apps/aihtml_example/src/aihtml_example_actions.erl changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in aihtml_example_actions.action at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml_example/src/aihtml_example_actions.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/src/aihtml_datepicker.erl apps/aihtml/src/aihtml_datepicker.erl:73 — apps/aihtml/src/aihtml_datepicker.erl changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in aihtml_datepicker.render at line 73. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_datepicker.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/src/aihtml_datetime_input.erl apps/aihtml/src/aihtml_datetime_input.erl:71 — apps/aihtml/src/aihtml_datetime_input.erl changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in aihtml_datetime_input.render at line 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_datetime_input.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/tree.ts apps/aihtml/assets/js/components/tree.ts:250 — apps/aihtml/assets/js/components/tree.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in TreeController.keydown at line 250. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/tree.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/runtime/actions.ts apps/aihtml/assets/js/runtime/actions.ts:439 — apps/aihtml/assets/js/runtime/actions.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in Actions.#onEvent at line 439. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/runtime/actions.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/docking.ts apps/aihtml/assets/js/components/docking.ts:320 — apps/aihtml/assets/js/components/docking.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in DockingController.key at line 320. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/docking.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/src/aihtml_lib_chart.erl apps/aihtml/src/aihtml_lib_chart.erl:400 — apps/aihtml/src/aihtml_lib_chart.erl changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in aihtml_lib_chart.graph_table at line 400. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_lib_chart.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/number_input.ts apps/aihtml/assets/js/components/number_input.ts:38 — apps/aihtml/assets/js/components/number_input.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in NumberInputController.setup at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/number_input.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/src/aihtml_html.erl apps/aihtml/src/aihtml_html.erl:109 — apps/aihtml/src/aihtml_html.erl changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in aihtml_html.render at line 109. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/src/aihtml_html.erl`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/input_otp.ts apps/aihtml/assets/js/components/input_otp.ts:16 — apps/aihtml/assets/js/components/input_otp.ts changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in InputOtpController.setup at line 16. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/input_otp.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/components/password_input.ts apps/aihtml/assets/js/components/password_input.ts:11 — apps/aihtml/assets/js/components/password_input.ts changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in password_input.strength at line 11. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/components/password_input.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: apps/aihtml/assets/js/runtime/fetch.ts apps/aihtml/assets/js/runtime/fetch.ts:70 — apps/aihtml/assets/js/runtime/fetch.ts changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Fetcher.#roundTrip at line 70. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 11:40:42 +08:00' --until='2026-10-27 11:40:42 +08:00' --full-history --no-merges -- apps/aihtml/assets/js/runtime/fetch.ts`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×11
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/button_group.ts:28 — apps/aihtml/assets/js/components/button_group.ts:28 · apps/aihtml/assets/js/components/segmented_control.ts:18 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/calendar.ts:513 — apps/aihtml/assets/js/components/calendar.ts:513 · apps/aihtml/assets/js/components/scheduler.ts:381 — 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.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/colorpicker.ts:149 — apps/aihtml/assets/js/components/colorpicker.ts:149 · apps/aihtml/assets/js/components/colorpicker.ts:160 — all 2 copies are in the same file, 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.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/datagrid.ts:280 — apps/aihtml/assets/js/components/datagrid.ts:280 · apps/aihtml/assets/js/components/pivotgrid.ts:666 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts:211 — apps/aihtml/assets/js/components/datatable.ts:211 · apps/aihtml/assets/js/components/treegrid.ts:75 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts:538 — apps/aihtml/assets/js/components/datatable.ts:538 · apps/aihtml/assets/js/components/treegrid.ts:313 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts:741 — apps/aihtml/assets/js/components/datatable.ts:741 · apps/aihtml/assets/js/components/treegrid.ts:351 — 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.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/dock_layout.ts:648 — apps/aihtml/assets/js/components/dock_layout.ts:648 · apps/aihtml/assets/js/components/ribbon.ts:428 — 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.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/input.ts:26 — apps/aihtml/assets/js/components/input.ts:26 · apps/aihtml/assets/js/components/password_input.ts:49 — 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.
  • Duplicated block (8 lines × 2 locations) REDACTED:1857 — REDACTED:1857 · REDACTED:1924 — all 2 copies are in the same file, 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.
  • Duplicated block (8 lines × 2 locations) apps/aihtml/assets/js/components/sidenav.ts:87 — apps/aihtml/assets/js/components/sidenav.ts:87 · apps/aihtml/assets/js/components/window.ts:205 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×9
  • Edited copy of a member (5 corresponding lines) apps/aihtml/src/aihtml_lib_display.erl:61 — apps/aihtml/src/aihtml_lib_display.erl:61-65 | apps/aihtml/src/aihtml_password_input.erl:73-78 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml/src/aihtml_combobox.erl:237 — apps/aihtml/src/aihtml_combobox.erl:237-241 | apps/aihtml/src/aihtml_listbox.erl:145-149 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml/src/aihtml_lib_choice.erl:189 — apps/aihtml/src/aihtml_lib_choice.erl:189-193 | apps/aihtml/src/aihtml_lib_display.erl:44-48 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml/src/aihtml_action.erl:108 — apps/aihtml/src/aihtml_action.erl:108-112 | apps/aihtml/src/aihtml_action.erl:117-122 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml/src/aihtml_combobox.erl:172 — apps/aihtml/src/aihtml_combobox.erl:172-176 | apps/aihtml/src/aihtml_lib_table.erl:213-218 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_badge.erl:23 — apps/aihtml_example/src/aihtml_example_demo_badge.erl:23-27 | apps/aihtml_example/src/aihtml_example_demo_badge.erl:38-42 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_checkbox.erl:28 — apps/aihtml_example/src/aihtml_example_demo_checkbox.erl:28-32 | apps/aihtml_example/src/aihtml_example_demo_switch_button.erl:35-39 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_sheet.erl:46 — apps/aihtml_example/src/aihtml_example_demo_sheet.erl:46-50 | apps/aihtml_example/src/aihtml_example_demo_window.erl:45-49 — These two members are one piece of code written twice and then edited apart: 5 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 (5 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:68 — apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:68-72 | apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:94-98 — These two members are one piece of code written twice and then edited apart: 5 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 (2 corresponding lines) · ×8
  • Edited copy of a member (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:460 — apps/aihtml/src/aihtml_calendar.erl:460-461 | apps/aihtml/src/aihtml_scheduler.erl:563-564 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:456 — apps/aihtml/src/aihtml_calendar.erl:456-458 | apps/aihtml/src/aihtml_scheduler.erl:560-561 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml_pivotgrid.erl:775 — apps/aihtml/src/aihtml_pivotgrid.erl:775-776 | apps/aihtml/src/aihtml_relation_graph.erl:278-280 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:234 — apps/aihtml/src/aihtml_calendar.erl:234-235 | apps/aihtml/src/aihtml_datetime_input.erl:253-254 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml_action.erl:376 — apps/aihtml/src/aihtml_action.erl:376-377 | apps/aihtml/src/aihtml_html.erl:179-180 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml.erl:622 — apps/aihtml/src/aihtml.erl:622-623 | apps/aihtml/src/aihtml_lib_overlay.erl:307-308 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml/src/aihtml_lib_layout.erl:93 — apps/aihtml/src/aihtml_lib_layout.erl:93-95 | apps/aihtml/src/aihtml_lib_overlay.erl:299-300 — These two members are one piece of code written twice and then edited apart: 2 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 (2 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_area_chart.erl:69 — apps/aihtml_example/src/aihtml_example_demo_area_chart.erl:69-70 | apps/aihtml_example/src/aihtml_example_demo_chart.erl:152-153 — These two members are one piece of code written twice and then edited apart: 2 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 · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) apps/aihtml/src/aihtml_command.erl:265 — apps/aihtml/src/aihtml_command.erl:265-270 | apps/aihtml/src/aihtml_navigationbar.erl:260-265 — 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 (6 lines × 2) apps/aihtml/src/aihtml_heatmap_calendar.erl:189 — apps/aihtml/src/aihtml_heatmap_calendar.erl:189-194 | apps/aihtml/src/aihtml_lib_table.erl:128-133 — 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 (6 lines × 2) apps/aihtml/src/aihtml_lib_form.erl:94 — apps/aihtml/src/aihtml_lib_form.erl:94-99 | apps/aihtml/src/aihtml_range_selector.erl:163-168 — 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 (6 lines × 2) apps/aihtml/src/aihtml_lib_tiles.erl:21 — apps/aihtml/src/aihtml_lib_tiles.erl:21-26 | apps/aihtml/src/aihtml_tree.erl:300-305 — 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 (6 lines × 2) apps/aihtml/src/aihtml_calendar.erl:642 — apps/aihtml/src/aihtml_calendar.erl:642-647 | apps/aihtml/src/aihtml_datetime_input.erl:262-267 — 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 `apps/aihtml/src/aihtml_calendar.erl:642` 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) apps/aihtml/src/aihtml_catalog.erl:243 — apps/aihtml/src/aihtml_catalog.erl:243-248 | apps/aihtml/src/aihtml_html.erl:244-249 — 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 (6 lines × 2) apps/aihtml/src/aihtml_combobox.erl:268 — apps/aihtml/src/aihtml_combobox.erl:268-273 | apps/aihtml/src/aihtml_datepicker.erl:329-334 — 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 `apps/aihtml/src/aihtml_combobox.erl:268` 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) apps/aihtml_example/src/aihtml_example_demo_datatable.erl:178 — apps/aihtml_example/src/aihtml_example_demo_datatable.erl:178-183 | apps/aihtml_example/src/aihtml_example_demo_treegrid.erl:149-154 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×8
  • Swallowed exception (caught, then discarded) apps/aihtml_cowboy/src/aihtml_cowboy_action.erl:118 — `catch error:_` 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) apps/aihtml/src/aihtml_action.erl:183 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) apps/aihtml/src/aihtml_datagrid.erl:1322 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) apps/aihtml/src/aihtml_datatable.erl:665 — `catch error:_` 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) apps/aihtml/src/aihtml_scheduler.erl:865 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) apps/aihtml/src/aihtml_tile_layout.erl:310 — `catch _:_` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, 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) apps/aihtml/assets/js/components/markdown_editor.ts:907 — `catch (_e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
  • Swallowed exception (caught, then discarded) apps/aihtml/assets/js/components/popover.ts:29 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.1 · ×7
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-board .ah-sortable-handle` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.kb-chip.is-active` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ch-item-badge` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.bl-tag-chip.is-on` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.jf-tag.is-on` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.tc-chip[data-active=true]` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.1:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.tc-check[data-active=true] .tc-check-box` sets color: #fff on background-color: #00a76f — 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
D3 · God Classes · TooManyMethods · ×7
  • TooManyMethods: DatagridController apps/aihtml/assets/js/components/datagrid.ts:394 — TooManyMethods — 76 methods. The bar is 30 methods; this is 46 over it, 2.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NodeGraphController REDACTED:698 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PivotgridController apps/aihtml/assets/js/components/pivotgrid.ts:718 — TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DatatableController apps/aihtml/assets/js/components/datatable.ts:184 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: RibbonController apps/aihtml/assets/js/components/ribbon.ts:34 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DockLayoutController apps/aihtml/assets/js/components/dock_layout.ts:608 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CalendarController apps/aihtml/assets/js/components/calendar.ts:452 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×7
  • Edited copy of a member (11 corresponding lines) apps/aihtml/src/aihtml_listbox.erl:122 — apps/aihtml/src/aihtml_listbox.erl:122-137 | apps/aihtml/src/aihtml_transfer.erl:113-123 — 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) apps/aihtml/src/aihtml_heatmap_calendar.erl:140 — apps/aihtml/src/aihtml_heatmap_calendar.erl:140-150 | apps/aihtml/src/aihtml_lib_date.erl:38-49 — 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) apps/aihtml/src/aihtml_lib_chart.erl:287 — apps/aihtml/src/aihtml_lib_chart.erl:287-297 | apps/aihtml/src/aihtml_lib_chart.erl:353-364 — 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) apps/aihtml/src/aihtml_activity_bar.erl:107 — apps/aihtml/src/aihtml_activity_bar.erl:107-119 | apps/aihtml/src/aihtml_segmented_control.erl:68-78 — 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) apps/aihtml/src/aihtml_lib_layout.erl:41 — apps/aihtml/src/aihtml_lib_layout.erl:41-51 | apps/aihtml/src/aihtml_lib_scroll.erl:26-36 — 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) apps/aihtml/src/aihtml_lib_markdown.erl:1415 — apps/aihtml/src/aihtml_lib_markdown.erl:1415-1425 | apps/aihtml/src/aihtml_lib_markdown.erl:1607-1617 — 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) apps/aihtml/src/aihtml_datagrid.erl:549 — apps/aihtml/src/aihtml_datagrid.erl:549-559 | apps/aihtml/src/aihtml_lib_table.erl:101-111 — 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.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×7
  • Edited copy of a member (4 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:203 — apps/aihtml/src/aihtml_calendar.erl:203-206 | apps/aihtml/src/aihtml_scheduler.erl:265-268 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml/src/aihtml_lib_choice.erl:76 — apps/aihtml/src/aihtml_lib_choice.erl:76-81 | apps/aihtml/src/aihtml_lib_choice.erl:84-87 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml/src/aihtml_password_input.erl:80 — apps/aihtml/src/aihtml_password_input.erl:80-83 | apps/aihtml/src/aihtml_password_input.erl:85-91 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml/src/aihtml_lib_scroll.erl:71 — apps/aihtml/src/aihtml_lib_scroll.erl:71-74 | apps/aihtml/src/aihtml_tile_layout.erl:485-488 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_area_chart.erl:29 — apps/aihtml_example/src/aihtml_example_demo_area_chart.erl:29-32 | apps/aihtml_example/src/aihtml_example_demo_area_chart.erl:43-47 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_cascader.erl:74 — apps/aihtml_example/src/aihtml_example_demo_cascader.erl:74-77 | apps/aihtml_example/src/aihtml_example_demo_tree.erl:90-93 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:51 — apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:51-54 | apps/aihtml_example/src/aihtml_example_demo_pivotgrid.erl:57-60 — These two members are one piece of code written twice and then edited apart: 4 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.9 · ×6
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-conv-value` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-news-new` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-tl-status` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-traffic-icon` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.bk-tx-status` sets color: #5119b7 on background-color: #8e33ff — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.kb-chip[data-priority=medium].is-active` sets color: #fff on background-color: #ffab00 — 1.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.7 · ×6
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-pf-tab.is-active` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-post-tool` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-plan-current` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.bl-tag:hover` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.jb-tag` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.jd-benefit-avatar` sets color: #007867 on background-color: #00a76f — 1.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×6
  • Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:208 — apps/aihtml/src/aihtml_calendar.erl:208-213 | apps/aihtml/src/aihtml_scheduler.erl:270-277 — 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.
  • Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_i18n.erl:247 — apps/aihtml/src/aihtml_i18n.erl:247-252 | apps/aihtml/src/aihtml_pagination.erl:194-199 — 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.
  • Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_datagrid.erl:831 — apps/aihtml/src/aihtml_datagrid.erl:831-836 | apps/aihtml/src/aihtml_pivotgrid.erl:952-961 — 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.
  • Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_datagrid.erl:522 — apps/aihtml/src/aihtml_datagrid.erl:522-527 | apps/aihtml/src/aihtml_i18n.erl:132-137 — 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.
  • Edited copy of a member (6 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:299 — apps/aihtml/src/aihtml_calendar.erl:299-304 | apps/aihtml/src/aihtml_node_graph.erl:711-717 — 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.
  • Edited copy of a member (6 corresponding lines) apps/aihtml_example/src/aihtml_example_dashboard.erl:510 — apps/aihtml_example/src/aihtml_example_dashboard.erl:510-515 | apps/aihtml_example/src/aihtml_example_dashboard.erl:1116-1121 — 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.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×6
  • Duplicated block with local edits (11 matched lines × 2 locations) apps/aihtml/assets/js/components/activity_bar.ts:57 — apps/aihtml/assets/js/components/activity_bar.ts:57 · apps/aihtml/assets/js/components/segmented_control.ts:41 — the two spans are one implementation copied and then locally edited — 71 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 (11 matched lines × 2 locations) apps/aihtml/assets/js/components/datetime_input.ts:365 — apps/aihtml/assets/js/components/datetime_input.ts:365 · apps/aihtml/assets/js/components/formatted_input.ts:271 — the two spans are one implementation copied and then locally edited — 61 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 (11 matched lines × 2 locations) apps/aihtml/assets/js/components/formatted_input.ts:151 — apps/aihtml/assets/js/components/formatted_input.ts:151 · REDACTED:167 — the two spans are one implementation copied and then locally edited — 80 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 (11 matched lines × 2 locations) apps/aihtml/assets/js/components/formatted_input.ts:129 — apps/aihtml/assets/js/components/formatted_input.ts:129 · apps/aihtml/assets/js/components/number_input.ts:45 — the two spans are one implementation copied and then locally edited — 97 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 (11 matched lines × 2 locations) apps/aihtml/assets/js/components/gantt.ts:123 — apps/aihtml/assets/js/components/gantt.ts:123 · apps/aihtml/assets/js/components/gantt.ts:139 — the two spans are one implementation copied and then locally edited — 88 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 (11 matched lines × 2 locations) apps/aihtml/assets/js/components/responsive_panel.ts:83 — apps/aihtml/assets/js/components/responsive_panel.ts:83 · apps/aihtml/assets/js/components/ribbon.ts:112 — the two spans are one implementation copied and then locally edited — 70 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.6 · ×5
  • Low contrast colour pair in CSS (2.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.bo-table th` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (2.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ch-search` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (2.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-upload-ring` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (2.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-addr-kind` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (2.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.pc-dropzone` sets color: #919eab on background-color: #f9fafb — 2.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
D3 · God Classes · TooManyFunctions · ×5
  • TooManyFunctions: aihtml_action apps/aihtml/src/aihtml_action.erl:46 — TooManyFunctions — 53 functions. The bar is 30 functions; this is 23 over it, 1.77× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: aihtml_dock_layout apps/aihtml/src/aihtml_dock_layout.erl:44 — TooManyFunctions — 39 functions. The bar is 30 functions; this is 9 over it, 1.30× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: aihtml_tile_layout apps/aihtml/src/aihtml_tile_layout.erl:31 — TooManyFunctions — 37 functions. The bar is 30 functions; this is 7 over it, 1.23× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: aihtml_diff apps/aihtml/src/aihtml_diff.erl:14 — TooManyFunctions — 34 functions. The bar is 30 functions; this is 4 over it, 1.13× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
  • TooManyFunctions: aihtml_lib_choice apps/aihtml/src/aihtml_lib_choice.erl:14 — TooManyFunctions — 34 functions. The bar is 30 functions; this is 4 over it, 1.13× the bar. The counted members are a module's functions — a module holds no instance state, so there is no shared data to group them by and no type to move them onto. To reduce it, extract each cohesive family of functions into a new module of its own and have this one delegate to it, so no single module carries every responsibility.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×5
  • Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_lib_button.erl:116 — apps/aihtml/src/aihtml_lib_button.erl:116-123 | apps/aihtml/src/aihtml_lib_table.erl:177-186 — 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.
  • Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_lib_overlay.erl:312 — apps/aihtml/src/aihtml_lib_overlay.erl:312-319 | apps/aihtml/src/aihtml_upload.erl:280-287 — 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.
  • Edited copy of a member (8 corresponding lines) apps/aihtml/src/aihtml_button.erl:52 — apps/aihtml/src/aihtml_button.erl:52-59 | apps/aihtml/src/aihtml_link_button.erl:41-48 — 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.
  • Edited copy of a member (8 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_datagrid.erl:230 — apps/aihtml_example/src/aihtml_example_demo_datagrid.erl:230-238 | apps/aihtml_example/src/aihtml_example_demo_datatable.erl:126-133 — 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.
  • Edited copy of a member (8 corresponding lines) apps/aihtml_example/src/aihtml_example_file_manager.erl:130 — apps/aihtml_example/src/aihtml_example_file_manager.erl:130-137 | apps/aihtml_example/src/aihtml_example_mail_app.erl:80-87 — 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 copy of a member (3 corresponding lines) · ×5
  • Edited copy of a member (3 corresponding lines) apps/aihtml/src/aihtml_timepicker.erl:304 — apps/aihtml/src/aihtml_timepicker.erl:304-307 | apps/aihtml/src/aihtml_input.erl:62-64 — These two members are one piece of code written twice and then edited apart: 3 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 (3 corresponding lines) apps/aihtml/src/aihtml_sup.erl:14 — apps/aihtml/src/aihtml_sup.erl:14-16 | apps/aihtml_example/src/aihtml_example_sup.erl:13-15 — These two members are one piece of code written twice and then edited apart: 3 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 (3 corresponding lines) apps/aihtml_cowboy/src/aihtml_cowboy_events.erl:122 — apps/aihtml_cowboy/src/aihtml_cowboy_events.erl:122-124 | apps/aihtml_example/src/aihtml_example_upload.erl:69-71 — These two members are one piece of code written twice and then edited apart: 3 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 (3 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:245 — apps/aihtml/src/aihtml_calendar.erl:245-247 | apps/aihtml/src/aihtml_scheduler.erl:142-144 — These two members are one piece of code written twice and then edited apart: 3 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 (3 corresponding lines) apps/aihtml_example/src/aihtml_example_demo_tree.erl:72 — apps/aihtml_example/src/aihtml_example_demo_tree.erl:72-74 | apps/aihtml_example/src/aihtml_example_demo_datepicker.erl:75-77 — These two members are one piece of code written twice and then edited apart: 3 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 · Duplicated block (5 lines × 2) · ×5
  • Duplicated block (5 lines × 2) apps/aihtml/src/aihtml_datatable.erl:799 — apps/aihtml/src/aihtml_datatable.erl:799-803 | apps/aihtml/src/aihtml_treegrid.erl:377-381 — 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 (5 lines × 2) apps/aihtml/src/aihtml_drawer.erl:92 — apps/aihtml/src/aihtml_drawer.erl:92-96 | apps/aihtml/src/aihtml_sheet.erl:86-90 — 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 `apps/aihtml/src/aihtml_drawer.erl:92` 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 (5 lines × 2) apps/aihtml/src/aihtml_lib_layout.erl:100 — apps/aihtml/src/aihtml_lib_layout.erl:100-104 | apps/aihtml/src/aihtml_lib_scroll.erl:79-83 — 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 (5 lines × 2) apps/aihtml/src/aihtml_dropdown_button.erl:44 — apps/aihtml/src/aihtml_dropdown_button.erl:44-48 | apps/aihtml/src/aihtml_split_button.erl:51-55 — 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 `apps/aihtml/src/aihtml_dropdown_button.erl:44` 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 (5 lines × 2) apps/aihtml_example/src/aihtml_example_actions.erl:105 — apps/aihtml_example/src/aihtml_example_actions.erl:105-109 | apps/aihtml_example/src/aihtml_example_views.erl:136-140 — 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.
R10 · Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) · ×5
  • Duplicated block with local edits (10 matched lines × 2 locations) apps/aihtml/assets/js/components/_lib_chart.ts:152 — apps/aihtml/assets/js/components/_lib_chart.ts:152 · apps/aihtml/assets/js/components/_lib_chart.ts:754 — the two spans are one implementation copied and then locally edited — 103 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 (10 matched lines × 2 locations) apps/aihtml/assets/js/components/colorpicker.ts:99 — apps/aihtml/assets/js/components/colorpicker.ts:99 · apps/aihtml/assets/js/components/responsive_panel.ts:53 — the two spans are one implementation copied and then locally edited — 69 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 (10 matched lines × 2 locations) apps/aihtml/assets/js/components/formatted_input.ts:265 — apps/aihtml/assets/js/components/formatted_input.ts:265 · apps/aihtml/assets/js/components/markdown_editor.ts:914 — the two spans are one implementation copied and then locally edited — 83 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 (10 matched lines × 2 locations) apps/aihtml/assets/js/components/menu.ts:156 — apps/aihtml/assets/js/components/menu.ts:156 · apps/aihtml/assets/js/components/navbar.ts:82 — the two spans are one implementation copied and then locally edited — 58 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 (10 matched lines × 2 locations) apps/aihtml/assets/js/components/nav_tree.ts:28 — apps/aihtml/assets/js/components/nav_tree.ts:28 · apps/aihtml/assets/js/components/sidenav.ts:69 — the two spans are one implementation copied and then locally edited — 76 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×4
  • Edited copy of a member (7 corresponding lines) apps/aihtml/src/aihtml_combobox.erl:248 — apps/aihtml/src/aihtml_combobox.erl:248-254 | apps/aihtml/src/aihtml_listbox.erl:157-163 — 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) apps/aihtml/src/aihtml_lib_markdown.erl:488 — apps/aihtml/src/aihtml_lib_markdown.erl:488-496 | apps/aihtml/src/aihtml_lib_markdown.erl:679-685 — 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) apps/aihtml_example/src/aihtml_example_demo_activity_bar.erl:30 — apps/aihtml_example/src/aihtml_example_demo_activity_bar.erl:30-37 | apps/aihtml_example/src/aihtml_example_demo_activity_bar.erl:52-58 — 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) apps/aihtml_example/src/aihtml_example_actions.erl:24 — apps/aihtml_example/src/aihtml_example_actions.erl:24-30 | apps/aihtml_example/src/aihtml_example_views.erl:11-18 — 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.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) apps/aihtml/src/aihtml_colorpicker.erl:309 — apps/aihtml/src/aihtml_colorpicker.erl:309-314 | apps/aihtml/src/aihtml_lib_nav.erl:115-120 | apps/aihtml/src/aihtml_timepicker.erl:288-293 — 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 all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) apps/aihtml/src/aihtml_gantt.erl:413 — apps/aihtml/src/aihtml_gantt.erl:413-418 | apps/aihtml/src/aihtml_scheduler.erl:945-950 | apps/aihtml/src/aihtml_swimlane.erl:472-477 — before extracting anything, compare `apps/aihtml/src/aihtml_gantt.erl` and `apps/aihtml/src/aihtml_scheduler.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `apps/aihtml/src/aihtml_gantt.erl:410` calls `replace`, `iolist_to_binary` and `apps/aihtml/src/aihtml_swimlane.erl:469` 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 (6 lines × 3) apps/aihtml/src/aihtml_gantt.erl:381 — apps/aihtml/src/aihtml_gantt.erl:381-386 | apps/aihtml/src/aihtml_scheduler.erl:907-912 | apps/aihtml/src/aihtml_swimlane.erl:442-447 — before extracting anything, compare `apps/aihtml/src/aihtml_gantt.erl` and `apps/aihtml/src/aihtml_scheduler.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `apps/aihtml/src/aihtml_gantt.erl:381` 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) apps/aihtml/src/aihtml_gantt.erl:429 — apps/aihtml/src/aihtml_gantt.erl:429-434 | apps/aihtml/src/aihtml_scheduler.erl:961-966 | apps/aihtml/src/aihtml_swimlane.erl:497-502 — before extracting anything, compare `apps/aihtml/src/aihtml_gantt.erl` and `apps/aihtml/src/aihtml_scheduler.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×3
  • MethodTooLong: DockLayoutController.setup apps/aihtml/assets/js/components/dock_layout.ts:620 — MethodTooLong — setup runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 59 over it, 1.59× 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: PivotgridController.setup apps/aihtml/assets/js/components/pivotgrid.ts:734 — MethodTooLong — setup runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25× 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: ColorpickerController.setup apps/aihtml/assets/js/components/colorpicker.ts:74 — MethodTooLong — setup runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.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.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×3
  • Edited copy of a member (14 corresponding lines) apps/aihtml/src/aihtml_lib_markdown.erl:1372 — apps/aihtml/src/aihtml_lib_markdown.erl:1372-1394 | apps/aihtml/src/aihtml_lib_markdown.erl:1398-1411 — 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) apps/aihtml/src/aihtml_area_chart.erl:93 — apps/aihtml/src/aihtml_area_chart.erl:93-106 | apps/aihtml/src/aihtml_bar_chart.erl:101-114 — 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) apps/aihtml/src/aihtml_checkbox_group.erl:47 — apps/aihtml/src/aihtml_checkbox_group.erl:47-62 | apps/aihtml/src/aihtml_radiobutton_group.erl:48-61 — 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.
D4 · Code Duplication · Edited copies of one member (3 members, 2+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_chart.erl:690 — apps/aihtml/src/aihtml_lib_chart.erl:690-691 | apps/aihtml/src/aihtml_node_graph.erl:602-603 | apps/aihtml/src/aihtml_pivotgrid.erl:344-345 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_dock.erl:76 — apps/aihtml/src/aihtml_lib_dock.erl:76-77 | apps/aihtml/src/aihtml_node_graph.erl:706-707 | apps/aihtml/src/aihtml_tree.erl:163-164 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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, 2+ corresponding lines) apps/aihtml/src/aihtml_lib_date.erl:134 — apps/aihtml/src/aihtml_lib_date.erl:134-135 | apps/aihtml/src/aihtml_range_selector.erl:239-240 | apps/aihtml/src/aihtml_timepicker.erl:182-183 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.0 · ×2
  • Low contrast colour pair in CSS (1.0:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ah-node-graph-group-delete:hover` sets color: #ff665c on background-color: #ff665c — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.0:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-pcard-social-btn:hover` sets color: #00a76f on background-color: #00a76f — 1.0:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.7 · ×2
  • Low contrast colour pair in CSS (3.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.dash-task-due[data-urgent=true]` sets color: #b76e00 on background-color: #fff5cc — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ml-folder-count[data-tone=warning]` sets color: #b76e00 on background-color: #fff5cc — 3.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.4 · ×2
  • Low contrast colour pair in CSS (4.4:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.fl-folder-avatar-more` sets color: #637381 on background-color: #f0f2f4 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (4.4:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-tab-badge[data-color=default]` sets color: #637381 on background-color: #f0f2f4 — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.2 · ×2
  • Low contrast colour pair in CSS (3.2:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ec-promo-badge` sets color: #fff on background-color: #ff5630 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (3.2:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.kb-chip[data-priority=high].is-active` sets color: #fff on background-color: #ff5630 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.7 · ×2
  • Low contrast colour pair in CSS (2.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.kb-search` sets color: #919eab on background-color: #fff — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (2.7:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-search` sets color: #919eab on background-color: #fff — 2.7:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.8 · ×2
  • Low contrast colour pair in CSS (1.8:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-table th` sets color: #637381 on background-color: #919eab — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
  • Low contrast colour pair in CSS (1.8:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.iv-table th` sets color: #637381 on background-color: #919eab — 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl:397 — apps/aihtml/src/aihtml_gantt.erl:397-408 | apps/aihtml/src/aihtml_scheduler.erl:929-940 | apps/aihtml/src/aihtml_swimlane.erl:458-469 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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, 12+ corresponding lines) apps/aihtml_example/src/aihtml_example_calendar_app.erl:12 — apps/aihtml_example/src/aihtml_example_calendar_app.erl:12-24 | apps/aihtml_example/src/aihtml_example_file_manager.erl:11-22 | apps/aihtml_example/src/aihtml_example_mail_app.erl:12-25 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 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 copy of a member (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) apps/aihtml/src/aihtml_cascader.erl:143 — apps/aihtml/src/aihtml_cascader.erl:143-154 | apps/aihtml/src/aihtml_lib_list.erl:27-38 — 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) apps/aihtml/src/aihtml_checkbox.erl:40 — apps/aihtml/src/aihtml_checkbox.erl:40-54 | apps/aihtml/src/aihtml_radiobutton.erl:37-48 — 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 copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) apps/aihtml/src/aihtml_checkbox_group.erl:35 — apps/aihtml/src/aihtml_checkbox_group.erl:35-44 | apps/aihtml/src/aihtml_radiobutton_group.erl:37-45 — These two members are one piece of code written twice and then edited apart: 9 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 (9 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:217 — apps/aihtml/src/aihtml_calendar.erl:217-226 | apps/aihtml/src/aihtml_scheduler.erl:281-289 — These two members are one piece of code written twice and then edited apart: 9 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, 3+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 3+ corresponding lines) apps/aihtml/src/aihtml_activity_bar.erl:131 — apps/aihtml/src/aihtml_activity_bar.erl:131-133 | apps/aihtml/src/aihtml_lib_tiles.erl:35-37 | apps/aihtml/src/aihtml_navigationbar.erl:270-272 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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, 3+ corresponding lines) apps/aihtml/src/aihtml_lib_form.erl:76 — apps/aihtml/src/aihtml_lib_form.erl:76-79 | apps/aihtml/src/aihtml_lib_layout.erl:74-77 | apps/aihtml/src/aihtml_lib_scroll.erl:89-91 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 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 · Duplicated block (7 lines × 5) · ×2
  • Duplicated block (7 lines × 5) apps/aihtml/src/aihtml_datagrid.erl:1457 — apps/aihtml/src/aihtml_datagrid.erl:1457-1463 | apps/aihtml/src/aihtml_diff.erl:318-324 | apps/aihtml/src/aihtml_lib_table.erl:330-336 | apps/aihtml/src/aihtml_nav_tree.erl:161-167 | apps/aihtml/src/aihtml_tree.erl:311-317 — 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 all 5 call sites, so a change lands once.
  • Duplicated block (7 lines × 5) apps/aihtml/src/aihtml_diff.erl:319 — apps/aihtml/src/aihtml_diff.erl:319-325 | apps/aihtml/src/aihtml_heatmap_calendar.erl:225-231 | apps/aihtml/src/aihtml_lib_table.erl:331-337 | apps/aihtml/src/aihtml_nav_tree.erl:162-168 | apps/aihtml/src/aihtml_tree.erl:312-318 — 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 all 5 call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `apps/aihtml/src/aihtml_diff.erl:318` calls `text` and `apps/aihtml/src/aihtml_heatmap_calendar.erl:223` does not — after which the two agree again for 4 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.
R10 · Code Duplication · Duplicated block (14 lines × 2 locations) · ×2
  • Duplicated block (14 lines × 2 locations) apps/aihtml/assets/js/components/datepicker.ts:37 — apps/aihtml/assets/js/components/datepicker.ts:37 · apps/aihtml/assets/js/components/datetime_input.ts:34 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (14 lines × 2 locations) apps/aihtml/assets/js/components/radiobutton.ts:20 — apps/aihtml/assets/js/components/radiobutton.ts:20 · apps/aihtml/assets/js/components/switch_button.ts:7 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (13 matched lines × 2 locations) apps/aihtml/assets/js/components/calendar.ts:672 — apps/aihtml/assets/js/components/calendar.ts:672 · apps/aihtml/assets/js/components/scheduler.ts:124 — the two spans are one implementation copied and then locally edited — 140 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 (13 matched lines × 2 locations) apps/aihtml/assets/js/components/datepicker.ts:251 — apps/aihtml/assets/js/components/datepicker.ts:251 · apps/aihtml/assets/js/components/formatted_input.ts:270 — the two spans are one implementation copied and then locally edited — 61 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 (11 lines × 2 locations) · ×2
  • Duplicated block (11 lines × 2 locations) apps/aihtml/assets/js/components/calendar.ts:264 — apps/aihtml/assets/js/components/calendar.ts:264 · apps/aihtml/assets/js/components/calendar.ts:327 — all 2 copies are in the same file, 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.
  • Duplicated block (11 lines × 2 locations) apps/aihtml/assets/js/components/datatable.ts:759 — apps/aihtml/assets/js/components/datatable.ts:759 · apps/aihtml/assets/js/components/treegrid.ts:368 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block (9 lines × 2 locations) · ×2
  • Duplicated block (9 lines × 2 locations) apps/aihtml/assets/js/components/combobox.ts:262 — apps/aihtml/assets/js/components/combobox.ts:262 · apps/aihtml/assets/js/components/dropdownlist.ts:225 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
  • Duplicated block (9 lines × 2 locations) scripts/screenshots.mjs:52 — scripts/screenshots.mjs:52 · scripts/test-js.mjs:100 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it.
R10 · Code Duplication · Duplicated block with local edits (8 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (8 matched lines × 2 locations) apps/aihtml/assets/js/components/_lib_chart.ts:730 — apps/aihtml/assets/js/components/_lib_chart.ts:730 · apps/aihtml/assets/js/components/datagrid.ts:336 — the two spans are one implementation copied and then locally edited — 51 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 (8 matched lines × 2 locations) apps/aihtml/assets/js/components/window.ts:34 — apps/aihtml/assets/js/components/window.ts:34 · apps/aihtml/assets/js/components/window.ts:51 — the two spans are one implementation copied and then locally edited — 56 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.
R10 · Code Duplication · Duplicated block (7 lines × 2 locations) · ×2
  • Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/datagrid.ts:1533 — apps/aihtml/assets/js/components/datagrid.ts:1533 · apps/aihtml/assets/js/components/pivotgrid.ts:1607 — 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.
  • Duplicated block (7 lines × 2 locations) apps/aihtml/assets/js/components/datepicker.ts:11 — apps/aihtml/assets/js/components/datepicker.ts:11 · apps/aihtml/assets/js/components/datetime_input.ts:15 — 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.
AC3 · Page structure · Empty <h3> heading · ×1
  • Empty <h3> heading apps/aihtml_example/priv/dashboard_pages/file.html:1 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus apps/aihtml/templates/dock_layout_float.mustache:1 — This <div role="dialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.8 · ×1
  • Low contrast colour pair in CSS (2.8:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.ah-pm-sel-toolbar button.active` sets color: #fff on background-color: #ff6b45 — 2.8:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.4 · ×1
  • Low contrast colour pair in CSS (2.4:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.kb-chip[data-priority=low].is-active` sets color: #fff on background-color: #00b8d9 — 2.4:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.9 · ×1
  • Low contrast colour pair in CSS (3.9:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.us-avatar` sets color: #8e33ff on background-color: #efd6ff — 3.9:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
AC6 · Visual & motion safety · Low contrast colour pair in CSS (1.6 · ×1
  • Low contrast colour pair in CSS (1.6:1) apps/aihtml_example/priv/static/css/example-rquMAIL_.css:2 — `.jb-candidates` sets color: #637381 on background-color: #00a76f — 1.6:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet — editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from).
D1 · Cyclomatic Complexity · DockLayoutController.setup (cyclomatic 86) · ×1
  • DockLayoutController.setup (cyclomatic 86) apps/aihtml/assets/js/components/dock_layout.ts:620 — DockLayoutController.setup has cyclomatic complexity 86 (threshold 15). Most of this is not in the body itself: 1 of the 86 points is its own statement and the rest belongs to 25 function items inside it that branch (a function literal at line 739, a function literal at line 646, a function literal at line 768, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_datatable.render_datatable (cyclomatic 81) · ×1
  • aihtml_datatable.render_datatable (cyclomatic 81) apps/aihtml/src/aihtml_datatable.erl:152 — aihtml_datatable.render_datatable has cyclomatic complexity 81 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NodeGraphController.wireViewport (cyclomatic 78) · ×1
  • NodeGraphController.wireViewport (cyclomatic 78) REDACTED:1987 — NodeGraphController.wireViewport has cyclomatic complexity 78 (threshold 15). Most of this is not in the body itself: 1 of the 78 points is its own statement and the rest belongs to 7 function items inside it that branch (a function literal at line 2071, a function literal at line 1997, a function literal at line 2043, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.setup (cyclomatic 65) · ×1
  • PivotgridController.setup (cyclomatic 65) apps/aihtml/assets/js/components/pivotgrid.ts:734 — PivotgridController.setup has cyclomatic complexity 65 (threshold 15). Most of this is not in the body itself: 12 of the 65 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 824, 758, 839, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MaskedInputController.setup (cyclomatic 52) · ×1
  • MaskedInputController.setup (cyclomatic 52) REDACTED:83 — MaskedInputController.setup has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 3 of the 52 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 99, 123, 156, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MenuController.#keydown (cyclomatic 52) · ×1
  • MenuController.#keydown (cyclomatic 52) apps/aihtml/assets/js/components/menu.ts:405 — MenuController.#keydown has cyclomatic complexity 52 (threshold 15). Of this number, 49 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_swimlane.render (cyclomatic 49) · ×1
  • aihtml_swimlane.render (cyclomatic 49) apps/aihtml/src/aihtml_swimlane.erl:98 — aihtml_swimlane.render has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · NodeGraphController.wireNodes (cyclomatic 49) · ×1
  • NodeGraphController.wireNodes (cyclomatic 49) REDACTED:1611 — NodeGraphController.wireNodes has cyclomatic complexity 49 (threshold 15). Most of this is not in the body itself: 1 of the 49 points is its own statement and the rest belongs to 13 function literals inside it that branch (lines 1717, 1641, 1668, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.#onKey (cyclomatic 49) · ×1
  • PivotgridController.#onKey (cyclomatic 49) apps/aihtml/assets/js/components/pivotgrid.ts:1529 — PivotgridController.#onKey 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.
D1 · Cyclomatic Complexity · FormattedInputController.setup (cyclomatic 48) · ×1
  • FormattedInputController.setup (cyclomatic 48) apps/aihtml/assets/js/components/formatted_input.ts:85 — FormattedInputController.setup has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 7 of the 48 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 104, 168, 194, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TileLayoutController.setup (cyclomatic 47) · ×1
  • TileLayoutController.setup (cyclomatic 47) REDACTED:347 — TileLayoutController.setup has cyclomatic complexity 47 (threshold 15). Most of this is not in the body itself: 1 of the 47 points is its own statement and the rest belongs to 10 function items inside it that branch (a function literal at line 368, a function literal at line 413, a function literal at line 404, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_datagrid.render (cyclomatic 46) · ×1
  • aihtml_datagrid.render (cyclomatic 46) apps/aihtml/src/aihtml_datagrid.erl:195 — aihtml_datagrid.render has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DatagridController.#keydown (cyclomatic 46) · ×1
  • DatagridController.#keydown (cyclomatic 46) apps/aihtml/assets/js/components/datagrid.ts:1209 — DatagridController.#keydown has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_pivotgrid.grid_view (cyclomatic 45) · ×1
  • aihtml_pivotgrid.grid_view (cyclomatic 45) apps/aihtml/src/aihtml_pivotgrid.erl:649 — aihtml_pivotgrid.grid_view has cyclomatic complexity 45 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · SchedulerController.setup (cyclomatic 43) · ×1
  • SchedulerController.setup (cyclomatic 43) apps/aihtml/assets/js/components/scheduler.ts:325 — SchedulerController.setup has cyclomatic complexity 43 (threshold 15). Most of this is not in the body itself: 2 of the 43 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 369, 349, 399, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ColorpickerController.setup (cyclomatic 41) · ×1
  • ColorpickerController.setup (cyclomatic 41) apps/aihtml/assets/js/components/colorpicker.ts:74 — ColorpickerController.setup has cyclomatic complexity 41 (threshold 15). Most of this is not in the body itself: 8 of the 41 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 144, a function literal at line 157, a function literal at line 167, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DropdownlistController.keydown (cyclomatic 41) · ×1
  • DropdownlistController.keydown (cyclomatic 41) apps/aihtml/assets/js/components/dropdownlist.ts:255 — DropdownlistController.keydown has cyclomatic complexity 41 (threshold 15). Of this number, 40 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SliderController.setup (cyclomatic 40) · ×1
  • SliderController.setup (cyclomatic 40) apps/aihtml/assets/js/components/slider.ts:55 — SliderController.setup has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 1 of the 40 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 59, a function literal at line 108, a function literal at line 135, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_gantt.render (cyclomatic 39) · ×1
  • aihtml_gantt.render (cyclomatic 39) apps/aihtml/src/aihtml_gantt.erl:85 — aihtml_gantt.render has cyclomatic complexity 39 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · RibbonController.setup (cyclomatic 38) · ×1
  • RibbonController.setup (cyclomatic 38) apps/aihtml/assets/js/components/ribbon.ts:38 — RibbonController.setup 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 10 function literals inside it that branch (lines 93, 107, 61, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SchedulerController.eventKey (cyclomatic 38) · ×1
  • SchedulerController.eventKey (cyclomatic 38) apps/aihtml/assets/js/components/scheduler.ts:642 — SchedulerController.eventKey has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SplitterController.setup (cyclomatic 38) · ×1
  • SplitterController.setup (cyclomatic 38) apps/aihtml/assets/js/components/splitter.ts:42 — SplitterController.setup has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 8 of the 38 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 104, a function literal at line 62, 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.
D1 · Cyclomatic Complexity · aihtml_datagrid.header_cell (cyclomatic 37) · ×1
  • aihtml_datagrid.header_cell (cyclomatic 37) apps/aihtml/src/aihtml_datagrid.erl:842 — aihtml_datagrid.header_cell has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DatagridController.setup (cyclomatic 37) · ×1
  • DatagridController.setup (cyclomatic 37) apps/aihtml/assets/js/components/datagrid.ts:441 — DatagridController.setup has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 15 of the 37 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 496, a function literal at line 537, inner, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · DatatableController.setup (cyclomatic 37) · ×1
  • DatatableController.setup (cyclomatic 37) apps/aihtml/assets/js/components/datatable.ts:192 — DatatableController.setup has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 2 of the 37 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 225, a function literal at line 207, pagerClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TimepickerController.setup (cyclomatic 37) · ×1
  • TimepickerController.setup (cyclomatic 37) REDACTED:89 — TimepickerController.setup has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 12 of the 37 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 113, 123, 181, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DatagridController.#click (cyclomatic 36) · ×1
  • DatagridController.#click (cyclomatic 36) apps/aihtml/assets/js/components/datagrid.ts:1276 — DatagridController.#click has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatetimeInputController.key (cyclomatic 36) · ×1
  • DatetimeInputController.key (cyclomatic 36) apps/aihtml/assets/js/components/datetime_input.ts:528 — DatetimeInputController.key has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CascaderController.key (cyclomatic 35) · ×1
  • CascaderController.key (cyclomatic 35) apps/aihtml/assets/js/components/cascader.ts:389 — CascaderController.key has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_datagrid.col (cyclomatic 34) · ×1
  • aihtml_datagrid.col (cyclomatic 34) apps/aihtml/src/aihtml_datagrid.erl:416 — aihtml_datagrid.col has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_datagrid.check (cyclomatic 32) · ×1
  • aihtml_datagrid.check (cyclomatic 32) apps/aihtml/src/aihtml_datagrid.erl:317 — aihtml_datagrid.check has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · aihtml_ribbon.render_ribbon (cyclomatic 32) · ×1
  • aihtml_ribbon.render_ribbon (cyclomatic 32) apps/aihtml/src/aihtml_ribbon.erl:107 — aihtml_ribbon.render_ribbon has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ComboboxController.setup (cyclomatic 32) · ×1
  • ComboboxController.setup (cyclomatic 32) apps/aihtml/assets/js/components/combobox.ts:70 — ComboboxController.setup has cyclomatic complexity 32 (threshold 15). Of this number, 16 points are the body's own statements and 16 belong to 8 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatepickerController.key (cyclomatic 32) · ×1
  • DatepickerController.key (cyclomatic 32) apps/aihtml/assets/js/components/datepicker.ts:442 — DatepickerController.key has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListboxController.key (cyclomatic 32) · ×1
  • ListboxController.key (cyclomatic 32) apps/aihtml/assets/js/components/listbox.ts:182 — ListboxController.key has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · scheduler.place (cyclomatic 32) · ×1
  • scheduler.place (cyclomatic 32) apps/aihtml/assets/js/components/scheduler.ts:215 — scheduler.place has cyclomatic complexity 32 (threshold 15). Of this number, 25 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_docking.apply_docking (cyclomatic 31) · ×1
  • aihtml_docking.apply_docking (cyclomatic 31) apps/aihtml/src/aihtml_docking.erl:262 — aihtml_docking.apply_docking has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_navigationbar.render (cyclomatic 31) · ×1
  • aihtml_navigationbar.render (cyclomatic 31) apps/aihtml/src/aihtml_navigationbar.erl:74 — aihtml_navigationbar.render has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SlashMenu.plugin (cyclomatic 31) · ×1
  • SlashMenu.plugin (cyclomatic 31) apps/aihtml/assets/js/components/markdown_editor.ts:944 — SlashMenu.plugin has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 972, 988, 949, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TreeController.keydown (cyclomatic 31) · ×1
  • TreeController.keydown (cyclomatic 31) apps/aihtml/assets/js/components/tree.ts:250 — TreeController.keydown 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, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_range_selector.render (cyclomatic 30) · ×1
  • aihtml_range_selector.render (cyclomatic 30) apps/aihtml/src/aihtml_range_selector.erl:67 — aihtml_range_selector.render has cyclomatic complexity 30 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ScrollviewController.setup (cyclomatic 30) · ×1
  • ScrollviewController.setup (cyclomatic 30) apps/aihtml/assets/js/components/scrollview.ts:44 — ScrollviewController.setup has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 2 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 103, end, a function literal at line 54, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · markdown_editor.listPlugins (cyclomatic 29) · ×1
  • markdown_editor.listPlugins (cyclomatic 29) apps/aihtml/assets/js/components/markdown_editor.ts:493 — markdown_editor.listPlugins 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 7 function items inside it that branch (unwrapSingle, deleteParaAfterList, a function literal at line 543, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · MenuController.setup (cyclomatic 29) · ×1
  • MenuController.setup (cyclomatic 29) apps/aihtml/assets/js/components/menu.ts:58 — MenuController.setup has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 6 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 92, a function literal at line 67, a function literal at line 134, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.#menuAction (cyclomatic 29) · ×1
  • PivotgridController.#menuAction (cyclomatic 29) apps/aihtml/assets/js/components/pivotgrid.ts:1375 — PivotgridController.#menuAction has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RelationGraphController.setup (cyclomatic 29) · ×1
  • RelationGraphController.setup (cyclomatic 29) apps/aihtml/assets/js/components/relation_graph.ts:117 — RelationGraphController.setup 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 7 function literals inside it that branch (lines 156, 122, 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.
D1 · Cyclomatic Complexity · aihtml_datepicker.month_view (cyclomatic 28) · ×1
  • aihtml_datepicker.month_view (cyclomatic 28) apps/aihtml/src/aihtml_datepicker.erl:240 — aihtml_datepicker.month_view has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_colorpicker.color_panel (cyclomatic 27) · ×1
  • aihtml_colorpicker.color_panel (cyclomatic 27) apps/aihtml/src/aihtml_colorpicker.erl:186 — aihtml_colorpicker.color_panel has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_treegrid.render_treegrid (cyclomatic 27) · ×1
  • aihtml_treegrid.render_treegrid (cyclomatic 27) apps/aihtml/src/aihtml_treegrid.erl:87 — aihtml_treegrid.render_treegrid has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CalendarController.dragStart (cyclomatic 27) · ×1
  • CalendarController.dragStart (cyclomatic 27) apps/aihtml/assets/js/components/calendar.ts:763 — CalendarController.dragStart has cyclomatic complexity 27 (threshold 15). Of this number, 26 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatepickerController.view (cyclomatic 27) · ×1
  • DatepickerController.view (cyclomatic 27) apps/aihtml/assets/js/components/datepicker.ts:297 — DatepickerController.view has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DockingController.key (cyclomatic 27) · ×1
  • DockingController.key (cyclomatic 27) apps/aihtml/assets/js/components/docking.ts:320 — DockingController.key has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeGraphController.beginDrag (cyclomatic 27) · ×1
  • NodeGraphController.beginDrag (cyclomatic 27) REDACTED:1312 — NodeGraphController.beginDrag has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (move, cleanup, up, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.#exportData (cyclomatic 27) · ×1
  • PivotgridController.#exportData (cyclomatic 27) apps/aihtml/assets/js/components/pivotgrid.ts:1416 — PivotgridController.#exportData has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1428, 1449, 1458, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · UploadController.setup (cyclomatic 27) · ×1
  • UploadController.setup (cyclomatic 27) apps/aihtml/assets/js/components/upload.ts:140 — UploadController.setup has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 210, a function literal at line 202, a function literal at line 170, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.r_list (cyclomatic 26) · ×1
  • aihtml_lib_markdown.r_list (cyclomatic 26) apps/aihtml/src/aihtml_lib_markdown.erl:575 — aihtml_lib_markdown.r_list has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Actions.#eventPayload (cyclomatic 26) · ×1
  • Actions.#eventPayload (cyclomatic 26) apps/aihtml/assets/js/runtime/actions.ts:158 — Actions.#eventPayload has cyclomatic complexity 26 (threshold 15). Of this number, 19 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _lib_rrule.expand (cyclomatic 26) · ×1
  • _lib_rrule.expand (cyclomatic 26) apps/aihtml/assets/js/components/_lib_rrule.ts:70 — _lib_rrule.expand has cyclomatic complexity 26 (threshold 15). Of this number, 21 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ComboboxController.key (cyclomatic 26) · ×1
  • ComboboxController.key (cyclomatic 26) apps/aihtml/assets/js/components/combobox.ts:391 — ComboboxController.key 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.
D1 · Cyclomatic Complexity · DatetimeInputController.setup (cyclomatic 26) · ×1
  • DatetimeInputController.setup (cyclomatic 26) apps/aihtml/assets/js/components/datetime_input.ts:228 — DatetimeInputController.setup has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 7 of the 26 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 279, 253, 263, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Validator.install (cyclomatic 26) · ×1
  • Validator.install (cyclomatic 26) REDACTED:206 — Validator.install has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 217, 207, 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.
D1 · Cyclomatic Complexity · WindowController.setup (cyclomatic 26) · ×1
  • WindowController.setup (cyclomatic 26) apps/aihtml/assets/js/components/window.ts:25 — WindowController.setup has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 83, a function literal at line 63, a function literal at line 37, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_combobox.render (cyclomatic 25) · ×1
  • aihtml_combobox.render (cyclomatic 25) apps/aihtml/src/aihtml_combobox.erl:89 — aihtml_combobox.render has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_datagrid.datagrid_query (cyclomatic 25) · ×1
  • aihtml_datagrid.datagrid_query (cyclomatic 25) apps/aihtml/src/aihtml_datagrid.erl:1179 — aihtml_datagrid.datagrid_query has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_ribbon.ribbon_cmd (cyclomatic 25) · ×1
  • aihtml_ribbon.ribbon_cmd (cyclomatic 25) apps/aihtml/src/aihtml_ribbon.erl:211 — aihtml_ribbon.ribbon_cmd has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_slider.render (cyclomatic 25) · ×1
  • aihtml_slider.render (cyclomatic 25) apps/aihtml/src/aihtml_slider.erl:47 — aihtml_slider.render has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EditorSession.mount (cyclomatic 25) · ×1
  • EditorSession.mount (cyclomatic 25) apps/aihtml/assets/js/components/markdown_editor.ts:1341 — EditorSession.mount has cyclomatic complexity 25 (threshold 15). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · markdown_editor.taskListRule (cyclomatic 25) · ×1
  • markdown_editor.taskListRule (cyclomatic 25) apps/aihtml/assets/js/components/markdown_editor.ts:200 — markdown_editor.taskListRule has cyclomatic complexity 25 (threshold 15). Of this number, 14 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NavbarController.setup (cyclomatic 25) · ×1
  • NavbarController.setup (cyclomatic 25) apps/aihtml/assets/js/components/navbar.ts:32 — NavbarController.setup has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 40, a function literal at line 67, a function literal at line 76, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · NumberInputController.setup (cyclomatic 25) · ×1
  • NumberInputController.setup (cyclomatic 25) apps/aihtml/assets/js/components/number_input.ts:38 — NumberInputController.setup 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 3 function literals inside it that branch (lines 43, 72, 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.
D1 · Cyclomatic Complexity · PivotgridController.#openMenu (cyclomatic 25) · ×1
  • PivotgridController.#openMenu (cyclomatic 25) apps/aihtml/assets/js/components/pivotgrid.ts:1331 — PivotgridController.#openMenu 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 one function literal inside it that branches (line 1335). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_button_group.render (cyclomatic 24) · ×1
  • aihtml_button_group.render (cyclomatic 24) apps/aihtml/src/aihtml_button_group.erl:38 — aihtml_button_group.render has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_dock_layout.parse_node (cyclomatic 24) · ×1
  • aihtml_dock_layout.parse_node (cyclomatic 24) apps/aihtml/src/aihtml_dock_layout.erl:383 — aihtml_dock_layout.parse_node has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_donut_chart.option (cyclomatic 24) · ×1
  • aihtml_donut_chart.option (cyclomatic 24) apps/aihtml/src/aihtml_donut_chart.erl:54 — aihtml_donut_chart.option has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.image_rest (cyclomatic 24) · ×1
  • aihtml_lib_markdown.image_rest (cyclomatic 24) apps/aihtml/src/aihtml_lib_markdown.erl:1619 — aihtml_lib_markdown.image_rest has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_scheduler.timeline_view (cyclomatic 24) · ×1
  • aihtml_scheduler.timeline_view (cyclomatic 24) apps/aihtml/src/aihtml_scheduler.erl:740 — aihtml_scheduler.timeline_view has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_scrollview.render (cyclomatic 24) · ×1
  • aihtml_scrollview.render (cyclomatic 24) apps/aihtml/src/aihtml_scrollview.erl:46 — aihtml_scrollview.render has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · ListmenuController.setup (cyclomatic 24) · ×1
  • ListmenuController.setup (cyclomatic 24) apps/aihtml/assets/js/components/listmenu.ts:70 — ListmenuController.setup has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 86, 127). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.#syncLayout (cyclomatic 24) · ×1
  • PivotgridController.#syncLayout (cyclomatic 24) apps/aihtml/assets/js/components/pivotgrid.ts:957 — PivotgridController.#syncLayout has cyclomatic complexity 24 (threshold 15). Of this number, 21 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PivotgridController.#moveField (cyclomatic 24) · ×1
  • PivotgridController.#moveField (cyclomatic 24) apps/aihtml/assets/js/components/pivotgrid.ts:1173 — PivotgridController.#moveField has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToolbarController.setup (cyclomatic 24) · ×1
  • ToolbarController.setup (cyclomatic 24) apps/aihtml/assets/js/components/toolbar.ts:109 — ToolbarController.setup has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 151, a function literal at line 166, 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.
D1 · Cyclomatic Complexity · TreegridController.#keydown (cyclomatic 24) · ×1
  • TreegridController.#keydown (cyclomatic 24) apps/aihtml/assets/js/components/treegrid.ts:322 — TreegridController.#keydown has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_html.render (cyclomatic 23) · ×1
  • aihtml_html.render (cyclomatic 23) apps/aihtml/src/aihtml_html.erl:109 — aihtml_html.render has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_tree.tree_node (cyclomatic 23) · ×1
  • aihtml_tree.tree_node (cyclomatic 23) apps/aihtml/src/aihtml_tree.erl:187 — aihtml_tree.tree_node has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DatatableController.#keydown (cyclomatic 23) · ×1
  • DatatableController.#keydown (cyclomatic 23) apps/aihtml/assets/js/components/datatable.ts:709 — DatatableController.#keydown has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · datatable.matchCond (cyclomatic 23) · ×1
  • datatable.matchCond (cyclomatic 23) apps/aihtml/assets/js/components/datatable.ts:106 — datatable.matchCond has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · InputOtpController.setup (cyclomatic 23) · ×1
  • InputOtpController.setup (cyclomatic 23) apps/aihtml/assets/js/components/input_otp.ts:16 — InputOtpController.setup has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 35, 17, 67, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TimepickerController.render (cyclomatic 23) · ×1
  • TimepickerController.render (cyclomatic 23) REDACTED:280 — TimepickerController.render has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_datepicker.render (cyclomatic 22) · ×1
  • aihtml_datepicker.render (cyclomatic 22) apps/aihtml/src/aihtml_datepicker.erl:73 — aihtml_datepicker.render has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_dock_layout.resolve (cyclomatic 22) · ×1
  • aihtml_dock_layout.resolve (cyclomatic 22) apps/aihtml/src/aihtml_dock_layout.erl:466 — aihtml_dock_layout.resolve has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.link_rest (cyclomatic 22) · ×1
  • aihtml_lib_markdown.link_rest (cyclomatic 22) apps/aihtml/src/aihtml_lib_markdown.erl:1427 — aihtml_lib_markdown.link_rest has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DatagridController.#viewLocal (cyclomatic 22) · ×1
  • DatagridController.#viewLocal (cyclomatic 22) apps/aihtml/assets/js/components/datagrid.ts:837 — DatagridController.#viewLocal has cyclomatic complexity 22 (threshold 15). Of this number, 15 points are the body's own statements and 7 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NodeGraphController.renderCard (cyclomatic 22) · ×1
  • NodeGraphController.renderCard (cyclomatic 22) REDACTED:922 — NodeGraphController.renderCard has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · UploadController.start (cyclomatic 22) · ×1
  • UploadController.start (cyclomatic 22) apps/aihtml/assets/js/components/upload.ts:399 — UploadController.start has cyclomatic complexity 22 (threshold 15). Of this number, 12 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · aihtml_scheduler.render (cyclomatic 21) · ×1
  • aihtml_scheduler.render (cyclomatic 21) apps/aihtml/src/aihtml_scheduler.erl:147 — aihtml_scheduler.render has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_tile_layout.render_node (cyclomatic 21) · ×1
  • aihtml_tile_layout.render_node (cyclomatic 21) apps/aihtml/src/aihtml_tile_layout.erl:190 — aihtml_tile_layout.render_node has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Swapper.#morphNode (cyclomatic 21) · ×1
  • Swapper.#morphNode (cyclomatic 21) apps/aihtml/assets/js/runtime/swap.ts:291 — Swapper.#morphNode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ButtonMenu.constructor (cyclomatic 21) · ×1
  • ButtonMenu.constructor (cyclomatic 21) apps/aihtml/assets/js/components/_lib_button.ts:80 — ButtonMenu.constructor 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 3 function literals inside it that branch (lines 93, 114, 85). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · calendar.calNormalize (cyclomatic 21) · ×1
  • calendar.calNormalize (cyclomatic 21) apps/aihtml/assets/js/components/calendar.ts:156 — calendar.calNormalize has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CommandController.setup (cyclomatic 21) · ×1
  • CommandController.setup (cyclomatic 21) apps/aihtml/assets/js/components/command.ts:27 — CommandController.setup has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 6 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 34, 65, 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.
D1 · Cyclomatic Complexity · DockLayoutController.dragTab (cyclomatic 21) · ×1
  • DockLayoutController.dragTab (cyclomatic 21) apps/aihtml/assets/js/components/dock_layout.ts:1138 — DockLayoutController.dragTab 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 5 function items inside it that branch (a function literal at line 1157, a function literal at line 1170, a function literal at line 1153, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · NodeGraphController.wireGroups (cyclomatic 21) · ×1
  • NodeGraphController.wireGroups (cyclomatic 21) REDACTED:1893 — NodeGraphController.wireGroups 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 11 function literals inside it that branch (lines 1894, 1943, 1914, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · PivotgridController.#setLayout (cyclomatic 21) · ×1
  • PivotgridController.#setLayout (cyclomatic 21) apps/aihtml/assets/js/components/pivotgrid.ts:1134 — PivotgridController.#setLayout has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SchedulerController.dragEnd (cyclomatic 21) · ×1
  • SchedulerController.dragEnd (cyclomatic 21) apps/aihtml/assets/js/components/scheduler.ts:596 — SchedulerController.dragEnd has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SortableController.keydown (cyclomatic 21) · ×1
  • SortableController.keydown (cyclomatic 21) apps/aihtml/assets/js/components/sortable.ts:391 — SortableController.keydown has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Tooltips.constructor (cyclomatic 21) · ×1
  • Tooltips.constructor (cyclomatic 21) apps/aihtml/assets/js/components/tooltip.ts:172 — Tooltips.constructor 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 8 function literals inside it that branch (lines 198, 188, 214, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_colorpicker.normalize_color (cyclomatic 20) · ×1
  • aihtml_colorpicker.normalize_color (cyclomatic 20) apps/aihtml/src/aihtml_colorpicker.erl:108 — aihtml_colorpicker.normalize_color 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.
D1 · Cyclomatic Complexity · aihtml_datatable.condition (cyclomatic 20) · ×1
  • aihtml_datatable.condition (cyclomatic 20) apps/aihtml/src/aihtml_datatable.erl:579 — aihtml_datatable.condition 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.
D1 · Cyclomatic Complexity · aihtml_datetime_input.render (cyclomatic 20) · ×1
  • aihtml_datetime_input.render (cyclomatic 20) apps/aihtml/src/aihtml_datetime_input.erl:71 — aihtml_datetime_input.render 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.
D1 · Cyclomatic Complexity · aihtml_lib_chart.graph_table (cyclomatic 20) · ×1
  • aihtml_lib_chart.graph_table (cyclomatic 20) apps/aihtml/src/aihtml_lib_chart.erl:400 — aihtml_lib_chart.graph_table has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.dec_seq (cyclomatic 20) · ×1
  • aihtml_lib_markdown.dec_seq (cyclomatic 20) apps/aihtml/src/aihtml_lib_markdown.erl:2569 — aihtml_lib_markdown.dec_seq 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.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.list_items (cyclomatic 20) · ×1
  • aihtml_lib_markdown.list_items (cyclomatic 20) apps/aihtml/src/aihtml_lib_markdown.erl:633 — aihtml_lib_markdown.list_items 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.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.url_parse (cyclomatic 20) · ×1
  • aihtml_lib_markdown.url_parse (cyclomatic 20) apps/aihtml/src/aihtml_lib_markdown.erl:2388 — aihtml_lib_markdown.url_parse 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.
D1 · Cyclomatic Complexity · aihtml_menu.menu_item (cyclomatic 20) · ×1
  • aihtml_menu.menu_item (cyclomatic 20) apps/aihtml/src/aihtml_menu.erl:74 — aihtml_menu.menu_item has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_tile_layout.rebuild (cyclomatic 20) · ×1
  • aihtml_tile_layout.rebuild (cyclomatic 20) apps/aihtml/src/aihtml_tile_layout.erl:335 — aihtml_tile_layout.rebuild 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.
D1 · Cyclomatic Complexity · NodeGraphController.wireLinks (cyclomatic 20) · ×1
  • NodeGraphController.wireLinks (cyclomatic 20) REDACTED:1810 — NodeGraphController.wireLinks 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 8 function literals inside it that branch (lines 1840, 1811, 1851, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · RangeSelectorController.setup (cyclomatic 20) · ×1
  • RangeSelectorController.setup (cyclomatic 20) apps/aihtml/assets/js/components/range_selector.ts:148 — RangeSelectorController.setup has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 189, num, onMarker, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · TransferController.key (cyclomatic 20) · ×1
  • TransferController.key (cyclomatic 20) apps/aihtml/assets/js/components/transfer.ts:170 — TransferController.key has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_dock_layout.render_dock_layout (cyclomatic 19) · ×1
  • aihtml_dock_layout.render_dock_layout (cyclomatic 19) apps/aihtml/src/aihtml_dock_layout.erl:196 — aihtml_dock_layout.render_dock_layout 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.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.lheading_scan (cyclomatic 19) · ×1
  • aihtml_lib_markdown.lheading_scan (cyclomatic 19) apps/aihtml/src/aihtml_lib_markdown.erl:891 — aihtml_lib_markdown.lheading_scan has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.ref_rest (cyclomatic 19) · ×1
  • aihtml_lib_markdown.ref_rest (cyclomatic 19) apps/aihtml/src/aihtml_lib_markdown.erl:777 — aihtml_lib_markdown.ref_rest has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_node_graph.render_node_graph (cyclomatic 19) · ×1
  • aihtml_node_graph.render_node_graph (cyclomatic 19) apps/aihtml/src/aihtml_node_graph.erl:169 — aihtml_node_graph.render_node_graph 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.
D1 · Cyclomatic Complexity · aihtml_relation_graph.network_option (cyclomatic 19) · ×1
  • aihtml_relation_graph.network_option (cyclomatic 19) apps/aihtml/src/aihtml_relation_graph.erl:123 — aihtml_relation_graph.network_option has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_scheduler.timegrid (cyclomatic 19) · ×1
  • aihtml_scheduler.timegrid (cyclomatic 19) apps/aihtml/src/aihtml_scheduler.erl:420 — aihtml_scheduler.timegrid 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.
D1 · Cyclomatic Complexity · _lib_chart.updateText (cyclomatic 19) · ×1
  • _lib_chart.updateText (cyclomatic 19) apps/aihtml/assets/js/components/_lib_chart.ts:516 — _lib_chart.updateText has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatagridController.#paintHeader (cyclomatic 19) · ×1
  • DatagridController.#paintHeader (cyclomatic 19) apps/aihtml/assets/js/components/datagrid.ts:959 — DatagridController.#paintHeader 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 3 function literals inside it that branch (lines 960, 978, 963). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DockingController.drag (cyclomatic 19) · ×1
  • DockingController.drag (cyclomatic 19) apps/aihtml/assets/js/components/docking.ts:255 — DockingController.drag 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 3 function literals inside it that branch (lines 291, 276, 264). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · EditorSession.exec (cyclomatic 19) · ×1
  • EditorSession.exec (cyclomatic 19) apps/aihtml/assets/js/components/markdown_editor.ts:1449 — EditorSession.exec 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, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TimepickerController.clockKey (cyclomatic 19) · ×1
  • TimepickerController.clockKey (cyclomatic 19) REDACTED:454 — TimepickerController.clockKey has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TreegridController.setup (cyclomatic 19) · ×1
  • TreegridController.setup (cyclomatic 19) apps/aihtml/assets/js/components/treegrid.ts:62 — TreegridController.setup 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 4 function literals inside it that branch (lines 72, 85, 99, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · aihtml_heatmap_calendar.render_heatmap (cyclomatic 18) · ×1
  • aihtml_heatmap_calendar.render_heatmap (cyclomatic 18) apps/aihtml/src/aihtml_heatmap_calendar.erl:66 — aihtml_heatmap_calendar.render_heatmap has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.enc (cyclomatic 18) · ×1
  • aihtml_lib_markdown.enc (cyclomatic 18) apps/aihtml/src/aihtml_lib_markdown.erl:2542 — aihtml_lib_markdown.enc has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · aihtml_lib_table.col (cyclomatic 18) · ×1
  • aihtml_lib_table.col (cyclomatic 18) apps/aihtml/src/aihtml_lib_table.erl:64 — aihtml_lib_table.col has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_treegrid.tg_row (cyclomatic 18) · ×1
  • aihtml_treegrid.tg_row (cyclomatic 18) apps/aihtml/src/aihtml_treegrid.erl:273 — aihtml_treegrid.tg_row has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Swapper.#morphChildren (cyclomatic 18) · ×1
  • Swapper.#morphChildren (cyclomatic 18) apps/aihtml/assets/js/runtime/swap.ts:331 — Swapper.#morphChildren has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 335). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Actions.#handlers (cyclomatic 18) · ×1
  • Actions.#handlers (cyclomatic 18) apps/aihtml/assets/js/runtime/actions.ts:228 — Actions.#handlers 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 9 function literals inside it that branch (lines 253, 279, 290, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Actions.#onEvent (cyclomatic 18) · ×1
  • Actions.#onEvent (cyclomatic 18) apps/aihtml/assets/js/runtime/actions.ts:439 — Actions.#onEvent has cyclomatic complexity 18 (threshold 15). Of this number, 10 points are the body's own statements and 8 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CalendarController.dragEnd (cyclomatic 18) · ×1
  • CalendarController.dragEnd (cyclomatic 18) apps/aihtml/assets/js/components/calendar.ts:875 — CalendarController.dragEnd has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DatepickerController.setup (cyclomatic 18) · ×1
  • DatepickerController.setup (cyclomatic 18) apps/aihtml/assets/js/components/datepicker.ts:134 — DatepickerController.setup has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DockLayoutController.runMenu (cyclomatic 18) · ×1
  • DockLayoutController.runMenu (cyclomatic 18) apps/aihtml/assets/js/components/dock_layout.ts:1329 — DockLayoutController.runMenu has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DragdropController.keydown (cyclomatic 18) · ×1
  • DragdropController.keydown (cyclomatic 18) apps/aihtml/assets/js/components/dragdrop.ts:261 — DragdropController.keydown has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GanttController.dragEnd (cyclomatic 18) · ×1
  • GanttController.dragEnd (cyclomatic 18) apps/aihtml/assets/js/components/gantt.ts:428 — GanttController.dragEnd has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BlockHandle.plugin (cyclomatic 18) · ×1
  • BlockHandle.plugin (cyclomatic 18) apps/aihtml/assets/js/components/markdown_editor.ts:1056 — BlockHandle.plugin 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 6 function literals inside it that branch (lines 1070, 1094, 1087, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MaskedInputController.insert (cyclomatic 18) · ×1
  • MaskedInputController.insert (cyclomatic 18) REDACTED:310 — MaskedInputController.insert has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeGraphController.searchMenu (cyclomatic 18) · ×1
  • NodeGraphController.searchMenu (cyclomatic 18) REDACTED:1456 — NodeGraphController.searchMenu 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 5 function items inside it that branch (paint, a function literal at line 1501, a function literal at line 1508, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · pivotgrid.gridView (cyclomatic 18) · ×1
  • pivotgrid.gridView (cyclomatic 18) apps/aihtml/assets/js/components/pivotgrid.ts:520 — pivotgrid.gridView has cyclomatic complexity 18 (threshold 15). Of this number, 13 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ResponsivePanelController.setup (cyclomatic 18) · ×1
  • ResponsivePanelController.setup (cyclomatic 18) apps/aihtml/assets/js/components/responsive_panel.ts:43 — ResponsivePanelController.setup 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 5 function literals inside it that branch (lines 79, 55, 62, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ScrollbarController.standalone (cyclomatic 18) · ×1
  • ScrollbarController.standalone (cyclomatic 18) apps/aihtml/assets/js/components/scrollbar.ts:276 — ScrollbarController.standalone 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 2 function literals inside it that branch (lines 292, 282). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · SortableController.setup (cyclomatic 18) · ×1
  • SortableController.setup (cyclomatic 18) apps/aihtml/assets/js/components/sortable.ts:289 — SortableController.setup 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 5 function literals inside it that branch (lines 294, 312, 317, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TileLayoutController.drop (cyclomatic 18) · ×1
  • TileLayoutController.drop (cyclomatic 18) REDACTED:566 — TileLayoutController.drop has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_expander.render (cyclomatic 17) · ×1
  • aihtml_expander.render (cyclomatic 17) apps/aihtml/src/aihtml_expander.erl:47 — aihtml_expander.render 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.
D1 · Cyclomatic Complexity · aihtml_lib_chart.dataset_table (cyclomatic 17) · ×1
  • aihtml_lib_chart.dataset_table (cyclomatic 17) apps/aihtml/src/aihtml_lib_chart.erl:225 — aihtml_lib_chart.dataset_table has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.bq_lines (cyclomatic 17) · ×1
  • aihtml_lib_markdown.bq_lines (cyclomatic 17) apps/aihtml/src/aihtml_lib_markdown.erl:438 — aihtml_lib_markdown.bq_lines 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.
D1 · Cyclomatic Complexity · aihtml_pivotgrid.value_spec (cyclomatic 17) · ×1
  • aihtml_pivotgrid.value_spec (cyclomatic 17) apps/aihtml/src/aihtml_pivotgrid.erl:347 — aihtml_pivotgrid.value_spec 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.
D1 · Cyclomatic Complexity · aihtml_relation_graph.norm_node (cyclomatic 17) · ×1
  • aihtml_relation_graph.norm_node (cyclomatic 17) apps/aihtml/src/aihtml_relation_graph.erl:378 — aihtml_relation_graph.norm_node 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.
D1 · Cyclomatic Complexity · aihtml_upload.render (cyclomatic 17) · ×1
  • aihtml_upload.render (cyclomatic 17) apps/aihtml/src/aihtml_upload.erl:91 — aihtml_upload.render 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.
D1 · Cyclomatic Complexity · SlideController.#listenDrag (cyclomatic 17) · ×1
  • SlideController.#listenDrag (cyclomatic 17) apps/aihtml/assets/js/components/_lib_overlay.ts:474 — SlideController.#listenDrag 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 items inside it that branch (a function literal at line 476, up, a function literal at line 490). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · ComboboxController.applyFilter (cyclomatic 17) · ×1
  • ComboboxController.applyFilter (cyclomatic 17) apps/aihtml/assets/js/components/combobox.ts:252 — ComboboxController.applyFilter has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatagridController.#beginEdit (cyclomatic 17) · ×1
  • DatagridController.#beginEdit (cyclomatic 17) apps/aihtml/assets/js/components/datagrid.ts:1576 — DatagridController.#beginEdit has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DatetimeInputController.calView (cyclomatic 17) · ×1
  • DatetimeInputController.calView (cyclomatic 17) apps/aihtml/assets/js/components/datetime_input.ts:591 — DatetimeInputController.calView has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · dock_layout.trackZones (cyclomatic 17) · ×1
  • dock_layout.trackZones (cyclomatic 17) apps/aihtml/assets/js/components/dock_layout.ts:489 — dock_layout.trackZones has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GanttController.taskKey (cyclomatic 17) · ×1
  • GanttController.taskKey (cyclomatic 17) apps/aihtml/assets/js/components/gantt.ts:346 — GanttController.taskKey has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeGraphController.applyLinkDrag (cyclomatic 17) · ×1
  • NodeGraphController.applyLinkDrag (cyclomatic 17) REDACTED:1050 — NodeGraphController.applyLinkDrag has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NodeGraphController.addNode (cyclomatic 17) · ×1
  • NodeGraphController.addNode (cyclomatic 17) REDACTED:1519 — NodeGraphController.addNode 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 one function literal inside it that branches (line 1524). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · password_input.strength (cyclomatic 17) · ×1
  • password_input.strength (cyclomatic 17) apps/aihtml/assets/js/components/password_input.ts:11 — password_input.strength has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · aihtml_bar_chart.option (cyclomatic 16) · ×1
  • aihtml_bar_chart.option (cyclomatic 16) apps/aihtml/src/aihtml_bar_chart.erl:51 — aihtml_bar_chart.option has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_diff.render_diff (cyclomatic 16) · ×1
  • aihtml_diff.render_diff (cyclomatic 16) apps/aihtml/src/aihtml_diff.erl:61 — aihtml_diff.render_diff has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_formatted_input.render (cyclomatic 16) · ×1
  • aihtml_formatted_input.render (cyclomatic 16) apps/aihtml/src/aihtml_formatted_input.erl:58 — aihtml_formatted_input.render has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.em_loop (cyclomatic 16) · ×1
  • aihtml_lib_markdown.em_loop (cyclomatic 16) apps/aihtml/src/aihtml_lib_markdown.erl:1905 — aihtml_lib_markdown.em_loop has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_lib_markdown.url_host (cyclomatic 16) · ×1
  • aihtml_lib_markdown.url_host (cyclomatic 16) apps/aihtml/src/aihtml_lib_markdown.erl:2434 — aihtml_lib_markdown.url_host has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · aihtml_tabs.render (cyclomatic 16) · ×1
  • aihtml_tabs.render (cyclomatic 16) apps/aihtml/src/aihtml_tabs.erl:52 — aihtml_tabs.render has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · aihtml_timeline.timeline_row (cyclomatic 16) · ×1
  • aihtml_timeline.timeline_row (cyclomatic 16) apps/aihtml/src/aihtml_timeline.erl:61 — aihtml_timeline.timeline_row has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Actions.#send (cyclomatic 16) · ×1
  • Actions.#send (cyclomatic 16) apps/aihtml/assets/js/runtime/actions.ts:387 — Actions.#send 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 4 function items inside it that branch (a function literal at line 414, a function literal at line 419, done, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · Fetcher.#roundTrip (cyclomatic 16) · ×1
  • Fetcher.#roundTrip (cyclomatic 16) apps/aihtml/assets/js/runtime/fetch.ts:70 — Fetcher.#roundTrip 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 4 function literals inside it that branch (lines 104, 94, 98, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · DatagridController.#menuItems (cyclomatic 16) · ×1
  • DatagridController.#menuItems (cyclomatic 16) apps/aihtml/assets/js/components/datagrid.ts:1439 — DatagridController.#menuItems has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DockLayoutController.openPanel (cyclomatic 16) · ×1
  • DockLayoutController.openPanel (cyclomatic 16) apps/aihtml/assets/js/components/dock_layout.ts:873 — DockLayoutController.openPanel has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ExpanderController.set (cyclomatic 16) · ×1
  • ExpanderController.set (cyclomatic 16) apps/aihtml/assets/js/components/expander.ts:56 — ExpanderController.set has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · gantt.layout (cyclomatic 16) · ×1
  • gantt.layout (cyclomatic 16) apps/aihtml/assets/js/components/gantt.ts:108 — gantt.layout 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 5 function items inside it that branch (a function literal at line 113, a function literal at line 140, under, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · BlockDrag.plugin (cyclomatic 16) · ×1
  • BlockDrag.plugin (cyclomatic 16) apps/aihtml/assets/js/components/markdown_editor.ts:1156 — BlockDrag.plugin has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1162, 1184, 1195, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · MenuController.minimize (cyclomatic 16) · ×1
  • MenuController.minimize (cyclomatic 16) apps/aihtml/assets/js/components/menu.ts:209 — MenuController.minimize has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 248, 241). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · NodeGraphController.applyNodeDrag (cyclomatic 16) · ×1
  • NodeGraphController.applyNodeDrag (cyclomatic 16) REDACTED:1021 — NodeGraphController.applyNodeDrag has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1036, 1023). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · ResponsivePanelController.close (cyclomatic 16) · ×1
  • ResponsivePanelController.close (cyclomatic 16) apps/aihtml/assets/js/components/responsive_panel.ts:142 — ResponsivePanelController.close has cyclomatic complexity 16 (threshold 15). Of this number, 13 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · swimlane.select (cyclomatic 16) · ×1
  • swimlane.select (cyclomatic 16) apps/aihtml/assets/js/components/swimlane.ts:173 — swimlane.select 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 2 function literals inside it that branch (lines 181, 176). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · TabsController.choose (cyclomatic 16) · ×1
  • TabsController.choose (cyclomatic 16) apps/aihtml/assets/js/components/tabs.ts:79 — TabsController.choose 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.
D1 · Cyclomatic Complexity · TreeController.setOpen (cyclomatic 16) · ×1
  • TreeController.setOpen (cyclomatic 16) apps/aihtml/assets/js/components/tree.ts:197 — TreeController.setOpen has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UploadController.addFiles (cyclomatic 16) · ×1
  • UploadController.addFiles (cyclomatic 16) apps/aihtml/assets/js/components/upload.ts:360 — UploadController.addFiles 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 one function literal inside it that branches (line 371). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PivotgridController.setup (cognitive 96) · ×1
  • PivotgridController.setup (cognitive 96) apps/aihtml/assets/js/components/pivotgrid.ts:734 — PivotgridController.setup has cognitive complexity 96 (threshold 15). Drivers by points: if/else 29 (53 pts), boolean chains 23, ternaries 6 (18 pts), error handling 1 (2 pts) (nesting depth added 37). Most of this is not in the body itself: 13 of the 96 points are its own statements and the rest belongs to 17 function literals inside it that branch (lines 758, 824, 780, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_datatable.render_datatable (cognitive 91) · ×1
  • aihtml_datatable.render_datatable (cognitive 91) apps/aihtml/src/aihtml_datatable.erl:152 — aihtml_datatable.render_datatable has cognitive complexity 91 (threshold 15). Drivers by points: match/switch 28 (31 pts), boolean chains 24, loops 15 (22 pts), if/else 8 (14 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeGraphController.wireViewport (cognitive 91) · ×1
  • NodeGraphController.wireViewport (cognitive 91) REDACTED:1987 — NodeGraphController.wireViewport has cognitive complexity 91 (threshold 15). Drivers by points: if/else 39 (50 pts), boolean chains 25, ternaries 7 (16 pts) (nesting depth added 20). None of this is in the body itself: all 91 points belong to 7 function items inside it that branch (a function literal at line 2071, a function literal at line 1997, a function literal at line 2043, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DockLayoutController.setup (cognitive 81) · ×1
  • DockLayoutController.setup (cognitive 81) apps/aihtml/assets/js/components/dock_layout.ts:620 — DockLayoutController.setup has cognitive complexity 81 (threshold 15). Drivers by points: if/else 40 (43 pts), boolean chains 23, ternaries 12 (14 pts), match/switch 1 (nesting depth added 5). None of this is in the body itself: all 81 points belong to 25 function items inside it that branch (a function literal at line 739, a function literal at line 646, a function literal at line 768, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · MenuController.#keydown (cognitive 73) · ×1
  • MenuController.#keydown (cognitive 73) apps/aihtml/assets/js/components/menu.ts:405 — MenuController.#keydown has cognitive complexity 73 (threshold 15). Drivers by points: if/else 26 (47 pts), boolean chains 11, ternaries 5 (11 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 29). Of this number, 70 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PivotgridController.#onKey (cognitive 69) · ×1
  • PivotgridController.#onKey (cognitive 69) apps/aihtml/assets/js/components/pivotgrid.ts:1529 — PivotgridController.#onKey has cognitive complexity 69 (threshold 15). Drivers by points: if/else 20 (37 pts), ternaries 9 (22 pts), boolean chains 9, match/switch 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_swimlane.render (cognitive 58) · ×1
  • aihtml_swimlane.render (cognitive 58) apps/aihtml/src/aihtml_swimlane.erl:98 — aihtml_swimlane.render has cognitive complexity 58 (threshold 15). Drivers by points: match/switch 20 (22 pts), if/else 6 (16 pts), loops 11 (15 pts), boolean chains 5 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_datagrid.render (cognitive 57) · ×1
  • aihtml_datagrid.render (cognitive 57) apps/aihtml/src/aihtml_datagrid.erl:195 — aihtml_datagrid.render has cognitive complexity 57 (threshold 15). Drivers by points: loops 13 (20 pts), match/switch 16 (17 pts), if/else 5 (14 pts), boolean chains 6 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_gantt.render (cognitive 53) · ×1
  • aihtml_gantt.render (cognitive 53) apps/aihtml/src/aihtml_gantt.erl:85 — aihtml_gantt.render has cognitive complexity 53 (threshold 15). Drivers by points: loops 20 (31 pts), if/else 4 (10 pts), match/switch 8 (9 pts), boolean chains 3 (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · aihtml_pivotgrid.grid_view (cognitive 53) · ×1
  • aihtml_pivotgrid.grid_view (cognitive 53) apps/aihtml/src/aihtml_pivotgrid.erl:649 — aihtml_pivotgrid.grid_view has cognitive complexity 53 (threshold 15). Drivers by points: match/switch 17 (23 pts), loops 13 (17 pts), if/else 5 (9 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · NodeGraphController.wireNodes (cognitive 52) · ×1
  • NodeGraphController.wireNodes (cognitive 52) REDACTED:1611 — NodeGraphController.wireNodes has cognitive complexity 52 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 20, ternaries 5 (7 pts) (nesting depth added 5). None of this is in the body itself: all 52 points belong to 13 function literals inside it that branch (lines 1690, 1717, 1641, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · FormattedInputController.setup (cognitive 51) · ×1
  • FormattedInputController.setup (cognitive 51) apps/aihtml/assets/js/components/formatted_input.ts:85 — FormattedInputController.setup has cognitive complexity 51 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 18, ternaries 3 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 4 of the 51 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 104, 168, 194, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DatagridController.#click (cognitive 50) · ×1
  • DatagridController.#click (cognitive 50) apps/aihtml/assets/js/components/datagrid.ts:1276 — DatagridController.#click has cognitive complexity 50 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 10, ternaries 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatagridController.#keydown (cognitive 49) · ×1
  • DatagridController.#keydown (cognitive 49) apps/aihtml/assets/js/components/datagrid.ts:1209 — DatagridController.#keydown has cognitive complexity 49 (threshold 15). Drivers by points: if/else 18 (34 pts), boolean chains 10, ternaries 2 (4 pts), match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MaskedInputController.setup (cognitive 49) · ×1
  • MaskedInputController.setup (cognitive 49) REDACTED:83 — MaskedInputController.setup has cognitive complexity 49 (threshold 15). Drivers by points: if/else 25 (33 pts), boolean chains 14, match/switch 1, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 49 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 99, 123, 156, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · SchedulerController.eventKey (cognitive 49) · ×1
  • SchedulerController.eventKey (cognitive 49) apps/aihtml/assets/js/components/scheduler.ts:642 — SchedulerController.eventKey has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 10, ternaries 4 (10 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown_editor.taskListRule (cognitive 48) · ×1
  • markdown_editor.taskListRule (cognitive 48) apps/aihtml/assets/js/components/markdown_editor.ts:200 — markdown_editor.taskListRule has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 4 (7 pts), boolean chains 6 (nesting depth added 24). Of this number, 22 points are the body's own statements and 26 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchedulerController.setup (cognitive 46) · ×1
  • SchedulerController.setup (cognitive 46) apps/aihtml/assets/js/components/scheduler.ts:325 — SchedulerController.setup has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 17, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 46 points is its own statement and the rest belongs to 11 function literals inside it that branch (lines 369, 349, 399, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_docking.apply_docking (cognitive 43) · ×1
  • aihtml_docking.apply_docking (cognitive 43) apps/aihtml/src/aihtml_docking.erl:262 — aihtml_docking.apply_docking has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 16 (19 pts), match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_chart.graph_table (cognitive 43) · ×1
  • aihtml_lib_chart.graph_table (cognitive 43) apps/aihtml/src/aihtml_lib_chart.erl:400 — aihtml_lib_chart.graph_table has cognitive complexity 43 (threshold 15). Drivers by points: match/switch 10 (20 pts), loops 7 (14 pts), if/else 3 (8 pts), boolean chains 1 (nesting depth added 22). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SliderController.setup (cognitive 43) · ×1
  • SliderController.setup (cognitive 43) apps/aihtml/assets/js/components/slider.ts:55 — SliderController.setup has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (27 pts), ternaries 7 (8 pts), boolean chains 6, error handling 2 (nesting depth added 5). None of this is in the body itself: all 43 points belong to 8 function items inside it that branch (a function literal at line 59, a function literal at line 108, a function literal at line 101, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · TileLayoutController.setup (cognitive 43) · ×1
  • TileLayoutController.setup (cognitive 43) REDACTED:347 — TileLayoutController.setup has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (25 pts), ternaries 9 (11 pts), boolean chains 6, match/switch 1 (nesting depth added 4). None of this is in the body itself: all 43 points belong to 10 function items inside it that branch (a function literal at line 368, a function literal at line 413, a function literal at line 404, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DatatableController.setup (cognitive 42) · ×1
  • DatatableController.setup (cognitive 42) apps/aihtml/assets/js/components/datatable.ts:192 — DatatableController.setup has cognitive complexity 42 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 10, ternaries 4 (6 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 42 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 225, a function literal at line 207, pagerClick, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · scheduler.place (cognitive 41) · ×1
  • scheduler.place (cognitive 41) apps/aihtml/assets/js/components/scheduler.ts:215 — scheduler.place has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 13, loops 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 13). Of this number, 31 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_datepicker.month_view (cognitive 40) · ×1
  • aihtml_datepicker.month_view (cognitive 40) apps/aihtml/src/aihtml_datepicker.erl:240 — aihtml_datepicker.month_view has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 7 (8 pts), boolean chains 7, loops 4 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_chart.dataset_table (cognitive 40) · ×1
  • aihtml_lib_chart.dataset_table (cognitive 40) apps/aihtml/src/aihtml_lib_chart.erl:225 — aihtml_lib_chart.dataset_table has cognitive complexity 40 (threshold 15). Drivers by points: loops 7 (25 pts), match/switch 7 (15 pts) (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DockingController.key (cognitive 40) · ×1
  • DockingController.key (cognitive 40) apps/aihtml/assets/js/components/docking.ts:320 — DockingController.key has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 6 (18 pts), if/else 13 (15 pts), boolean chains 7 (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.
D2 · Cognitive Complexity · RibbonController.setup (cognitive 39) · ×1
  • RibbonController.setup (cognitive 39) apps/aihtml/assets/js/components/ribbon.ts:38 — RibbonController.setup has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 13, ternaries 2 (nesting depth added 2). Most of this is not in the body itself: 5 of the 39 points are its own statements and the rest belongs to 10 function literals inside it that branch (lines 93, 61, 107, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TimepickerController.setup (cognitive 39) · ×1
  • TimepickerController.setup (cognitive 39) REDACTED:89 — TimepickerController.setup has cognitive complexity 39 (threshold 15). Drivers by points: if/else 21 (26 pts), boolean chains 12, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 9 of the 39 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 113, 123, 181, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DropdownlistController.keydown (cognitive 38) · ×1
  • DropdownlistController.keydown (cognitive 38) apps/aihtml/assets/js/components/dropdownlist.ts:255 — DropdownlistController.keydown has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 12, ternaries 2 (3 pts) (nesting depth added 6). Of this number, 37 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · aihtml_datagrid.datagrid_query (cognitive 37) · ×1
  • aihtml_datagrid.datagrid_query (cognitive 37) apps/aihtml/src/aihtml_datagrid.erl:1179 — aihtml_datagrid.datagrid_query has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 12 (13 pts), loops 3 (4 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.
D2 · Cognitive Complexity · aihtml_navigationbar.render (cognitive 37) · ×1
  • aihtml_navigationbar.render (cognitive 37) apps/aihtml/src/aihtml_navigationbar.erl:74 — aihtml_navigationbar.render has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 9 (12 pts), boolean chains 6, loops 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatepickerController.key (cognitive 37) · ×1
  • DatepickerController.key (cognitive 37) apps/aihtml/assets/js/components/datepicker.ts:442 — DatepickerController.key has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (28 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MenuController.setup (cognitive 37) · ×1
  • MenuController.setup (cognitive 37) apps/aihtml/assets/js/components/menu.ts:58 — MenuController.setup has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21 (27 pts), boolean chains 10 (nesting depth added 6). Most of this is not in the body itself: 7 of the 37 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 92, a function literal at line 67, a function literal at line 138, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · aihtml_lib_markdown.r_list (cognitive 36) · ×1
  • aihtml_lib_markdown.r_list (cognitive 36) apps/aihtml/src/aihtml_lib_markdown.erl:575 — aihtml_lib_markdown.r_list has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 12 (28 pts), boolean chains 4, if/else 1 (4 pts) (nesting depth added 19). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_datagrid.col (cognitive 35) · ×1
  • aihtml_datagrid.col (cognitive 35) apps/aihtml/src/aihtml_datagrid.erl:416 — aihtml_datagrid.col has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 15, match/switch 12 (14 pts), loops 4, if/else 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SchedulerController.dragEnd (cognitive 35) · ×1
  • SchedulerController.dragEnd (cognitive 35) apps/aihtml/assets/js/components/scheduler.ts:596 — SchedulerController.dragEnd has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 5, ternaries 1 (3 pts) (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.
D2 · Cognitive Complexity · ComboboxController.setup (cognitive 34) · ×1
  • ComboboxController.setup (cognitive 34) apps/aihtml/assets/js/components/combobox.ts:70 — ComboboxController.setup has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 14, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 15 of the 34 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 88, 139, 128, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DatagridController.setup (cognitive 33) · ×1
  • DatagridController.setup (cognitive 33) apps/aihtml/assets/js/components/datagrid.ts:441 — DatagridController.setup has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 18, if/else 12, ternaries 3. Most of this is not in the body itself: 14 of the 33 points are its own statements and the rest belongs to 9 function items inside it that branch (a function literal at line 496, a function literal at line 537, a function literal at line 483, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DatetimeInputController.setup (cognitive 33) · ×1
  • DatetimeInputController.setup (cognitive 33) apps/aihtml/assets/js/components/datetime_input.ts:228 — DatetimeInputController.setup has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 7). Most of this is not in the body itself: 5 of the 33 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 272, 279, 309, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_ribbon.render_ribbon (cognitive 32) · ×1
  • aihtml_ribbon.render_ribbon (cognitive 32) apps/aihtml/src/aihtml_ribbon.erl:107 — aihtml_ribbon.render_ribbon has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 7 (9 pts), boolean chains 6, loops 5 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ColorpickerController.setup (cognitive 32) · ×1
  • ColorpickerController.setup (cognitive 32) apps/aihtml/assets/js/components/colorpicker.ts:74 — ColorpickerController.setup has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5, match/switch 3 (nesting depth added 6). Most of this is not in the body itself: 8 of the 32 points are its own statements and the rest belongs to 15 function items inside it that branch (a function literal at line 97, a function literal at line 105, a function literal at line 182, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SortableController.keydown (cognitive 32) · ×1
  • SortableController.keydown (cognitive 32) apps/aihtml/assets/js/components/sortable.ts:391 — SortableController.keydown has cognitive complexity 32 (threshold 15). Drivers by points: ternaries 6 (15 pts), if/else 9 (13 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_datagrid.header_cell (cognitive 31) · ×1
  • aihtml_datagrid.header_cell (cognitive 31) apps/aihtml/src/aihtml_datagrid.erl:842 — aihtml_datagrid.header_cell has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 11 (12 pts), boolean chains 9, loops 4 (6 pts), if/else 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_markdown.ref_rest (cognitive 31) · ×1
  • aihtml_lib_markdown.ref_rest (cognitive 31) apps/aihtml/src/aihtml_lib_markdown.erl:777 — aihtml_lib_markdown.ref_rest has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 10 (28 pts), boolean chains 3 (nesting depth added 18). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ComboboxController.key (cognitive 31) · ×1
  • ComboboxController.key (cognitive 31) apps/aihtml/assets/js/components/combobox.ts:391 — ComboboxController.key has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · GanttController.dragEnd (cognitive 31) · ×1
  • GanttController.dragEnd (cognitive 31) apps/aihtml/assets/js/components/gantt.ts:428 — GanttController.dragEnd has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 8 (12 pts), boolean chains 6 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListboxController.key (cognitive 31) · ×1
  • ListboxController.key (cognitive 31) apps/aihtml/assets/js/components/listbox.ts:182 — ListboxController.key has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PivotgridController.#exportData (cognitive 31) · ×1
  • PivotgridController.#exportData (cognitive 31) apps/aihtml/assets/js/components/pivotgrid.ts:1416 — PivotgridController.#exportData has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (11 pts), boolean chains 9, if/else 6 (9 pts), ternaries 2 (nesting depth added 6). Most of this is not in the body itself: 13 of the 31 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 1428, 1449, 1458, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_button_group.render (cognitive 30) · ×1
  • aihtml_button_group.render (cognitive 30) apps/aihtml/src/aihtml_button_group.erl:38 — aihtml_button_group.render has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 12 (14 pts), if/else 7 (12 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Actions.#eventPayload (cognitive 30) · ×1
  • Actions.#eventPayload (cognitive 30) apps/aihtml/assets/js/runtime/actions.ts:158 — Actions.#eventPayload has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 8, ternaries 6 (8 pts) (nesting depth added 5). Of this number, 21 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · SplitterController.setup (cognitive 30) · ×1
  • SplitterController.setup (cognitive 30) apps/aihtml/assets/js/components/splitter.ts:42 — SplitterController.setup has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12, boolean chains 11, ternaries 3 (4 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 2). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 104, a function literal at line 62, 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.
D2 · Cognitive Complexity · TimepickerController.render (cognitive 30) · ×1
  • TimepickerController.render (cognitive 30) REDACTED:280 — TimepickerController.render has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 6 (9 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_datagrid.check (cognitive 29) · ×1
  • aihtml_datagrid.check (cognitive 29) apps/aihtml/src/aihtml_datagrid.erl:317 — aihtml_datagrid.check has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 21, match/switch 8. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_dock_layout.resolve (cognitive 29) · ×1
  • aihtml_dock_layout.resolve (cognitive 29) apps/aihtml/src/aihtml_dock_layout.erl:466 — aihtml_dock_layout.resolve has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 8 (12 pts), loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_range_selector.render (cognitive 29) · ×1
  • aihtml_range_selector.render (cognitive 29) apps/aihtml/src/aihtml_range_selector.erl:67 — aihtml_range_selector.render has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), match/switch 8, loops 4 (5 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CalendarController.dragEnd (cognitive 29) · ×1
  • CalendarController.dragEnd (cognitive 29) apps/aihtml/assets/js/components/calendar.ts:875 — CalendarController.dragEnd has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MaskedInputController.insert (cognitive 29) · ×1
  • MaskedInputController.insert (cognitive 29) REDACTED:310 — MaskedInputController.insert has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), ternaries 3 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TileLayoutController.drop (cognitive 29) · ×1
  • TileLayoutController.drop (cognitive 29) REDACTED:566 — TileLayoutController.drop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToolbarController.setup (cognitive 29) · ×1
  • ToolbarController.setup (cognitive 29) apps/aihtml/assets/js/components/toolbar.ts:109 — ToolbarController.setup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 5). 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 138, a function literal at line 151, a function literal at line 166, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CalendarController.dragStart (cognitive 28) · ×1
  • CalendarController.dragStart (cognitive 28) apps/aihtml/assets/js/components/calendar.ts:763 — CalendarController.dragStart has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 7, ternaries 2 (5 pts) (nesting depth added 7). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CascaderController.key (cognitive 28) · ×1
  • CascaderController.key (cognitive 28) apps/aihtml/assets/js/components/cascader.ts:389 — CascaderController.key has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 5, ternaries 2 (5 pts), match/switch 2 (3 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.
D2 · Cognitive Complexity · NodeGraphController.beginDrag (cognitive 28) · ×1
  • NodeGraphController.beginDrag (cognitive 28) REDACTED:1312 — NodeGraphController.beginDrag has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 8, error handling 2 (nesting depth added 1). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to 8 function items inside it that branch (move, up, cleanup, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · aihtml_lib_markdown.image_rest (cognitive 27) · ×1
  • aihtml_lib_markdown.image_rest (cognitive 27) apps/aihtml/src/aihtml_lib_markdown.erl:1619 — aihtml_lib_markdown.image_rest has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 9 (21 pts), boolean chains 3, if/else 1 (3 pts) (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PivotgridController.#moveField (cognitive 27) · ×1
  • PivotgridController.#moveField (cognitive 27) apps/aihtml/assets/js/components/pivotgrid.ts:1173 — PivotgridController.#moveField has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 6). Of this number, 21 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TimepickerController.clockKey (cognitive 27) · ×1
  • TimepickerController.clockKey (cognitive 27) REDACTED:454 — TimepickerController.clockKey has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 2 (5 pts), boolean chains 4, loops 1 (3 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.
D2 · Cognitive Complexity · aihtml_lib_markdown.i_entity (cognitive 26) · ×1
  • aihtml_lib_markdown.i_entity (cognitive 26) apps/aihtml/src/aihtml_lib_markdown.erl:1723 — aihtml_lib_markdown.i_entity has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 10 (24 pts), boolean chains 2 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_menu.menu_item (cognitive 26) · ×1
  • aihtml_menu.menu_item (cognitive 26) apps/aihtml/src/aihtml_menu.erl:74 — aihtml_menu.menu_item has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (7 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_treegrid.render_treegrid (cognitive 26) · ×1
  • aihtml_treegrid.render_treegrid (cognitive 26) apps/aihtml/src/aihtml_treegrid.erl:87 — aihtml_treegrid.render_treegrid has cognitive complexity 26 (threshold 15). Drivers by points: loops 7 (8 pts), match/switch 8, boolean chains 5, if/else 3 (5 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ButtonMenu.constructor (cognitive 26) · ×1
  • ButtonMenu.constructor (cognitive 26) apps/aihtml/assets/js/components/_lib_button.ts:80 — ButtonMenu.constructor has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, ternaries 2 (5 pts) (nesting depth added 6). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 93, 85, 114). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · _lib_rrule.expand (cognitive 26) · ×1
  • _lib_rrule.expand (cognitive 26) apps/aihtml/assets/js/components/_lib_rrule.ts:70 — _lib_rrule.expand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, loops 3 (7 pts) (nesting depth added 9). Of this number, 22 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatagridController.#viewLocal (cognitive 26) · ×1
  • DatagridController.#viewLocal (cognitive 26) apps/aihtml/assets/js/components/datagrid.ts:837 — DatagridController.#viewLocal has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, ternaries 4 (nesting depth added 4). Of this number, 16 points are the body's own statements and 10 belong to 4 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · pivotgrid.gridView.rows (cognitive 26) · ×1
  • pivotgrid.gridView.rows (cognitive 26) apps/aihtml/assets/js/components/pivotgrid.ts:581 — pivotgrid.gridView.rows has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 11 (26 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · aihtml_lib_markdown.lheading_scan (cognitive 25) · ×1
  • aihtml_lib_markdown.lheading_scan (cognitive 25) apps/aihtml/src/aihtml_lib_markdown.erl:891 — aihtml_lib_markdown.lheading_scan has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 7 (22 pts), boolean chains 3 (nesting depth added 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. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_tile_layout.rebuild (cognitive 25) · ×1
  • aihtml_tile_layout.rebuild (cognitive 25) apps/aihtml/src/aihtml_tile_layout.erl:335 — aihtml_tile_layout.rebuild has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 17 (21 pts), boolean chains 4 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · DatetimeInputController.key (cognitive 25) · ×1
  • DatetimeInputController.key (cognitive 25) apps/aihtml/assets/js/components/datetime_input.ts:528 — DatetimeInputController.key has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditorSession.mount (cognitive 25) · ×1
  • EditorSession.mount (cognitive 25) apps/aihtml/assets/js/components/markdown_editor.ts:1341 — EditorSession.mount has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, if/else 10 (11 pts), ternaries 1 (nesting depth added 1). Of this number, 23 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · NumberInputController.setup (cognitive 25) · ×1
  • NumberInputController.setup (cognitive 25) apps/aihtml/assets/js/components/number_input.ts:38 — NumberInputController.setup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7, ternaries 3 (4 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 43, 72, 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.
D2 · Cognitive Complexity · PivotgridController.#openMenu (cognitive 25) · ×1
  • PivotgridController.#openMenu (cognitive 25) apps/aihtml/assets/js/components/pivotgrid.ts:1331 — PivotgridController.#openMenu has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 10, if/else 8 (9 pts), ternaries 3 (6 pts) (nesting depth added 4). Most of this is not in the body itself: 8 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 1335). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PivotgridController.#menuAction (cognitive 25) · ×1
  • PivotgridController.#menuAction (cognitive 25) apps/aihtml/assets/js/components/pivotgrid.ts:1375 — PivotgridController.#menuAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 5 (9 pts), boolean chains 6, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TreeController.keydown (cognitive 25) · ×1
  • TreeController.keydown (cognitive 25) apps/aihtml/assets/js/components/tree.ts:250 — TreeController.keydown has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 7, ternaries 2 (3 pts), match/switch 1 (nesting depth added 6). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WindowController.setup (cognitive 25) · ×1
  • WindowController.setup (cognitive 25) apps/aihtml/assets/js/components/window.ts:25 — WindowController.setup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14, ternaries 4 (6 pts), boolean chains 5 (nesting depth added 2). Most of this is not in the body itself: 1 of the 25 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 83, a function literal at line 63, a function literal at line 54, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CommandController.setup (cognitive 24) · ×1
  • CommandController.setup (cognitive 24) apps/aihtml/assets/js/components/command.ts:27 — CommandController.setup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 5, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 34, 65, 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.
D2 · Cognitive Complexity · PivotgridController.#syncLayout (cognitive 24) · ×1
  • PivotgridController.#syncLayout (cognitive 24) apps/aihtml/assets/js/components/pivotgrid.ts:957 — PivotgridController.#syncLayout has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 7, loops 6 (7 pts), ternaries 1 (nesting depth added 3). Of this number, 22 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RelationGraphController.setup (cognitive 24) · ×1
  • RelationGraphController.setup (cognitive 24) apps/aihtml/assets/js/components/relation_graph.ts:117 — RelationGraphController.setup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5, ternaries 3 (4 pts), match/switch 1 (nesting depth added 3). None of this is in the body itself: all 24 points belong to 7 function literals inside it that branch (lines 122, 156, 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.
D2 · Cognitive Complexity · aihtml_lib_chart.radar_table (cognitive 23) · ×1
  • aihtml_lib_chart.radar_table (cognitive 23) apps/aihtml/src/aihtml_lib_chart.erl:384 — aihtml_lib_chart.radar_table has cognitive complexity 23 (threshold 15). Drivers by points: loops 6 (11 pts), match/switch 6 (11 pts), boolean chains 1 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · aihtml_lib_markdown.bq_lines (cognitive 23) · ×1
  • aihtml_lib_markdown.bq_lines (cognitive 23) apps/aihtml/src/aihtml_lib_markdown.erl:438 — aihtml_lib_markdown.bq_lines has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 8 (21 pts), boolean chains 1, if/else 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_lib_markdown.link_rest (cognitive 23) · ×1
  • aihtml_lib_markdown.link_rest (cognitive 23) apps/aihtml/src/aihtml_lib_markdown.erl:1427 — aihtml_lib_markdown.link_rest has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 8 (20 pts), boolean chains 3 (nesting depth added 12). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_scheduler.timegrid (cognitive 23) · ×1
  • aihtml_scheduler.timegrid (cognitive 23) apps/aihtml/src/aihtml_scheduler.erl:420 — aihtml_scheduler.timegrid has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 4 (8 pts), match/switch 4 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_scrollview.render (cognitive 23) · ×1
  • aihtml_scrollview.render (cognitive 23) apps/aihtml/src/aihtml_scrollview.erl:46 — aihtml_scrollview.render has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 14, match/switch 5, if/else 3 (4 pts) (nesting depth added 1). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D2 · Cognitive Complexity · aihtml_tile_layout.apply_value (cognitive 23) · ×1
  • aihtml_tile_layout.apply_value (cognitive 23) apps/aihtml/src/aihtml_tile_layout.erl:287 — aihtml_tile_layout.apply_value has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 2 (5 pts), match/switch 3 (4 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Actions.#handlers (cognitive 23) · ×1
  • Actions.#handlers (cognitive 23) apps/aihtml/assets/js/runtime/actions.ts:228 — Actions.#handlers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 4, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 23 points belong to 9 function literals inside it that branch (lines 253, 279, 290, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Validator.install (cognitive 23) · ×1
  • Validator.install (cognitive 23) REDACTED:206 — Validator.install has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 9, ternaries 2. None of this is in the body itself: all 23 points belong to 4 function literals inside it that branch (lines 217, 207, 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.
D2 · Cognitive Complexity · UploadController.setup (cognitive 23) · ×1
  • UploadController.setup (cognitive 23) apps/aihtml/assets/js/components/upload.ts:140 — UploadController.setup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 8, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 210, a function literal at line 170, a function literal at line 178, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · aihtml_colorpicker.color_panel (cognitive 22) · ×1
  • aihtml_colorpicker.color_panel (cognitive 22) apps/aihtml/src/aihtml_colorpicker.erl:186 — aihtml_colorpicker.color_panel has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 12 (14 pts), if/else 4 (5 pts), boolean chains 2, loops 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_donut_chart.option (cognitive 22) · ×1
  • aihtml_donut_chart.option (cognitive 22) apps/aihtml/src/aihtml_donut_chart.erl:54 — aihtml_donut_chart.option has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 6, loops 5 (6 pts), match/switch 6, if/else 2 (4 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_markdown.i_autolink (cognitive 22) · ×1
  • aihtml_lib_markdown.i_autolink (cognitive 22) apps/aihtml/src/aihtml_lib_markdown.erl:1677 — aihtml_lib_markdown.i_autolink has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 10 (21 pts), boolean chains 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_scheduler.render (cognitive 22) · ×1
  • aihtml_scheduler.render (cognitive 22) apps/aihtml/src/aihtml_scheduler.erl:147 — aihtml_scheduler.render has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 10, boolean chains 8, if/else 2, loops 2. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_skeleton.render (cognitive 22) · ×1
  • aihtml_skeleton.render (cognitive 22) apps/aihtml/src/aihtml_skeleton.erl:42 — aihtml_skeleton.render has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 14 (20 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_treegrid.tg_row (cognitive 22) · ×1
  • aihtml_treegrid.tg_row (cognitive 22) apps/aihtml/src/aihtml_treegrid.erl:273 — aihtml_treegrid.tg_row has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (11 pts), boolean chains 6, if/else 4, loops 1 (nesting depth added 3). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · _lib_chart.updateText (cognitive 22) · ×1
  • _lib_chart.updateText (cognitive 22) apps/aihtml/assets/js/components/_lib_chart.ts:516 — _lib_chart.updateText has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockLayoutController.menuItems (cognitive 22) · ×1
  • DockLayoutController.menuItems (cognitive 22) apps/aihtml/assets/js/components/dock_layout.ts:1271 — DockLayoutController.menuItems 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.
D2 · Cognitive Complexity · ExpanderController.set (cognitive 22) · ×1
  • ExpanderController.set (cognitive 22) apps/aihtml/assets/js/components/expander.ts:56 — ExpanderController.set has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, ternaries 2 (nesting depth added 4). Of this number, 18 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · markdown_editor.listPlugins (cognitive 22) · ×1
  • markdown_editor.listPlugins (cognitive 22) apps/aihtml/assets/js/components/markdown_editor.ts:493 — markdown_editor.listPlugins has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, loops 1 (nesting depth added 5). None of this is in the body itself: all 22 points belong to 7 function items inside it that branch (unwrapSingle, deleteParaAfterList, emptyItem, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NodeGraphController.addNode (cognitive 22) · ×1
  • NodeGraphController.addNode (cognitive 22) REDACTED:1519 — NodeGraphController.addNode has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), ternaries 4 (6 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 1524). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · PivotgridController.#setLayout (cognitive 22) · ×1
  • PivotgridController.#setLayout (cognitive 22) apps/aihtml/assets/js/components/pivotgrid.ts:1134 — PivotgridController.#setLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 8, ternaries 3 (nesting depth added 3). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · pivotgrid.gridView (cognitive 22) · ×1
  • pivotgrid.gridView (cognitive 22) apps/aihtml/assets/js/components/pivotgrid.ts:520 — pivotgrid.gridView has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 7 (10 pts), boolean chains 5, loops 3 (4 pts), if/else 3 (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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScrollviewController.setup (cognitive 22) · ×1
  • ScrollviewController.setup (cognitive 22) apps/aihtml/assets/js/components/scrollview.ts:44 — ScrollviewController.setup has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 7, match/switch 1 (nesting depth added 1). 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 items inside it that branch (a function literal at line 59, end, a function literal at line 54, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · aihtml_combobox.render (cognitive 21) · ×1
  • aihtml_combobox.render (cognitive 21) apps/aihtml/src/aihtml_combobox.erl:89 — aihtml_combobox.render has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 7 (8 pts), boolean chains 7, loops 3 (5 pts), if/else 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Swapper.#morphChildren (cognitive 21) · ×1
  • Swapper.#morphChildren (cognitive 21) apps/aihtml/assets/js/runtime/swap.ts:331 — Swapper.#morphChildren has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 335). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DockLayoutController.dragTab (cognitive 21) · ×1
  • DockLayoutController.dragTab (cognitive 21) apps/aihtml/assets/js/components/dock_layout.ts:1138 — DockLayoutController.dragTab has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, ternaries 1 (nesting depth added 2). None of this is in the body itself: all 21 points belong to 5 function items inside it that branch (a function literal at line 1157, a function literal at line 1170, skip, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · SlashMenu.plugin (cognitive 21) · ×1
  • SlashMenu.plugin (cognitive 21) apps/aihtml/assets/js/components/markdown_editor.ts:944 — SlashMenu.plugin has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 8, if/else 7 (8 pts), ternaries 2 (4 pts), match/switch 1 (nesting depth added 3). None of this is in the body itself: all 21 points belong to 4 function literals inside it that branch (lines 949, 972, 965, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ResponsivePanelController.setup (cognitive 21) · ×1
  • ResponsivePanelController.setup (cognitive 21) apps/aihtml/assets/js/components/responsive_panel.ts:43 — ResponsivePanelController.setup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 4 (nesting depth added 6). Most of this is not in the body itself: 5 of the 21 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 55, 62, 79, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_dock_layout.render_dock_layout (cognitive 20) · ×1
  • aihtml_dock_layout.render_dock_layout (cognitive 20) apps/aihtml/src/aihtml_dock_layout.erl:196 — aihtml_dock_layout.render_dock_layout has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 6, if/else 3 (6 pts), loops 6, match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_chart.axis_table (cognitive 20) · ×1
  • aihtml_lib_chart.axis_table (cognitive 20) apps/aihtml/src/aihtml_lib_chart.erl:267 — aihtml_lib_chart.axis_table has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (13 pts), match/switch 3 (4 pts), if/else 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · aihtml_relation_graph.network_option (cognitive 20) · ×1
  • aihtml_relation_graph.network_option (cognitive 20) apps/aihtml/src/aihtml_relation_graph.erl:123 — aihtml_relation_graph.network_option has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 12, loops 5 (6 pts), boolean chains 2 (nesting depth added 1). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_sidenav.nav_item (cognitive 20) · ×1
  • aihtml_sidenav.nav_item (cognitive 20) apps/aihtml/src/aihtml_sidenav.erl:117 — aihtml_sidenav.nav_item has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (8 pts), if/else 3 (6 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_tag_cloud.render (cognitive 20) · ×1
  • aihtml_tag_cloud.render (cognitive 20) apps/aihtml/src/aihtml_tag_cloud.erl:61 — aihtml_tag_cloud.render has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (9 pts), boolean chains 4, if/else 3 (4 pts), loops 3 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Swapper.#morphNode (cognitive 20) · ×1
  • Swapper.#morphNode (cognitive 20) apps/aihtml/assets/js/runtime/swap.ts:291 — Swapper.#morphNode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DatagridController.#menuItems (cognitive 20) · ×1
  • DatagridController.#menuItems (cognitive 20) apps/aihtml/assets/js/components/datagrid.ts:1439 — DatagridController.#menuItems has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 6 (8 pts), boolean chains 3 (nesting depth added 5). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DatepickerController.setup (cognitive 20) · ×1
  • DatepickerController.setup (cognitive 20) apps/aihtml/assets/js/components/datepicker.ts:134 — DatepickerController.setup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, boolean chains 8. Most of this is not in the body itself: 9 of the 20 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 207, 169, 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.
D2 · Cognitive Complexity · DatepickerController.view (cognitive 20) · ×1
  • DatepickerController.view (cognitive 20) apps/aihtml/assets/js/components/datepicker.ts:297 — DatepickerController.view has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (7 pts), boolean chains 6, loops 3 (4 pts), if/else 1 (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.
D2 · Cognitive Complexity · DockingController.drag (cognitive 20) · ×1
  • DockingController.drag (cognitive 20) apps/aihtml/assets/js/components/docking.ts:255 — DockingController.drag has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 7 (8 pts), ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 291, 276, 264). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ListmenuController.setup (cognitive 20) · ×1
  • ListmenuController.setup (cognitive 20) apps/aihtml/assets/js/components/listmenu.ts:70 — ListmenuController.setup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 7). None of this is in the body itself: all 20 points belong to 2 function literals inside it that branch (lines 86, 127). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · MenuController.#openSub (cognitive 20) · ×1
  • MenuController.#openSub (cognitive 20) apps/aihtml/assets/js/components/menu.ts:304 — MenuController.#openSub has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 5 (12 pts), boolean chains 5, if/else 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · thirdPartyLicences.generateBundle (cognitive 20) · ×1
  • thirdPartyLicences.generateBundle (cognitive 20) vite.config.mjs:133 — thirdPartyLicences.generateBundle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 6, loops 2 (3 pts), ternaries 2 (nesting depth added 6). Of this number, 13 points are the body's own statements and 7 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.
D2 · Cognitive Complexity · aihtml_scheduler.timeline_view (cognitive 19) · ×1
  • aihtml_scheduler.timeline_view (cognitive 19) apps/aihtml/src/aihtml_scheduler.erl:740 — aihtml_scheduler.timeline_view has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 6, loops 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_slider.render (cognitive 19) · ×1
  • aihtml_slider.render (cognitive 19) apps/aihtml/src/aihtml_slider.erl:47 — aihtml_slider.render has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 10, boolean chains 4, if/else 4, loops 1. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_tree.tree_node (cognitive 19) · ×1
  • aihtml_tree.tree_node (cognitive 19) apps/aihtml/src/aihtml_tree.erl:187 — aihtml_tree.tree_node has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, match/switch 6 (7 pts), if/else 3 (nesting depth added 1). To reduce it, name the conditions — but note WHERE they are: these tests sit in guard sequences, and a guard is a restricted expression sublanguage that allows neither binding a local nor calling a function you wrote, so neither of those moves is available in place. Move the decision out of the guard instead: keep one clause with a permissive guard, compute the compound test in the body through named predicate functions, and dispatch on their result. Where the clauses genuinely differ by pattern rather than by test, keep the patterns and lift only the comma-conjunctions.
D2 · Cognitive Complexity · DatetimeInputController.calView (cognitive 19) · ×1
  • DatetimeInputController.calView (cognitive 19) apps/aihtml/assets/js/components/datetime_input.ts:591 — DatetimeInputController.calView has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 8 (11 pts), boolean chains 6, loops 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DragdropController.keydown (cognitive 19) · ×1
  • DragdropController.keydown (cognitive 19) apps/aihtml/assets/js/components/dragdrop.ts:261 — DragdropController.keydown has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GanttController.taskKey (cognitive 19) · ×1
  • GanttController.taskKey (cognitive 19) apps/aihtml/assets/js/components/gantt.ts:346 — GanttController.taskKey has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MenuController.minimize (cognitive 19) · ×1
  • MenuController.minimize (cognitive 19) apps/aihtml/assets/js/components/menu.ts:209 — MenuController.minimize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 248, 241). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · NodeGraphController.renderCard (cognitive 19) · ×1
  • NodeGraphController.renderCard (cognitive 19) REDACTED:922 — NodeGraphController.renderCard has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · swimlane.select (cognitive 19) · ×1
  • swimlane.select (cognitive 19) apps/aihtml/assets/js/components/swimlane.ts:173 — swimlane.select has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 181, 176). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · TreegridController.setup (cognitive 19) · ×1
  • TreegridController.setup (cognitive 19) apps/aihtml/assets/js/components/treegrid.ts:62 — TreegridController.setup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, boolean chains 5, ternaries 3 (5 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 85, 72, 99, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_datatable.condition (cognitive 18) · ×1
  • aihtml_datatable.condition (cognitive 18) apps/aihtml/src/aihtml_datatable.erl:579 — aihtml_datatable.condition has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 9 (14 pts), boolean chains 4 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_dock_layout.parse_node (cognitive 18) · ×1
  • aihtml_dock_layout.parse_node (cognitive 18) apps/aihtml/src/aihtml_dock_layout.erl:383 — aihtml_dock_layout.parse_node has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (6 pts), boolean chains 5, match/switch 4, if/else 1 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_lib_markdown.i_escape (cognitive 18) · ×1
  • aihtml_lib_markdown.i_escape (cognitive 18) apps/aihtml/src/aihtml_lib_markdown.erl:1277 — aihtml_lib_markdown.i_escape has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (17 pts), boolean chains 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_meter.meter_state (cognitive 18) · ×1
  • aihtml_meter.meter_state (cognitive 18) apps/aihtml/src/aihtml_meter.erl:70 — aihtml_meter.meter_state has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (11 pts), if/else 7 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ChartController.dataChanged (cognitive 18) · ×1
  • ChartController.dataChanged (cognitive 18) apps/aihtml/assets/js/components/_lib_chart.ts:927 — ChartController.dataChanged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 3 (5 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _lib_overlay.document.addEventListener("click") (cognitive 18) · ×1
  • _lib_overlay.document.addEventListener("click") (cognitive 18) apps/aihtml/assets/js/components/_lib_overlay.ts:297 — _lib_overlay.document.addEventListener("click") has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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.
D2 · Cognitive Complexity · _lib_table.clickSelect (cognitive 18) · ×1
  • _lib_table.clickSelect (cognitive 18) apps/aihtml/assets/js/components/_lib_table.ts:79 — _lib_table.clickSelect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockLayoutController.openPanel (cognitive 18) · ×1
  • DockLayoutController.openPanel (cognitive 18) apps/aihtml/assets/js/components/dock_layout.ts:873 — DockLayoutController.openPanel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7, ternaries 4 (6 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · dock_layout.trackZones (cognitive 18) · ×1
  • dock_layout.trackZones (cognitive 18) apps/aihtml/assets/js/components/dock_layout.ts:489 — dock_layout.trackZones has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 2). Of this number, 11 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · BlockHandle.plugin (cognitive 18) · ×1
  • BlockHandle.plugin (cognitive 18) apps/aihtml/assets/js/components/markdown_editor.ts:1056 — BlockHandle.plugin has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, ternaries 2 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 6 function literals inside it that branch (lines 1070, 1094, 1087, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · NavbarController.setup (cognitive 18) · ×1
  • NavbarController.setup (cognitive 18) apps/aihtml/assets/js/components/navbar.ts:32 — NavbarController.setup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, ternaries 1 (2 pts), match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 67, a function literal at line 76, a function literal at line 40, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NodeGraphController.searchMenu (cognitive 18) · ×1
  • NodeGraphController.searchMenu (cognitive 18) REDACTED:1456 — NodeGraphController.searchMenu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, ternaries 4 (5 pts), boolean chains 4 (nesting depth added 1). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 5 function items inside it that branch (paint, a function literal at line 1501, a function literal at line 1508, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · NodeGraphController.wireLinks (cognitive 18) · ×1
  • NodeGraphController.wireLinks (cognitive 18) REDACTED:1810 — NodeGraphController.wireLinks has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6, ternaries 2 (3 pts) (nesting depth added 1). None of this is in the body itself: all 18 points belong to 8 function literals inside it that branch (lines 1811, 1840, 1851, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · password_input.strength (cognitive 18) · ×1
  • password_input.strength (cognitive 18) apps/aihtml/assets/js/components/password_input.ts:11 — password_input.strength has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 6, ternaries 3 (6 pts), if/else 4 (5 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.
D2 · Cognitive Complexity · SchedulerController.dragMove (cognitive 18) · ×1
  • SchedulerController.dragMove (cognitive 18) apps/aihtml/assets/js/components/scheduler.ts:546 — SchedulerController.dragMove has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Tooltips.constructor (cognitive 18) · ×1
  • Tooltips.constructor (cognitive 18) apps/aihtml/assets/js/components/tooltip.ts:172 — Tooltips.constructor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 18 points belong to 8 function literals inside it that branch (lines 188, 198, 214, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · aihtml_datatable.dt_row (cognitive 17) · ×1
  • aihtml_datatable.dt_row (cognitive 17) apps/aihtml/src/aihtml_datatable.erl:366 — aihtml_datatable.dt_row has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (6 pts), boolean chains 5, match/switch 5, loops 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_node_graph.slot_colors (cognitive 17) · ×1
  • aihtml_node_graph.slot_colors (cognitive 17) apps/aihtml/src/aihtml_node_graph.erl:402 — aihtml_node_graph.slot_colors has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (8 pts), match/switch 4 (5 pts), if/else 1 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_pivotgrid.value_spec (cognitive 17) · ×1
  • aihtml_pivotgrid.value_spec (cognitive 17) apps/aihtml/src/aihtml_pivotgrid.erl:347 — aihtml_pivotgrid.value_spec has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 5, match/switch 5, loops 2 (4 pts), if/else 1 (3 pts) (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_progressbar.render (cognitive 17) · ×1
  • aihtml_progressbar.render (cognitive 17) apps/aihtml/src/aihtml_progressbar.erl:49 — aihtml_progressbar.render has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, match/switch 5, if/else 3. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_tabs.render (cognitive 17) · ×1
  • aihtml_tabs.render (cognitive 17) apps/aihtml/src/aihtml_tabs.erl:52 — aihtml_tabs.render has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4, match/switch 2 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_tag_cloud.filter_tags (cognitive 17) · ×1
  • aihtml_tag_cloud.filter_tags (cognitive 17) apps/aihtml/src/aihtml_tag_cloud.erl:106 — aihtml_tag_cloud.filter_tags has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (5 pts), match/switch 4 (5 pts), if/else 2 (4 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_tree.render_tree (cognitive 17) · ×1
  • aihtml_tree.render_tree (cognitive 17) apps/aihtml/src/aihtml_tree.erl:90 — aihtml_tree.render_tree has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 12, boolean chains 4, loops 1. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_cowboy_events.topics (cognitive 17) · ×1
  • aihtml_cowboy_events.topics (cognitive 17) apps/aihtml_cowboy/src/aihtml_cowboy_events.erl:72 — aihtml_cowboy_events.topics has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (7 pts), if/else 1 (4 pts), loops 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Actions.#send (cognitive 17) · ×1
  • Actions.#send (cognitive 17) apps/aihtml/assets/js/runtime/actions.ts:387 — Actions.#send has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, error handling 1 (nesting depth added 3). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 4 function items inside it that branch (done, a function literal at line 419, a function literal at line 414, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Actions.#onEvent (cognitive 17) · ×1
  • Actions.#onEvent (cognitive 17) apps/aihtml/assets/js/runtime/actions.ts:439 — Actions.#onEvent 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: 8 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (handled, a function literal at line 466, a function literal at line 485). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · calendar.calNormalize (cognitive 17) · ×1
  • calendar.calNormalize (cognitive 17) apps/aihtml/assets/js/components/calendar.ts:156 — calendar.calNormalize has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5, ternaries 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DatagridController.#paintHeader (cognitive 17) · ×1
  • DatagridController.#paintHeader (cognitive 17) apps/aihtml/assets/js/components/datagrid.ts:959 — DatagridController.#paintHeader has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), boolean chains 6, ternaries 3 (4 pts) (nesting depth added 2). 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 960, 978, 963). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · DatagridController.#headerSort (cognitive 17) · ×1
  • DatagridController.#headerSort (cognitive 17) apps/aihtml/assets/js/components/datagrid.ts:1337 — DatagridController.#headerSort has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 3 (4 pts), boolean chains 2 (nesting depth added 4). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DockLayoutController.runMenu (cognitive 17) · ×1
  • DockLayoutController.runMenu (cognitive 17) apps/aihtml/assets/js/components/dock_layout.ts:1329 — DockLayoutController.runMenu has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, ternaries 1 (2 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dock_layout.detectEdge (cognitive 17) · ×1
  • dock_layout.detectEdge (cognitive 17) apps/aihtml/assets/js/components/dock_layout.ts:434 — dock_layout.detectEdge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (6 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.
D2 · Cognitive Complexity · ListmenuController.#go (cognitive 17) · ×1
  • ListmenuController.#go (cognitive 17) apps/aihtml/assets/js/components/listmenu.ts:212 — ListmenuController.#go has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 5, boolean chains 2 (nesting depth added 3). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NodeGraphController.applyLinkDrag (cognitive 17) · ×1
  • NodeGraphController.applyLinkDrag (cognitive 17) REDACTED:1050 — NodeGraphController.applyLinkDrag has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (7 pts), boolean chains 5, if/else 5 (nesting depth added 1). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · relation_graph.nodes (cognitive 17) · ×1
  • relation_graph.nodes (cognitive 17) apps/aihtml/assets/js/components/relation_graph.ts:46 — relation_graph.nodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 4 (7 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 54, a function literal at line 62, walk). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · TransferController.key (cognitive 17) · ×1
  • TransferController.key (cognitive 17) apps/aihtml/assets/js/components/transfer.ts:170 — TransferController.key has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, ternaries 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_datagrid.datagrid_rows (cognitive 16) · ×1
  • aihtml_datagrid.datagrid_rows (cognitive 16) apps/aihtml/src/aihtml_datagrid.erl:1226 — aihtml_datagrid.datagrid_rows has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_datatable.datatable_query (cognitive 16) · ×1
  • aihtml_datatable.datatable_query (cognitive 16) apps/aihtml/src/aihtml_datatable.erl:642 — aihtml_datatable.datatable_query has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 12 (13 pts), error handling 2 (3 pts) (nesting depth added 2). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · aihtml_datetime_input.render (cognitive 16) · ×1
  • aihtml_datetime_input.render (cognitive 16) apps/aihtml/src/aihtml_datetime_input.erl:71 — aihtml_datetime_input.render has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, match/switch 6, loops 2 (3 pts), if/else 1 (nesting depth added 1). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_pivotgrid.aggregate (cognitive 16) · ×1
  • aihtml_pivotgrid.aggregate (cognitive 16) apps/aihtml/src/aihtml_pivotgrid.erl:507 — aihtml_pivotgrid.aggregate has cognitive complexity 16 (threshold 15). Drivers by points: loops 9 (10 pts), match/switch 4 (6 pts) (nesting depth added 3). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · aihtml_radar_chart.option (cognitive 16) · ×1
  • aihtml_radar_chart.option (cognitive 16) apps/aihtml/src/aihtml_radar_chart.erl:56 — aihtml_radar_chart.option has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (6 pts), boolean chains 5, if/else 1 (3 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · aihtml_transfer.render (cognitive 16) · ×1
  • aihtml_transfer.render (cognitive 16) apps/aihtml/src/aihtml_transfer.erl:48 — aihtml_transfer.render has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (8 pts), if/else 2 (5 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · _lib_chart.seriesTable (cognitive 16) · ×1
  • _lib_chart.seriesTable (cognitive 16) apps/aihtml/assets/js/components/_lib_chart.ts:438 — _lib_chart.seriesTable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 2 (4 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeGraphController.nodeMenu (cognitive 16) · ×1
  • NodeGraphController.nodeMenu (cognitive 16) REDACTED:1785 — NodeGraphController.nodeMenu has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 8 (11 pts), if/else 3 (4 pts), boolean chains 1 (nesting depth added 4). 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.
D2 · Cognitive Complexity · NodeGraphController.wireGroups (cognitive 16) · ×1
  • NodeGraphController.wireGroups (cognitive 16) REDACTED:1893 — NodeGraphController.wireGroups has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. None of this is in the body itself: all 16 points belong to 11 function literals inside it that branch (lines 1894, 1943, 1914, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · pivotgrid.cmpStr (cognitive 16) · ×1
  • pivotgrid.cmpStr (cognitive 16) apps/aihtml/assets/js/components/pivotgrid.ts:259 — pivotgrid.cmpStr has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (11 pts), if/else 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TabsController.choose (cognitive 16) · ×1
  • TabsController.choose (cognitive 16) apps/aihtml/assets/js/components/tabs.ts:79 — TabsController.choose has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UploadController.addFiles (cognitive 16) · ×1
  • UploadController.addFiles (cognitive 16) apps/aihtml/assets/js/components/upload.ts:360 — UploadController.addFiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 4, ternaries 2. Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 371). 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) apps/aihtml/src/aihtml_datagrid.erl:1457 — apps/aihtml/src/aihtml_datagrid.erl:1457-1465 | apps/aihtml/src/aihtml_diff.erl:318-325 | apps/aihtml/src/aihtml_heatmap_calendar.erl:225-231 | apps/aihtml/src/aihtml_lib_table.erl:330-337 | apps/aihtml/src/aihtml_nav_tree.erl:161-168 | apps/aihtml/src/aihtml_tree.erl:311-318 — These 6 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 6 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 6 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) apps/aihtml/src/aihtml_activity_bar.erl:138 — apps/aihtml/src/aihtml_activity_bar.erl:138-148 | apps/aihtml/src/aihtml_command.erl:274-284 | apps/aihtml/src/aihtml_lib_chart.erl:695-704 | apps/aihtml/src/aihtml_lib_tiles.erl:46-56 | apps/aihtml/src/aihtml_navigationbar.erl:276-286 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) apps/aihtml/src/aihtml_aspect_ratio.erl:82 — apps/aihtml/src/aihtml_aspect_ratio.erl:82-86 | apps/aihtml/src/aihtml_catalog.erl:250-254 | apps/aihtml/src/aihtml_element.erl:146-150 | apps/aihtml/src/aihtml_select.erl:96-100 — 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 (13 corresponding lines) · ×1
  • Edited copy of a member (13 corresponding lines) apps/aihtml/src/aihtml_calendar.erl:581 — apps/aihtml/src/aihtml_calendar.erl:581-596 | apps/aihtml/src/aihtml_scheduler.erl:876-888 — 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 (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) apps/aihtml/src/aihtml_datepicker.erl:347 — apps/aihtml/src/aihtml_datepicker.erl:347-382 | apps/aihtml/src/aihtml_datetime_input.erl:280-319 — These two members are one piece of code written twice and then edited apart: 36 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 (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) apps/aihtml/src/aihtml_cascader.erl:264 — apps/aihtml/src/aihtml_cascader.erl:264-303 | apps/aihtml/src/aihtml_combobox.erl:286-323 — These two members are one piece of code written twice and then edited apart: 38 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, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) apps/aihtml/src/aihtml_drawer.erl:73 — apps/aihtml/src/aihtml_drawer.erl:73-101 | apps/aihtml/src/aihtml_popover.erl:89-114 | apps/aihtml/src/aihtml_sheet.erl:69-95 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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 copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) apps/aihtml/src/aihtml_dropdown_button.erl:75 — apps/aihtml/src/aihtml_dropdown_button.erl:75-93 | apps/aihtml/src/aihtml_split_button.erl:83-101 — 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 (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) apps/aihtml/src/aihtml_input.erl:67 — apps/aihtml/src/aihtml_input.erl:67-90 | apps/aihtml/src/aihtml_password_input.erl:94-115 | apps/aihtml/src/aihtml_textarea.erl:49-64 — These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) apps/aihtml/src/aihtml_donut_chart.erl:123 — apps/aihtml/src/aihtml_donut_chart.erl:123-143 | apps/aihtml/src/aihtml_radar_chart.erl:111-131 — 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 copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) apps/aihtml/src/aihtml_checkbox.erl:57 — apps/aihtml/src/aihtml_checkbox.erl:57-76 | apps/aihtml/src/aihtml_radiobutton.erl:51-65 | apps/aihtml/src/aihtml_switch_button.erl:73-92 — 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 (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) apps/aihtml/src/aihtml_markdown_editor.erl:230 — apps/aihtml/src/aihtml_markdown_editor.erl:230-237 | apps/aihtml/src/aihtml_node_graph.erl:227-235 | apps/aihtml/src/aihtml_pivotgrid.erl:180-187 — 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 (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) apps/aihtml/src/aihtml_dock_layout.erl:551 — apps/aihtml/src/aihtml_dock_layout.erl:551-558 | apps/aihtml/src/aihtml_docking.erl:317-324 | apps/aihtml/src/aihtml_markdown_editor.erl:222-228 — 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.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) apps/aihtml/src/aihtml_area_chart.erl:84 — apps/aihtml/src/aihtml_area_chart.erl:84-86 | apps/aihtml/src/aihtml_bar_chart.erl:92-94 | apps/aihtml/src/aihtml_chart.erl:142-145 | apps/aihtml/src/aihtml_donut_chart.erl:114-116 | apps/aihtml/src/aihtml_radar_chart.erl:102-104 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 4+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl:247 — apps/aihtml/src/aihtml_gantt.erl:247-254 | apps/aihtml/src/aihtml_scheduler.erl:312-315 | apps/aihtml/src/aihtml_swimlane.erl:261-264 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 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, 3+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 3+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl:388 — apps/aihtml/src/aihtml_gantt.erl:388-390 | apps/aihtml/src/aihtml_lib_table.erl:310-313 | apps/aihtml/src/aihtml_scheduler.erl:917-919 | apps/aihtml/src/aihtml_swimlane.erl:449-451 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 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 (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) apps/aihtml/src/aihtml_datagrid.erl:1450 — apps/aihtml/src/aihtml_datagrid.erl:1450-1455 | apps/aihtml/src/aihtml_lib_dock.erl:67-72 | apps/aihtml/src/aihtml_node_graph.erl:476-481 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 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 (5 members, 2+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 2+ corresponding lines) apps/aihtml/src/aihtml_dropdownlist.erl:157 — apps/aihtml/src/aihtml_dropdownlist.erl:157-158 | apps/aihtml/src/aihtml_lib_layout.erl:65-67 | apps/aihtml/src/aihtml_lib_list.erl:57-59 | apps/aihtml/src/aihtml_lib_nav.erl:88-94 | apps/aihtml/src/aihtml_slider.erl:243-244 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 2 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 3+ corresponding lines) apps/aihtml/src/aihtml_colorpicker.erl:316 — apps/aihtml/src/aihtml_colorpicker.erl:316-318 | apps/aihtml/src/aihtml_datagrid.erl:1439-1441 | apps/aihtml/src/aihtml_lib_button.erl:104-107 | apps/aihtml/src/aihtml_lib_input.erl:83-86 | apps/aihtml/src/aihtml_lib_table.erl:325-327 | apps/aihtml/src/aihtml_sortable.erl:151-154 | apps/aihtml/src/aihtml_timepicker.erl:300-302 | apps/aihtml/src/aihtml_tree.erl:307-309 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 3 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 copies of one member (4 members, 2+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 2+ corresponding lines) apps/aihtml/src/aihtml_gantt.erl:392 — apps/aihtml/src/aihtml_gantt.erl:392-393 | apps/aihtml/src/aihtml_lib_scroll.erl:50-51 | apps/aihtml/src/aihtml_scheduler.erl:921-922 | apps/aihtml/src/aihtml_swimlane.erl:453-454 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 2 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 (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) apps/aihtml/src/aihtml_dock_layout.erl:568 — apps/aihtml/src/aihtml_dock_layout.erl:568-572 | apps/aihtml/src/aihtml_lib_choice.erl:182-186 | apps/aihtml/src/aihtml_range_selector.erl:170-174 — 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.
D4 · Code Duplication · Edited copies of one member (5 members, 1+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 1+ corresponding lines) apps/aihtml/src/aihtml_lib_layout.erl:59 — apps/aihtml/src/aihtml_lib_layout.erl:59-61 | apps/aihtml/src/aihtml_lib_scroll.erl:44-46 | apps/aihtml/src/aihtml_lib_table.erl:295-295 | apps/aihtml/src/aihtml_lib_tiles.erl:15-16 | apps/aihtml/src/aihtml_navigationbar.erl:256-257 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 1 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (4–7 lines × 5) · ×1
  • Duplicated block (4–7 lines × 5) apps/aihtml/src/aihtml_activity_bar.erl:142 — apps/aihtml/src/aihtml_activity_bar.erl:142-148 | apps/aihtml/src/aihtml_command.erl:278-284 | apps/aihtml/src/aihtml_lib_chart.erl:697-700 | apps/aihtml/src/aihtml_lib_tiles.erl:50-56 | apps/aihtml/src/aihtml_navigationbar.erl:280-286 — 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 all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) apps/aihtml/src/aihtml_dragdrop.erl:148 — apps/aihtml/src/aihtml_dragdrop.erl:148-157 | apps/aihtml/src/aihtml_lib_button.erl:129-138 | apps/aihtml/src/aihtml_sortable.erl:170-179 — 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 all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) apps/aihtml/src/aihtml_gantt.erl:421 — apps/aihtml/src/aihtml_gantt.erl:421-427 | apps/aihtml/src/aihtml_scheduler.erl:953-959 | apps/aihtml/src/aihtml_swimlane.erl:480-486 — before extracting anything, compare `apps/aihtml/src/aihtml_gantt.erl` and `apps/aihtml/src/aihtml_scheduler.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) apps/aihtml/src/aihtml_lib_layout.erl:45 — apps/aihtml/src/aihtml_lib_layout.erl:45-51 | apps/aihtml/src/aihtml_lib_scroll.erl:30-36 — 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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×1
  • Duplicated block (8 lines × 2) apps/aihtml/src/aihtml_calendar.erl:217 — apps/aihtml/src/aihtml_calendar.erl:217-224 | apps/aihtml/src/aihtml_scheduler.erl:281-288 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) apps/aihtml/src/aihtml_drawer.erl:92 — apps/aihtml/src/aihtml_drawer.erl:92-96 | apps/aihtml/src/aihtml_sheet.erl:86-90 | apps/aihtml/src/aihtml_window.erl:144-148 — 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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `apps/aihtml/src/aihtml_drawer.erl:92` 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) apps/aihtml/src/aihtml_aspect_ratio.erl:82 — apps/aihtml/src/aihtml_aspect_ratio.erl:82-86 | apps/aihtml/src/aihtml_catalog.erl:250-254 | apps/aihtml/src/aihtml_element.erl:146-150 | apps/aihtml/src/aihtml_select.erl:96-100 — 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 all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) apps/aihtml/src/aihtml_gantt.erl:397 — apps/aihtml/src/aihtml_gantt.erl:397-404 | apps/aihtml/src/aihtml_scheduler.erl:929-936 | apps/aihtml/src/aihtml_swimlane.erl:458-465 — before extracting anything, compare `apps/aihtml/src/aihtml_gantt.erl` and `apps/aihtml/src/aihtml_scheduler.erl` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 `apps/aihtml/src/aihtml_gantt.erl:397` 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.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: aihtml — aihtml: abstractness 0.05, instability 0.00, distance 0.95 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
ED1 · Handler temporal coupling · Handler temporal coupling · ×1
  • Handler temporal coupling: aihtml_example_clock clause `tick/1#25` apps/aihtml_example/src/aihtml_example_clock.erl:21 — `aihtml_example_clock` clause `tick/1#25` blocks the process on a synchronous `timer:sleep` while handling a message — the process is blocked (holding its mailbox) until a peer replies or the sleep elapses. That couples this handler in real time to another process being up and fast, and a mutual call can DEADLOCK. To decouple, move the delay off the hot path (a `state_timeout`/`send_after` self-message, or do the settle in a spawned worker).
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×1
  • Sync-over-async blocking scripts/serve.mjs:40 — `execFileSync` in `buildRuntime` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
R10 · Code Duplication · Duplicated block with local edits (86 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (86 matched lines × 2 locations) apps/aihtml/assets/js/components/cascader.ts:73 — apps/aihtml/assets/js/components/cascader.ts:73 · apps/aihtml/assets/js/components/combobox.ts:60 — the two spans are one implementation copied and then locally edited — 819 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 (32 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (32 matched lines × 2 locations) apps/aihtml/assets/js/components/gantt.ts:387 — apps/aihtml/assets/js/components/gantt.ts:387 · apps/aihtml/assets/js/components/scheduler.ts:542 — the two spans are one implementation copied and then locally edited — 359 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 (26 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (26 matched lines × 2 locations) apps/aihtml/assets/js/components/dragdrop.ts:213 — apps/aihtml/assets/js/components/dragdrop.ts:213 · apps/aihtml/assets/js/components/sortable.ts:289 — the two spans are one implementation copied and then locally edited — 219 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 (15 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (15 matched lines × 2 locations) apps/aihtml/assets/js/components/_lib_overlay.ts:433 — apps/aihtml/assets/js/components/_lib_overlay.ts:433 · apps/aihtml/assets/js/components/window.ts:143 — the two spans are one implementation copied and then locally edited — 96 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 (10 lines × 2 locations) · ×1
  • Duplicated block (10 lines × 2 locations) apps/aihtml/assets/js/components/formatted_input.ts:58 — apps/aihtml/assets/js/components/formatted_input.ts:58 · REDACTED:67 — 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 (9 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (9 matched lines × 2 locations) apps/aihtml/assets/js/components/command.ts:35 — apps/aihtml/assets/js/components/command.ts:35 · apps/aihtml/assets/js/components/transfer.ts:173 — the two spans are one implementation copied and then locally edited — 62 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 51, cognitive 68) · ×1
  • Complex function (anonymous) (cyclomatic 51, cognitive 68) REDACTED:2071 — (anonymous) has cyclomatic complexity 51 and cognitive complexity 68; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #keydown (cyclomatic 49, cognitive 70) · ×1
  • Complex function #keydown (cyclomatic 49, cognitive 70) apps/aihtml/assets/js/components/menu.ts:405 — #keydown has cyclomatic complexity 49 and cognitive complexity 70; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #onKey (cyclomatic 49, cognitive 63) · ×1
  • Complex function #onKey (cyclomatic 49, cognitive 63) apps/aihtml/assets/js/components/pivotgrid.ts:1529 — #onKey has cyclomatic complexity 49 and cognitive complexity 63; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #keydown (cyclomatic 46, cognitive 52) · ×1
  • Complex function #keydown (cyclomatic 46, cognitive 52) apps/aihtml/assets/js/components/datagrid.ts:1209 — #keydown has cyclomatic complexity 46 and cognitive complexity 52; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function keydown (cyclomatic 40, cognitive 37) · ×1
  • Complex function keydown (cyclomatic 40, cognitive 37) apps/aihtml/assets/js/components/dropdownlist.ts:255 — keydown has cyclomatic complexity 40 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function eventKey (cyclomatic 38, cognitive 66) · ×1
  • Complex function eventKey (cyclomatic 38, cognitive 66) apps/aihtml/assets/js/components/scheduler.ts:642 — eventKey has cyclomatic complexity 38 and cognitive complexity 66; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 38, cognitive 33) · ×1
  • Complex function key (cyclomatic 38, cognitive 33) apps/aihtml/assets/js/components/datetime_input.ts:528 — key has cyclomatic complexity 38 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #click (cyclomatic 36, cognitive 51) · ×1
  • Complex function #click (cyclomatic 36, cognitive 51) apps/aihtml/assets/js/components/datagrid.ts:1276 — #click has cyclomatic complexity 36 and cognitive complexity 51; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 35, cognitive 31) · ×1
  • Complex function key (cyclomatic 35, cognitive 31) apps/aihtml/assets/js/components/cascader.ts:389 — key has cyclomatic complexity 35 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 32, cognitive 37) · ×1
  • Complex function key (cyclomatic 32, cognitive 37) apps/aihtml/assets/js/components/datepicker.ts:442 — key has cyclomatic complexity 32 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 32, cognitive 35) · ×1
  • Complex function key (cyclomatic 32, cognitive 35) apps/aihtml/assets/js/components/listbox.ts:182 — key has cyclomatic complexity 32 and cognitive complexity 35; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function keydown (cyclomatic 30, cognitive 25) · ×1
  • Complex function keydown (cyclomatic 30, cognitive 25) apps/aihtml/assets/js/components/tree.ts:250 — keydown has cyclomatic complexity 30 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #menuAction (cyclomatic 29, cognitive 24) · ×1
  • Complex function #menuAction (cyclomatic 29, cognitive 24) apps/aihtml/assets/js/components/pivotgrid.ts:1375 — #menuAction has cyclomatic complexity 29 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 28, cognitive 33) · ×1
  • Complex function (anonymous) (cyclomatic 28, cognitive 33) apps/aihtml/assets/js/components/formatted_input.ts:104 — (anonymous) has cyclomatic complexity 28 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function view (cyclomatic 27, cognitive 46) · ×1
  • Complex function view (cyclomatic 27, cognitive 46) apps/aihtml/assets/js/components/datepicker.ts:297 — view has cyclomatic complexity 27 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.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 27, cognitive 40) · ×1
  • Complex function key (cyclomatic 27, cognitive 40) apps/aihtml/assets/js/components/docking.ts:320 — key has cyclomatic complexity 27 and cognitive complexity 40; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 26, cognitive 36) · ×1
  • Complex function key (cyclomatic 26, cognitive 36) apps/aihtml/assets/js/components/combobox.ts:391 — key has cyclomatic complexity 26 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function dragStart (cyclomatic 26, cognitive 34) · ×1
  • Complex function dragStart (cyclomatic 26, cognitive 34) apps/aihtml/assets/js/components/calendar.ts:763 — dragStart has cyclomatic complexity 26 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function place (cyclomatic 26, cognitive 34) · ×1
  • Complex function place (cyclomatic 26, cognitive 34) apps/aihtml/assets/js/components/scheduler.ts:215 — place has cyclomatic complexity 26 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #keydown (cyclomatic 24, cognitive 15) · ×1
  • Complex function #keydown (cyclomatic 24, cognitive 15) apps/aihtml/assets/js/components/treegrid.ts:322 — #keydown has cyclomatic complexity 24 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 23, cognitive 34) · ×1
  • Complex function render (cyclomatic 23, cognitive 34) REDACTED:280 — render has cyclomatic complexity 23 and cognitive complexity 34; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function mount (cyclomatic 23, cognitive 23) · ×1
  • Complex function mount (cyclomatic 23, cognitive 23) apps/aihtml/assets/js/components/markdown_editor.ts:1341 — mount 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.
R2 · Cyclomatic Complexity · Complex function matchCond (cyclomatic 23, cognitive 13) · ×1
  • Complex function matchCond (cyclomatic 23, cognitive 13) apps/aihtml/assets/js/components/datatable.ts:106 — matchCond has cyclomatic complexity 23 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #keydown (cyclomatic 23, cognitive 13) · ×1
  • Complex function #keydown (cyclomatic 23, cognitive 13) apps/aihtml/assets/js/components/datatable.ts:709 — #keydown has cyclomatic complexity 23 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function dragEnd (cyclomatic 22, cognitive 36) · ×1
  • Complex function dragEnd (cyclomatic 22, cognitive 36) apps/aihtml/assets/js/components/scheduler.ts:596 — dragEnd has cyclomatic complexity 22 and cognitive complexity 36; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function renderCard (cyclomatic 22, cognitive 21) · ×1
  • Complex function renderCard (cyclomatic 22, cognitive 21) REDACTED:922 — renderCard has cyclomatic complexity 22 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.
R2 · Cyclomatic Complexity · Complex function keydown (cyclomatic 21, cognitive 25) · ×1
  • Complex function keydown (cyclomatic 21, cognitive 25) apps/aihtml/assets/js/components/sortable.ts:391 — keydown has cyclomatic complexity 21 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function expand (cyclomatic 21, cognitive 22) · ×1
  • Complex function expand (cyclomatic 21, cognitive 22) apps/aihtml/assets/js/components/_lib_rrule.ts:70 — expand has cyclomatic complexity 21 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #syncLayout (cyclomatic 21, cognitive 22) · ×1
  • Complex function #syncLayout (cyclomatic 21, cognitive 22) apps/aihtml/assets/js/components/pivotgrid.ts:957 — #syncLayout has cyclomatic complexity 21 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #morphNode (cyclomatic 21, cognitive 20) · ×1
  • Complex function #morphNode (cyclomatic 21, cognitive 20) apps/aihtml/assets/js/runtime/swap.ts:291 — #morphNode has cyclomatic complexity 21 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function calNormalize (cyclomatic 21, cognitive 19) · ×1
  • Complex function calNormalize (cyclomatic 21, cognitive 19) apps/aihtml/assets/js/components/calendar.ts:156 — calNormalize has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 20) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 20) apps/aihtml/assets/js/components/pivotgrid.ts:1335 — (anonymous) has cyclomatic complexity 20 and cognitive complexity 20; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function key (cyclomatic 20, cognitive 18) · ×1
  • Complex function key (cyclomatic 20, cognitive 18) apps/aihtml/assets/js/components/transfer.ts:170 — key has cyclomatic complexity 20 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 20, cognitive 16) · ×1
  • Complex function (anonymous) (cyclomatic 20, cognitive 16) apps/aihtml/assets/js/components/listmenu.ts:86 — (anonymous) has cyclomatic complexity 20 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.
R2 · Cyclomatic Complexity · Complex function dragEnd (cyclomatic 19, cognitive 32) · ×1
  • Complex function dragEnd (cyclomatic 19, cognitive 32) apps/aihtml/assets/js/components/calendar.ts:875 — dragEnd has cyclomatic complexity 19 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function clockKey (cyclomatic 19, cognitive 31) · ×1
  • Complex function clockKey (cyclomatic 19, cognitive 31) REDACTED:454 — clockKey has cyclomatic complexity 19 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function insert (cyclomatic 19, cognitive 30) · ×1
  • Complex function insert (cyclomatic 19, cognitive 30) REDACTED:310 — insert has cyclomatic complexity 19 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.
R2 · Cyclomatic Complexity · Complex function updateText (cyclomatic 19, cognitive 24) · ×1
  • Complex function updateText (cyclomatic 19, cognitive 24) apps/aihtml/assets/js/components/_lib_chart.ts:516 — updateText has cyclomatic complexity 19 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 19, cognitive 21) · ×1
  • Complex function (anonymous) (cyclomatic 19, cognitive 21) apps/aihtml/assets/js/components/number_input.ts:43 — (anonymous) has cyclomatic complexity 19 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function #eventPayload (cyclomatic 19, cognitive 19) · ×1
  • Complex function #eventPayload (cyclomatic 19, cognitive 19) apps/aihtml/assets/js/runtime/actions.ts:158 — #eventPayload has cyclomatic complexity 19 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 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 · REDACTED · ×1
  • REDACTED: 1989 lines of code REDACTED:1 — REDACTED has 1989 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 · apps/aihtml/assets/js/components/datagrid.ts · ×1
  • apps/aihtml/assets/js/components/datagrid.ts: 1569 lines of code apps/aihtml/assets/js/components/datagrid.ts:1 — apps/aihtml/assets/js/components/datagrid.ts has 1569 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 · apps/aihtml/assets/js/components/pivotgrid.ts · ×1
  • apps/aihtml/assets/js/components/pivotgrid.ts: 1499 lines of code apps/aihtml/assets/js/components/pivotgrid.ts:1 — apps/aihtml/assets/js/components/pivotgrid.ts has 1499 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 · apps/aihtml/assets/js/components/markdown_editor.ts · ×1
  • apps/aihtml/assets/js/components/markdown_editor.ts: 1442 lines of code apps/aihtml/assets/js/components/markdown_editor.ts:1 — apps/aihtml/assets/js/components/markdown_editor.ts has 1442 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 · apps/aihtml/assets/js/components/dock_layout.ts · ×1
  • apps/aihtml/assets/js/components/dock_layout.ts: 1281 lines of code apps/aihtml/assets/js/components/dock_layout.ts:1 — apps/aihtml/assets/js/components/dock_layout.ts has 1281 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 · apps/aihtml/assets/js/components/_lib_chart.ts · ×1
  • apps/aihtml/assets/js/components/_lib_chart.ts: 880 lines of code apps/aihtml/assets/js/components/_lib_chart.ts:1 — apps/aihtml/assets/js/components/_lib_chart.ts has 880 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 · apps/aihtml/assets/js/components/calendar.ts · ×1
  • apps/aihtml/assets/js/components/calendar.ts: 864 lines of code apps/aihtml/assets/js/components/calendar.ts:1 — apps/aihtml/assets/js/components/calendar.ts has 864 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 · apps/aihtml/assets/js/components/scheduler.ts · ×1
  • apps/aihtml/assets/js/components/scheduler.ts: 734 lines of code apps/aihtml/assets/js/components/scheduler.ts:1 — apps/aihtml/assets/js/components/scheduler.ts has 734 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 · apps/aihtml/assets/js/components/datatable.ts · ×1
  • apps/aihtml/assets/js/components/datatable.ts: 726 lines of code apps/aihtml/assets/js/components/datatable.ts:1 — apps/aihtml/assets/js/components/datatable.ts has 726 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 · apps/aihtml/assets/js/components/_lib_overlay.ts · ×1
  • apps/aihtml/assets/js/components/_lib_overlay.ts: 621 lines of code apps/aihtml/assets/js/components/_lib_overlay.ts:1 — apps/aihtml/assets/js/components/_lib_overlay.ts has 621 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 · REDACTED · ×1
  • REDACTED: 606 lines of code REDACTED:1 — REDACTED 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.
R3 · Large Files · apps/aihtml/assets/js/components/datetime_input.ts · ×1
  • apps/aihtml/assets/js/components/datetime_input.ts: 599 lines of code apps/aihtml/assets/js/components/datetime_input.ts:1 — apps/aihtml/assets/js/components/datetime_input.ts has 599 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 · apps/aihtml/assets/js/runtime/actions.ts · ×1
  • apps/aihtml/assets/js/runtime/actions.ts: 516 lines of code apps/aihtml/assets/js/runtime/actions.ts:1 — apps/aihtml/assets/js/runtime/actions.ts 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 · apps/aihtml/assets/js/components/menu.ts · ×1
  • apps/aihtml/assets/js/components/menu.ts: 476 lines of code apps/aihtml/assets/js/components/menu.ts:1 — apps/aihtml/assets/js/components/menu.ts has 476 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 · apps/aihtml/assets/js/components/datepicker.ts · ×1
  • apps/aihtml/assets/js/components/datepicker.ts: 469 lines of code apps/aihtml/assets/js/components/datepicker.ts:1 — apps/aihtml/assets/js/components/datepicker.ts has 469 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 · REDACTED · ×1
  • REDACTED: 449 lines of code REDACTED:1 — REDACTED has 449 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 · apps/aihtml/assets/js/components/upload.ts · ×1
  • apps/aihtml/assets/js/components/upload.ts: 449 lines of code apps/aihtml/assets/js/components/upload.ts:1 — apps/aihtml/assets/js/components/upload.ts has 449 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 · apps/aihtml/assets/js/components/gantt.ts · ×1
  • apps/aihtml/assets/js/components/gantt.ts: 427 lines of code apps/aihtml/assets/js/components/gantt.ts:1 — apps/aihtml/assets/js/components/gantt.ts has 427 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 · apps/aihtml/assets/js/components/combobox.ts · ×1
  • apps/aihtml/assets/js/components/combobox.ts: 425 lines of code apps/aihtml/assets/js/components/combobox.ts:1 — apps/aihtml/assets/js/components/combobox.ts has 425 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 · apps/aihtml/assets/js/components/cascader.ts · ×1
  • apps/aihtml/assets/js/components/cascader.ts: 407 lines of code apps/aihtml/assets/js/components/cascader.ts:1 — apps/aihtml/assets/js/components/cascader.ts has 407 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No lint script · ×1
  • No lint 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.
Minor — 57 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×34
  • Duplicated predicate apps/aihtml/src/aihtml_tree.erl:228 — `HasKids andalso atom_to_binary(Open, utf8)` appears character-identically in 2 files — apps/aihtml/src/aihtml_tree.erl, apps/aihtml/src/aihtml_treegrid.erl. 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 apps/aihtml/src/aihtml_datatable.erl:391 — `Mode =/= none andalso atom_to_binary(Selected, utf8)` appears character-identically in 2 files — apps/aihtml/src/aihtml_datatable.erl, apps/aihtml/src/aihtml_treegrid.erl. 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 apps/aihtml/src/aihtml_datatable.erl:339 — `Mode =:= multiple orelse Mode =:= checkbox` appears character-identically in 2 files — apps/aihtml/src/aihtml_datatable.erl, apps/aihtml/src/aihtml_treegrid.erl. 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 apps/aihtml/src/aihtml_calendar.erl:235 — `is_integer(F) andalso F >= 0 andalso F =< 6` appears character-identically in 2 files — apps/aihtml/src/aihtml_calendar.erl, apps/aihtml/src/aihtml_datetime_input.erl. 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 apps/aihtml/assets/js/components/_lib_chart.ts:221 — `!!x && typeof x === "object" && !Array.isArray(x)` appears character-identically in 3 files — apps/aihtml/assets/js/components/_lib_chart.ts, REDACTED, apps/aihtml/assets/js/components/relation_graph.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 apps/aihtml/assets/js/components/gantt.ts:395 — `!d.moved && Math.abs(dx) + Math.abs(dy) < 4` appears character-identically in 2 files — apps/aihtml/assets/js/components/gantt.ts, apps/aihtml/assets/js/components/swimlane.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 apps/aihtml/assets/js/components/calendar.ts:122 — `Array.isArray(v) && (d === undefined || Array.isArray(d))` appears character-identically in 3 files — apps/aihtml/assets/js/components/calendar.ts, apps/aihtml/assets/js/components/datepicker.ts, apps/aihtml/assets/js/components/datetime_input.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 apps/aihtml/assets/js/components/datatable.ts:179 — `e.button === 0 && !e.metaKey && !e.ctrlKey && !e.shiftKey && !e.altKey` appears character-identically in 2 files — apps/aihtml/assets/js/components/datatable.ts, apps/aihtml/assets/js/components/pagination.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 apps/aihtml/assets/js/components/colorpicker.ts:106 — `e.key === "Escape" && this.#popup.isOpen` appears character-identically in 2 files — apps/aihtml/assets/js/components/colorpicker.ts, 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 apps/aihtml/assets/js/components/datetime_input.ts:264 — `e.relatedTarget instanceof Node && el.contains(e.relatedTarget)` appears character-identically in 3 files — apps/aihtml/assets/js/components/datetime_input.ts, REDACTED, apps/aihtml/assets/js/components/scrollview.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 apps/aihtml/assets/js/components/datatable.ts:711 — `e.target !== tr || tr.parentNode !== this.#body || isOff(el) || e.altKey || e.metaKey` appears character-identically in 2 files — apps/aihtml/assets/js/components/datatable.ts, apps/aihtml/assets/js/components/treegrid.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:67 — `el instanceof HTMLInputElement || el instanceof HTMLSelectElement || el instanceof HTMLTextAreaElement` appears character-identically in 2 files — REDACTED, apps/aihtml/assets/js/runtime/forms.ts. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:72 — `el instanceof HTMLSelectElement && el.multiple` appears character-identically in 2 files — REDACTED, apps/aihtml/assets/js/runtime/forms.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 apps/aihtml/assets/js/components/cascader.ts:92 — `el.getAttribute("data-ah-empty") || AH.t("common", "no_results", "No results found")` appears character-identically in 2 files — apps/aihtml/assets/js/components/cascader.ts, apps/aihtml/assets/js/components/combobox.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 apps/aihtml/assets/js/components/datepicker.ts:145 — `el.getAttribute("data-ah-format") || "yyyy-MM-dd"` appears character-identically in 2 files — apps/aihtml/assets/js/components/datepicker.ts, apps/aihtml/assets/js/components/datetime_input.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 apps/aihtml/assets/js/components/datepicker.ts:40 — `el.getAttribute("data-ah-labels") || "{}"` appears character-identically in 2 files — apps/aihtml/assets/js/components/datepicker.ts, apps/aihtml/assets/js/components/markdown_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 apps/aihtml/assets/js/components/menu.ts:157 — `el.getAttribute("data-ah-minimize-width") || ""` appears character-identically in 2 files — apps/aihtml/assets/js/components/menu.ts, apps/aihtml/assets/js/components/navbar.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 apps/aihtml/assets/js/components/combobox.ts:83 — `el.getAttribute("data-ah-placeholder") || ""` appears character-identically in 3 files — apps/aihtml/assets/js/components/combobox.ts, apps/aihtml/assets/js/components/dropdownlist.ts, apps/aihtml/assets/js/components/markdown_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 apps/aihtml/assets/js/components/expander.ts:62 — `el.getAttribute("data-animation") || "slide"` appears character-identically in 2 files — apps/aihtml/assets/js/components/expander.ts, apps/aihtml/assets/js/components/navigationbar.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 apps/aihtml/assets/js/components/expander.ts:14 — `el.getAttribute("data-toggle-mode") || "click"` appears character-identically in 3 files — apps/aihtml/assets/js/components/expander.ts, apps/aihtml/assets/js/components/navigationbar.ts, apps/aihtml/assets/js/components/tree.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 apps/aihtml/assets/js/components/dock_layout.ts:482 — `inside(x, y, r) && r.width * r.height < area` appears character-identically in 2 files — apps/aihtml/assets/js/components/dock_layout.ts, apps/aihtml/assets/js/components/sortable.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 apps/aihtml/assets/js/components/dock_layout.ts:332 — `parseFloat(w.style.width) || w.offsetWidth` appears character-identically in 2 files — apps/aihtml/assets/js/components/dock_layout.ts, apps/aihtml/assets/js/components/docking.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 apps/aihtml/assets/js/components/scrollview.ts:175 — `parseInt(this.element.getAttribute("data-ah-value") || "", 10) || 0` appears character-identically in 2 files — apps/aihtml/assets/js/components/scrollview.ts, apps/aihtml/assets/js/components/steps.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 apps/aihtml/assets/js/components/cascader.ts:78 — `t && t.isConnected !== false && !this.element.contains(t)` appears character-identically in 2 files — apps/aihtml/assets/js/components/cascader.ts, apps/aihtml/assets/js/components/combobox.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 apps/aihtml/assets/js/components/datepicker.ts:56 — `t instanceof Node && t.isConnected !== false && !el.contains(t)` appears character-identically in 2 files — apps/aihtml/assets/js/components/datepicker.ts, apps/aihtml/assets/js/components/datetime_input.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.
  • + 9 more in this group — see findings.md.
X31 · Test-only surface in a production module · Test-only surface in a production module · ×10
  • Test-only surface in a production module apps/aihtml/src/aihtml_datagrid.erl:88 — `aihtml_datagrid:format_value/3` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datagrid.erl:88 — `aihtml_datagrid:aggregate/2` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datagrid.erl:88 — `aihtml_datagrid:pager_view/4` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datagrid.erl:88 — `aihtml_datagrid:default_labels/0` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datatable.erl:79 — `aihtml_datatable:datatable_page/3` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datatable.erl:79 — `aihtml_datatable:pager_view/5` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_datatable.erl:79 — `aihtml_datatable:pager_view/6` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_diff.erl:21 — `aihtml_diff:line_rows/2` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_diff.erl:21 — `aihtml_diff:word_parts/2` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
  • Test-only surface in a production module apps/aihtml/src/aihtml_diff.erl:21 — `aihtml_diff:split_rows/1` is exported unconditionally, and the comment directly above the `-export` on this line says the exports below it are for testing. Erlang has no visibility below `-export`, so this is part of the module's public contract: it cannot be changed without a compatibility argument. This arm read the comment, not the call graph: if the comment is right and only tests call it, wrapping the attribute in `-ifdef(TEST). … -endif.` keeps the test's access and removes it from the shipped module. If production code calls it, the comment is stale and wrapping the export would break the build — delete the comment and document the function as part of the module's API.
P2 · Observability · Console output used as the logging channel · ×3
  • Console output used as the logging channel apps/aihtml/assets/js/runtime/behaviours.ts:162 — `apps/aihtml/assets/js/runtime/behaviours.ts` reports through `console.*` at line 162 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/aihtml/assets/js/runtime/behaviours.ts:226 — `apps/aihtml/assets/js/runtime/behaviours.ts` reports through `console.*` at line 226 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel apps/aihtml/assets/js/runtime/fetch.ts:107 — `apps/aihtml/assets/js/runtime/fetch.ts` reports through `console.*` at line 107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×2
  • Hand-rolled JSON/XML parsing via regex apps/aihtml/priv/static/js/vendor-xlsx-BKER4Xe2.js:64 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex apps/aihtml/priv/static/js/vendor-xlsx-BKER4Xe2.js:66 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found rebar.config:31 — 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 `rebar.config` makes this repository a deployable product (line 31).
D24 · Comment Value · redundant comment · ×1
  • redundant comment apps/aihtml/assets/js/components/notification.ts:61 — "a clone of an HTMLElement is one" repeats the code it sits on: 3 of its 3 words (clone, html, element) are already in `const card = NotifyCard.show(src.cloneNode(true) as HTMLElement, {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 3 project(s) overshoot their size bounds, lowering Project Cohesion to 3.3/10. The most over is `apps/aihtml` (64435 LoC, 509 module-visible types across 5 directories). 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.
M2 · Architecture documentation · No ADRs · ×1
  • 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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add dialyzer or elvis — 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.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation package.json:20 — `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`.
P6 · Release Hygiene · No changelog · ×1
  • 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.)
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~1.4 `!` null assertions per 1k TypeScript source lines — 47 assertion(s) across the 33190 source line(s) of the 126 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: apps/aihtml/assets/js/components/markdown_editor.ts (13), apps/aihtml/assets/js/components/calendar.ts (6), REDACTED (5). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile resolved no direct production dependency) — This repository's npm dependencies were read for PINNING discipline: 0 production declaration(s) plus 23 development one(s) across 1 package.json (1 of them the product — the rest are example, documentation or fixture manifests, which are read and counted but screened off the rules below, because both prescribe a MOVE and "align your example apps" is not a remedy), against 1 committed lockfile(s). No pinning defect was found. That is only PART of dependency hygiene, so this dimension is NOT SCORED: whether any of these packages has a newer, deprecated or abandoned release is the dependency-CURRENCY question, and answering it needs concrete resolved versions. This repository's committed lockfile WAS read and it resolves no direct production dependency to grade — a package.json states version RANGES, which name no particular release to be behind. That is a fact about this repository, not a reader we are missing. A clean pinning pass is NOT an all-clear for these dependencies, and it is not a finding that they are all USED. Note also what is deliberately NOT charged here: a workspace legitimately carries ONE lockfile for many manifests, so no row is raised off the lockfile count, only reported. Known CVEs in the same dependency graph are a separate question again, reported under D30 wherever the manifest is OSV-readable. This repository declares more than one kind of dependency manifest (a rebar.config / erlang.mk DEPS (Hex) and package.json), and only package.json was read here: the others remain a coverage gap in this analyzer — not a verdict that the dependencies they declare are healthy.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b2c209cdc3c848b7ba12b5dd58b6e43e/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-b2c209cdc3c848b7ba12b5dd58b6e43e/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .12artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .7artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 12 file(s) — `apps/aihtml/assets/js/components/dragdrop.ts`, `apps/aihtml/assets/js/components/pivotgrid.ts`, `apps/aihtml/assets/js/components/sortable.ts`, `apps/aihtml/assets/js/runtime/vendor.ts`, `apps/aihtml/priv/static/js/markdown_editor-BH6-jFzM.js`, … (+7 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D36 · Supply-chain Provenance & Signingprovenance—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.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1de3a-4e93-7a19-8753-3442d2c15b33 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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