Public report of GraphiteEditor/Graphite, published 14 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, 14 November 2026, 06:36 UTC · Survey ID cd_72433e561bc34cbf92df5a4359d50ef8

GraphiteEditor/Graphite

Measured 14 November 2026, 06:25 UTC, at code version c974d41

CAI score 42out of 100 Weak
CriticalWeakAdequateStrongExemplary
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 large codebase: 247,954 lines of product code in 75 projects, tests not counted · Estimated rebuild effort: about 1.6 person-years · Weakest lens: Accessibility, 29

Findings by how serious they are

84 critical 1995 serious 121 minor

13 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
14 November 2026, 06:25 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.

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 ▸

72of 72 dimensions measured by tools.
2149of 2200 findings point to an exact file and line, so you can open each one in the code. The other 51 concern the repository as a whole, such as missing documentation.
72dimensions across 9 lenses, read from 247,954 lines of product code in 75 projects.
Chapters

Executive summary

GraphiteEditor/Graphite falls short of our standard for production, in part because it has controls that only work with a mouse. It scores 42 out of 100 and is rated Weak, and 20 of its 84 critical findings are security problems.

Accessibility, at 29, is the weakest lens and counts most in the score. The best first step is making the controls keyboard-usable, worth about 5 points. Structuring the pages comes next, worth about 4 points. Raising Accessibility to 70 would lift the score to about 52.

Twelve known security holes in the packages the code depends on can be used by attackers. Ten controls can't be used without a mouse, and twenty-four buttons or links have no name a screen reader can say. Making the controls work with a keyboard, updating the vulnerable packages and naming the buttons and links would close these risks. Passing outside input through environment variables would fix the four pipeline steps that put outside input straight into a shell command, and limiting each secret to its own step would deal with the two secrets exposed to more of the pipeline than needed. The 19 sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 247,954 lines, about €230,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.
Accessibility 29 · counts for 45%Code Health 40 · counts for 25%Production Readiness 48 · counts for 14%Security and Compliance 68 · counts for 8%Maturity 77 · counts for 4%Event-Driven 80 · counts for 2%Performance 94 · counts for 1%Architecture 95 · counts for 1%Event Sourcing 100 · counts for 0%

If Accessibility rose from 29 to 70, the lowest score rated Strong, the score would rise from 42 to about 52.

Code composition: what the lines of code are
Product code 93%Tests 7%
New since the last survey: 507 findings

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

  • Cyclomatic Complexity · Replica::handle_packet (cyclomatic 49) document/peer-transport/src/replica.rs
  • Cyclomatic Complexity · SyncMessageHandler::process_message (cyclomatic 39) editor/src/messages/portfolio/sync/sync_message_handler.rs
  • Cyclomatic Complexity · graphene_cli::dump::print (cyclomatic 32) node-graph/graphene-cli/src/dump.rs
  • Cyclomatic Complexity · vector_nodes::turtle::turtle_path (cyclomatic 32) node-graph/nodes/vector/src/turtle.rs
  • Cyclomatic Complexity · membership.window.addEventListener("DOMContentLoaded")::update (cyclomatic 31) REDACTED
  • Cyclomatic Complexity · graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points (cyclomatic 30) editor/src/messages/portfolio/document_migration.rs
  • Cyclomatic Complexity · HistoryMessageHandler::process_message (cyclomatic 26) editor/src/messages/portfolio/history/history_message_handler.rs
  • Cyclomatic Complexity · NodeNetwork::flatten_with_fns (cyclomatic 26) node-graph/graph-craft/src/compiler/flatten.rs
  • Cyclomatic Complexity · SyncMessageHandler::poll_document (cyclomatic 24) editor/src/messages/portfolio/sync/sync_message_handler.rs
  • Cyclomatic Complexity · graphene_std::render_cache::render_output_cache (cyclomatic 24) node-graph/nodes/gstd/src/render_cache.rs
  • Cyclomatic Complexity · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 23) REDACTED
  • Cyclomatic Complexity · Session::follow (cyclomatic 20) document/graph-storage/src/session.rs
  • Cyclomatic Complexity · rendering::vello_scene_builder::finite_path (cyclomatic 19) node-graph/libraries/rendering/src/vello_scene_builder.rs
  • Cyclomatic Complexity · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 19) REDACTED
  • Cyclomatic Complexity · WorkspacePanelLayout::restore_panel_to_default_position (cyclomatic 18) editor/src/messages/portfolio/utility_types.rs
  • Cyclomatic Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion (cyclomatic 18) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs
  • Cyclomatic Complexity · Gdd::open_stored (cyclomatic 17) document/format/src/lib.rs
  • Cyclomatic Complexity · PreferencesMessageHandler::process_message (cyclomatic 17) editor/src/messages/preferences/preferences_message_handler.rs
  • Cyclomatic Complexity · graphite_editor::messages::portfolio::document::data_panel::data_panel_message_handler::context_widgets (cyclomatic 17) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs
  • Cyclomatic Complexity · graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair (cyclomatic 17) editor/src/messages/tool/common_functionality/utility_functions.rs
  • Cyclomatic Complexity · input.onPotentialDoubleClick (cyclomatic 17) frontend/src/utility-functions/input.ts
  • Cyclomatic Complexity · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 17) REDACTED
  • Cyclomatic Complexity · migration_runner::node::upstream_most (cyclomatic 16) document/migrations/runner/src/node.rs
  • Cyclomatic Complexity · migration_runner::node::apply_runs (cyclomatic 16) document/migrations/runner/src/node.rs
  • Cyclomatic Complexity · migration_runner::node::rewrite_history (cyclomatic 16) document/migrations/runner/src/node.rs
  • Cyclomatic Complexity · graph_craft::application_io::http::send (cyclomatic 16) node-graph/graph-craft/src/application_io/http.rs
  • Cyclomatic Complexity · graphene_cli::main (cyclomatic 16) node-graph/graphene-cli/src/main.rs
  • Cyclomatic Complexity · Vector::weld_connected (cyclomatic 16) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs
  • Cyclomatic Complexity · vector_types::vector::algorithms::weld::weld_nearby_points (cyclomatic 16) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs
  • Cyclomatic Complexity · membership.colorPopover (cyclomatic 16) REDACTED
  • Cognitive Complexity · graphene_cli::dump::print (cognitive 77) node-graph/graphene-cli/src/dump.rs
  • Cognitive Complexity · Replica::handle_packet (cognitive 72) document/peer-transport/src/replica.rs
  • Cognitive Complexity · SyncMessageHandler::process_message (cognitive 58) editor/src/messages/portfolio/sync/sync_message_handler.rs
  • Cognitive Complexity · NodeNetwork::flatten_with_fns (cognitive 39) node-graph/graph-craft/src/compiler/flatten.rs
  • Cognitive Complexity · migration_runner::node::upstream_most (cognitive 32) document/migrations/runner/src/node.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points (cognitive 32) editor/src/messages/portfolio/document_migration.rs
  • Cognitive Complexity · graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair (cognitive 31) editor/src/messages/tool/common_functionality/utility_functions.rs
  • Cognitive Complexity · SyncMessageHandler::apply_dirty (cognitive 30) editor/src/messages/portfolio/sync/sync_message_handler.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion (cognitive 30) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs
  • Cognitive Complexity · membership.window.addEventListener("DOMContentLoaded")::update (cognitive 30) REDACTED
  • Cognitive Complexity · Session::follow (cognitive 28) document/graph-storage/src/session.rs
  • Cognitive Complexity · migration_runner::node::rewrite_history (cognitive 28) document/migrations/runner/src/node.rs
  • Cognitive Complexity · HistoryMessageHandler::process_message (cognitive 28) editor/src/messages/portfolio/history/history_message_handler.rs
  • Cognitive Complexity · migration_runner::order::order_migrations (cognitive 27) document/migrations/runner/src/order.rs
  • Cognitive Complexity · text_nodes::l_system::rewrite (cognitive 27) node-graph/nodes/text/src/l_system.rs
  • Cognitive Complexity · migration_snapshot::api::api_problems (cognitive 25) document/migrations/snapshot/src/api.rs
  • Cognitive Complexity · rendering::vello_scene_builder::finite_path (cognitive 25) node-graph/libraries/rendering/src/vello_scene_builder.rs
  • Cognitive Complexity · vector_nodes::turtle::turtle_path (cognitive 25) node-graph/nodes/vector/src/turtle.rs
  • Cognitive Complexity · ShapeState::delete_point_and_break_path (cognitive 23) editor/src/messages/tool/common_functionality/shape_editor.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::data_panel::data_panel_message_handler::context_widgets (cognitive 23) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs
  • Cognitive Complexity · migration_runner::node::apply_runs (cognitive 22) document/migrations/runner/src/node.rs
  • Cognitive Complexity · NodeNetworkInterface::give_diverged_catalog_entries_new_ids (cognitive 22) editor/src/messages/portfolio/document/utility_types/network_interface.rs
  • Cognitive Complexity · NodeRuntime::run (cognitive 20) editor/src/node_graph_executor/runtime.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::document_node_derive::post_process_nodes (cognitive 20) editor/src/messages/portfolio/document/node_graph/document_node_definitions/document_node_derive.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::reconcile::field_deltas (cognitive 20) editor/src/messages/portfolio/document/utility_types/network_interface/reconcile.rs
  • Cognitive Complexity · NodeNetwork::remove_dead_nodes (cognitive 20) node-graph/graph-craft/src/compiler/flatten.rs
  • Cognitive Complexity · graphene_cli::main (cognitive 20) node-graph/graphene-cli/src/main.rs
  • Cognitive Complexity · membership.window.addEventListener("DOMContentLoaded") (cognitive 20) REDACTED
  • Cognitive Complexity · NodeNetworkInterface::remove_export (cognitive 19) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs
  • Cognitive Complexity · SyncMessageHandler::poll_document (cognitive 19) editor/src/messages/portfolio/sync/sync_message_handler.rs
  • Cognitive Complexity · migration_runner::format::run_format_migrations (cognitive 18) document/migrations/runner/src/format.rs
  • Cognitive Complexity · WorkspacePanelLayout::restore_panel_to_default_position (cognitive 18) editor/src/messages/portfolio/utility_types.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::storage_metadata::apply_network_view_settings (cognitive 18) editor/src/messages/portfolio/document/utility_types/network_interface/storage_metadata.rs
  • Cognitive Complexity · graphene_std::render_cache::render_output_cache (cognitive 18) node-graph/nodes/gstd/src/render_cache.rs
  • Cognitive Complexity · NodeNetwork::replace_node_with_its_exports (cognitive 17) node-graph/graph-craft/src/compiler/flatten.rs
  • Cognitive Complexity · vector_nodes::vector_nodes::sample_polyline (cognitive 17) node-graph/nodes/vector/src/vector_nodes.rs
  • Cognitive Complexity · BlobStore::absorb (cognitive 16) document/format/src/blob_store.rs
  • Cognitive Complexity · NodeNetworkInterface::from_old_network (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs
  • Cognitive Complexity · NodeNetworkInterface::carry_definitions (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/store/mod.rs
  • Cognitive Complexity · NodeNetwork::lift_nested_networks (cognitive 16) node-graph/graph-craft/src/document.rs
  • Cognitive Complexity · graph_craft::application_io::http::send (cognitive 16) node-graph/graph-craft/src/application_io/http.rs
  • Cognitive Complexity · vector_nodes::generator_nodes::rectangle (cognitive 16) node-graph/nodes/vector/src/generator_nodes.rs
  • Cognitive Complexity · vector_nodes::vector_nodes::evaluate_path (cognitive 16) node-graph/nodes/vector/src/vector_nodes.rs
  • Cognitive Complexity · membership.window.addEventListener("DOMContentLoaded") (cognitive 16) REDACTED
  • God Classes · MethodTooLong: DocumentMessageHandler.process_message editor/src/messages/portfolio/document/document_message_handler.rs
  • God Classes · ClassTooLong: DocumentMessageHandler editor/src/messages/portfolio/document/document_message_handler.rs
  • God Classes · FunctionTooLong: membership.window.addEventListener("DOMContentLoaded") REDACTED
  • God Classes · TooManyMethods: Color node-graph/libraries/core-types/src/color/color_types.rs
  • God Classes · FileTooLong: component/credits-particles.js website/static/js/component/credits-particles.js
  • God Classes · FileTooLong: src/session.rs document/graph-storage/src/session.rs
  • God Classes · ClassTooLong: Session document/graph-storage/src/session.rs
  • God Classes · TooManyMethods: Replica document/peer-transport/src/replica.rs
  • God Classes · MethodTooLong: Replica.handle_packet document/peer-transport/src/replica.rs
  • God Classes · TooManyMethods: NodeNetwork node-graph/graph-craft/src/document.rs
  • God Classes · ClassTooLong: Replica document/peer-transport/src/replica.rs
  • God Classes · FileTooLong: REDACTED REDACTED
  • God Classes · FunctionTooLong: credits-particles.createParticleScene website/static/js/component/credits-particles.js
  • God Classes · FunctionTooLong: graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points editor/src/messages/portfolio/document_migration.rs
  • God Classes · FileTooLong: src/replica.rs document/peer-transport/src/replica.rs
  • God Classes · FileTooLong: color/color_types.rs node-graph/libraries/core-types/src/color/color_types.rs
  • God Classes · TooManyMethods: NodeMut editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs
  • God Classes · MethodTooLong: SyncMessageHandler.process_message editor/src/messages/portfolio/sync/sync_message_handler.rs
  • God Classes · FunctionTooLong: graphite_editor::messages::portfolio::document::document_message_handler::navigation_controls editor/src/messages/portfolio/document/document_message_handler.rs
  • God Classes · FileTooLong: sync/sync_message_handler.rs editor/src/messages/portfolio/sync/sync_message_handler.rs
  • God Classes · ClassTooLong: Color node-graph/libraries/core-types/src/color/color_types.rs
  • God Classes · FunctionTooLong: graphite_proc_macros::editor_commands::editor_commands_impl proc-macros/src/editor_commands.rs
  • God Classes · FunctionTooLong: graphite_editor::messages::portfolio::sync::sync_message_handler::collaboration_panel_layout editor/src/messages/portfolio/sync/sync_message_handler.rs
  • God Classes · FunctionTooLong: graphene_cli::dump::print node-graph/graphene-cli/src/dump.rs
  • God Classes · FileTooLong: src/context.rs node-graph/libraries/core-types/src/context.rs
  • Code Duplication · Near-duplicate member family (4 members, 29 shared lines) editor/src/messages/portfolio/document/overlays/utility_types_web.rs

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: 428 findings

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

  • Cyclomatic Complexity · NodeRuntime::handle_requests (cyclomatic 36) editor/src/node_graph_executor/runtime.rs
  • Cyclomatic Complexity · NodeNetwork::flatten_with_fns (cyclomatic 25) node-graph/graph-craft/src/document.rs
  • Cyclomatic Complexity · NodeRuntime::process_monitor_nodes (cyclomatic 20) editor/src/node_graph_executor/runtime.rs
  • Cyclomatic Complexity · graphene_cli::main (cyclomatic 19) node-graph/graphene-cli/src/main.rs
  • Cyclomatic Complexity · document_graph_storage::registry::collect_timestamps (cyclomatic 18) document/graph-storage/src/registry.rs
  • Cyclomatic Complexity · graphite_editor::messages::portfolio::document::document_diff::diff_registries (cyclomatic 16) editor/src/messages/portfolio/document/document_diff.rs
  • Cognitive Complexity · NodeRuntime::handle_requests (cognitive 59) editor/src/node_graph_executor/runtime.rs
  • Cognitive Complexity · NodeNetwork::flatten_with_fns (cognitive 36) node-graph/graph-craft/src/document.rs
  • Cognitive Complexity · NodeNetworkInterface::toggle_preview (cognitive 34) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs
  • Cognitive Complexity · document_graph_storage::registry::collect_timestamps (cognitive 27) document/graph-storage/src/registry.rs
  • Cognitive Complexity · graphene_cli::main (cognitive 26) node-graph/graphene-cli/src/main.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::construct_structural_additions (cognitive 25) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs
  • Cognitive Complexity · raster_nodes::dehaze::compute_dark_channel (cognitive 25) node-graph/nodes/raster/src/dehaze.rs
  • Cognitive Complexity · vector_nodes::vector_nodes::copy_to_points (cognitive 23) node-graph/nodes/vector/src/vector_nodes.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::document_diff::diff_registries (cognitive 22) editor/src/messages/portfolio/document/document_diff.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::document_diff::diff_networks (cognitive 22) editor/src/messages/portfolio/document/document_diff.rs
  • Cognitive Complexity · NodeNetwork::remove_dead_nodes (cognitive 20) node-graph/graph-craft/src/document.rs
  • Cognitive Complexity · graphite_wasm_wrapper::native_communication::receive_native_message (cognitive 18) frontend/wrapper/src/native_communication.rs
  • Cognitive Complexity · vector_nodes::grid_topology::gilbert_curve (cognitive 18) node-graph/nodes/vector/src/grid_topology.rs
  • Cognitive Complexity · NodeNetwork::replace_node_with_its_exports (cognitive 17) node-graph/graph-craft/src/document.rs
  • Cognitive Complexity · text_nodes::json::strip_trailing_commas (cognitive 17) node-graph/nodes/text/src/json.rs
  • Cognitive Complexity · NodeGraphMessageHandler::update_graph_bar_left (cognitive 16) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs
  • Cognitive Complexity · graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::construct_metadata_snapshot (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs
  • Cognitive Complexity · vector_nodes::vector_nodes::assign_colors (cognitive 16) node-graph/nodes/vector/src/vector_nodes.rs
  • Cognitive Complexity · Preprocessor::expand_network (cognitive 16) node-graph/preprocessor/src/lib.rs
  • God Classes · TooManyMethods: Color node-graph/libraries/no-std-types/src/color/color_types.rs
  • God Classes · FileTooLong: src/document.rs node-graph/graph-craft/src/document.rs
  • God Classes · ClassTooLong: NodeGraphExecutor editor/src/node_graph_executor.rs
  • God Classes · MethodTooLong: PerPixelAdjustCodegen.codegen_gpu_node node-graph/node-macro/src/shader_nodes/per_pixel_adjust.rs
  • God Classes · FileTooLong: color/color_types.rs node-graph/libraries/no-std-types/src/color/color_types.rs
  • God Classes · ClassTooLong: Color node-graph/libraries/no-std-types/src/color/color_types.rs
  • God Classes · FunctionTooLong: graphite_editor::messages::portfolio::document::data_panel::data_panel_message_handler::generate_layout editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs
  • God Classes · MethodTooLong: NodeGraphExecutor.poll_node_graph_evaluation editor/src/node_graph_executor.rs
  • God Classes · FunctionTooLong: graphite_desktop_wrapper::intercept_frontend_message::intercept_frontend_message desktop/wrapper/src/intercept_frontend_message.rs
  • God Classes · FileTooLong: src/app.rs desktop/src/app.rs
  • God Classes · ClassTooLong: Gradient node-graph/libraries/vector-types/src/gradient.rs
  • God Classes · ClassTooLong: NodeNetwork node-graph/graph-craft/src/document.rs
  • Code Duplication · Near-duplicate member family (4 members, 29 shared lines) editor/src/messages/portfolio/document/overlays/utility_types_web.rs
  • Code Duplication · Near-duplicate member pair (21 shared lines) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) node-graph/nodes/transform/src/transform_nodes.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) editor/src/messages/portfolio/document/graph_operation/utility_types.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) node-graph/libraries/rendering/src/renderer.rs
  • Code Duplication · Duplicated block (17 lines × 4) editor/src/messages/portfolio/document/overlays/utility_types_web.rs
  • Code Duplication · Duplicated block (16 lines × 2) node-graph/libraries/rendering/src/renderer.rs
  • Code Duplication · Duplicated block (16 lines × 2) node-graph/nodes/repeat/src/repeat_nodes.rs
  • Code Duplication · Duplicated block (16 lines × 2) node-graph/nodes/text/src/regex.rs
  • Code Duplication · Duplicated block (15 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs
  • Code Duplication · Duplicated block (14 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (10–13 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs
  • Code Duplication · Duplicated block (13 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (12 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (12 lines × 2) node-graph/nodes/graphic/src/graphic.rs
  • Code Duplication · Duplicated block (11 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs
  • Code Duplication · Duplicated block (9–11 lines × 2) editor/src/messages/tool/common_functionality/shape_editor.rs
  • Code Duplication · Duplicated block (11 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs
  • Code Duplication · Duplicated block (11 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs
  • Code Duplication · Duplicated block (11 lines × 2) editor/src/messages/tool/tool_messages/spline_tool.rs
  • Code Duplication · Duplicated block (10 lines × 3) node-graph/nodes/text/src/regex.rs
  • Code Duplication · Duplicated block (10 lines × 2) document/graph-storage/src/document.rs
  • Code Duplication · Duplicated block (10 lines × 2) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs
  • Code Duplication · Duplicated block (8–10 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs
  • Code Duplication · Duplicated block (10 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs
  • Code Duplication · Duplicated block (9–10 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (10 lines × 2) node-graph/nodes/gstd/src/platform_application_io.rs
  • Code Duplication · Duplicated block (9 lines × 4) node-graph/nodes/text/src/regex.rs
  • Code Duplication · Duplicated block (8–9 lines × 3) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (9 lines × 2) editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs
  • Code Duplication · Duplicated block (9 lines × 2) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs
  • Code Duplication · Duplicated block (9 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs
  • Code Duplication · Duplicated block (9 lines × 2) editor/src/messages/portfolio/workspace/workspace_message_handler.rs
  • Code Duplication · Duplicated block (9 lines × 2) editor/src/messages/tool/tool_messages/text_tool.rs
  • Code Duplication · Duplicated block (8 lines × 3) node-graph/libraries/rendering/src/renderer.rs
  • Code Duplication · Duplicated block (8 lines × 3) node-graph/nodes/vector/src/vector_nodes.rs
  • Code Duplication · Duplicated block (8 lines × 2) editor/src/messages/color_picker/color_picker_message_handler.rs
  • Code Duplication · Duplicated block (8 lines × 2) editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs
  • Code Duplication · Duplicated block (6–8 lines × 2) editor/src/messages/portfolio/document/graph_operation/utility_types.rs
  • Code Duplication · Duplicated block (6–8 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (7–8 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (8 lines × 2) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (8 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs
  • Code Duplication · Duplicated block (8 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs
  • Code Duplication · Duplicated block (8 lines × 2) node-graph/libraries/core-types/src/list.rs
  • Code Duplication · Duplicated block (7 lines × 4) editor/src/messages/color_picker/color_picker_message_handler.rs
  • Code Duplication · Duplicated block (7 lines × 4) node-graph/libraries/rendering/src/renderer.rs
  • Code Duplication · Duplicated block (7 lines × 3) editor/src/messages/portfolio/document/document_message_handler.rs
  • Code Duplication · Duplicated block (7 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs
  • Code Duplication · Duplicated block (7 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs
  • Code Duplication · Duplicated block (7 lines × 2) node-graph/nodes/math/src/lib.rs
  • Code Duplication · Duplicated block (7 lines × 2) node-graph/nodes/raster/src/filter.rs
  • Code Duplication · Duplicated block (6 lines × 2) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs
  • Code Duplication · Duplicated block (6 lines × 2) node-graph/nodes/text/src/regex.rs
  • Code Duplication · Duplicated block (2–5 lines × 5) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (5 lines × 3) editor/src/messages/portfolio/document_migration.rs
  • Code Duplication · Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs
  • Code Duplication · Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs
  • Code Duplication · Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs
  • Code Duplication · Duplicated block (5 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs
  • Code Duplication · Duplicated block (5 lines × 2) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs
Rebuild cost: about €230,000 · Estimate
Cost to rebuild€76,000 to €380,000, for 1,259 to 3,993 hours of work, about 1.6 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 42. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 247,954 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
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Raises the score by about 5 points · Medium effort · Keyboard semantics
2
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Raises the score by about 4 points · Medium effort · Page structure
3
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Raises the score by about 3 points · Medium effort · Text alternatives

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 €230,000 to build again, about 1.6 person-years of work. Its weakest lens is Accessibility, at 29 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. Of all the actions in this report, it raises the score most for the work it takes: about 5 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.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 10% on every change. The history of the code shows how much it changes: about 247,436 lines over the last 90 days, which is about 1,003,490 lines a year. At that pace, the extra work comes to an estimated 114.2 to 685 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch brush-nodes brush-nodes core-types core-types brush-nodes->core-types dyn-any dyn-any brush-nodes->dyn-any graphene-hash graphene-hash brush-nodes->graphene-hash graphic-types graphic-types brush-nodes->graphic-types node-macro node-macro brush-nodes->node-macro raster-types raster-types brush-nodes->raster-types wgpu-executor wgpu-executor brush-nodes->wgpu-executor core-types->dyn-any core-types->graphene-hash core-types->node-macro document-format document-format document-format->core-types document-graph-storage document-graph-storage document-format->document-graph-storage graph-craft graph-craft document-format->graph-craft graphene-resource graphene-resource document-format->graphene-resource document-graph-storage->core-types document-graph-storage->graph-craft document-graph-storage->graphene-resource graph-craft->brush-nodes graph-craft->core-types graph-craft->dyn-any graphene-application-io graphene-application-io graph-craft->graphene-application-io graphene-core graphene-core graph-craft->graphene-core graph-craft->graphene-hash graph-craft->graphic-types rendering rendering graph-craft->rendering text-nodes text-nodes graph-craft->text-nodes graph-craft->wgpu-executor graphene-application-io->core-types graphene-application-io->dyn-any graphene-application-io->graphene-hash graphene-application-io->graphene-resource graphene-application-io->raster-types graphene-application-io->text-nodes vector-types vector-types graphene-application-io->vector-types graphene-cli graphene-cli graphene-cli->document-format graphene-cli->document-graph-storage graphene-cli->graph-craft graphene-std graphene-std graphene-cli->graphene-std graphene-cli->wgpu-executor graphene-core->core-types graphene-core->dyn-any graphene-core->graphene-hash graphene-core->graphic-types graphene-core->node-macro graphene-core->raster-types graphene-resource->core-types graphene-resource->dyn-any graphene-std->brush-nodes graphene-std->core-types graphene-std->dyn-any graphene-std->graph-craft graphene-std->graphene-application-io graphene-std->graphene-core graphene-std->graphic-types graphene-std->node-macro graphene-std->rendering graphene-std->text-nodes graphene-std->vector-types graphene-std->wgpu-executor graphic-types->core-types graphic-types->dyn-any graphic-types->graphene-hash graphic-types->node-macro graphic-types->raster-types graphic-types->vector-types graphite-editor graphite-editor graphite-editor->document-format graphite-editor->document-graph-storage graphite-editor->dyn-any graphite-editor->graph-craft graphite-editor->graphene-hash graphite-editor->graphene-std graphite-editor->wgpu-executor raster-types->core-types raster-types->dyn-any raster-types->graphene-hash raster-types->node-macro rendering->core-types rendering->dyn-any rendering->graphene-hash rendering->graphene-resource rendering->graphic-types rendering->text-nodes rendering->vector-types text-nodes->core-types text-nodes->dyn-any text-nodes->graphene-hash text-nodes->graphene-resource text-nodes->node-macro text-nodes->vector-types vector-types->core-types vector-types->dyn-any vector-types->graphene-hash vector-types->node-macro wgpu-executor->core-types wgpu-executor->dyn-any wgpu-executor->graphene-application-io wgpu-executor->node-macro wgpu-executor->raster-types wgpu-executor->rendering __more__ +55 more projects

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.

723 modules, with 2046 dependencies between them. 12 loops run through 125 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 683 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 core_types.poll2 graphene_hash3 graphite_editor.utility_traits4 core_types.types5 graphene_resource6 graphite_editor.messages.viewport.viewport_message_handler7 vector_types.vector.style8 core_types.list9 document_graph_storage.schema.ids10 graphene_application_io11 graphite_editor.messages.input_preprocessor.input_preprocessor_message_handler12 core_types.color.color_types13 document_graph_storage.schema.delta14 document_graph_storage.schema.model15 graph_craft.document16 vector_types.vector.misc17 wgpu_executor18 graphite_editor.messages.portfolio.document.overlays.utility_types_native19 graphite_editor.messages.portfolio.document.utility_types.network_interface.types20 vector_types.vector.vector_types21 graphite_editor.messages.portfolio.document.utility_types.network_interface.template22 vector_types.vector.vector_attributes23 graphite_editor.messages.portfolio.document.utility_types.network_interface24 vector_types.vector.path25 document_format26 graphite_editor.messages.portfolio.document.utility_types.document_metadata27 graphite_editor.messages.tool.common_functionality.edit_target28 graphite_editor.messages.tool.utility_types29 graphite_editor.messages.tool.common_functionality.snap_session30 graphite_editor.messages.tool.tool_messages.path_tool31 graphite_editor.messages.tool.tool_messages.shape_tool32 graphite_editor.messages.tool.common_functionality.shape_editor33 graphite_editor.messages.tool.common_functionality.shapes.arc_shape34 graphite_editor.messages.layout.utility_types.layout_widget35 graphite_editor.messages.portfolio.document.document_message_handler36 graphite_editor.messages.portfolio.document.utility_types.misc37 graphite_editor.messages.frontend.utility_types38 graphite_editor.messages.portfolio.portfolio_message_handler39 graphite_editor.messages.tool.tool_messages.select_tool40 graphite_editor.dispatcher
1 core_types.poll
2 graphene_hash
3 graphite_editor.utility_traits
4 core_types.types1
5 graphene_resource2
6 graphite_editor.messages.viewport.viewport_message_handler11
7 vector_types.vector.style1
8 core_types.list51
9 document_graph_storage.schema.ids1
10 graphene_application_io111
11 graphite_editor.messages.input_preprocessor.input_preprocessor_message_handler11
12 core_types.color.color_types1
13 document_graph_storage.schema.delta13
14 document_graph_storage.schema.model6
15 graph_craft.document241
16 vector_types.vector.misc324
17 wgpu_executor1
18 graphite_editor.messages.portfolio.document.overlays.utility_types_native311
19 graphite_editor.messages.portfolio.document.utility_types.network_interface.types1112511
20 vector_types.vector.vector_types2535
21 graphite_editor.messages.portfolio.document.utility_types.network_interface.template12226
22 vector_types.vector.vector_attributes21
23 graphite_editor.messages.portfolio.document.utility_types.network_interface23132612
24 vector_types.vector.path54
25 document_format54211
26 graphite_editor.messages.portfolio.document.utility_types.document_metadata222
27 graphite_editor.messages.tool.common_functionality.edit_target1111
28 graphite_editor.messages.tool.utility_types1111111311
29 graphite_editor.messages.tool.common_functionality.snap_session1112132
30 graphite_editor.messages.tool.tool_messages.path_tool113624192922
31 graphite_editor.messages.tool.tool_messages.shape_tool114111013221
32 graphite_editor.messages.tool.common_functionality.shape_editor452522
33 graphite_editor.messages.tool.common_functionality.shapes.arc_shape11111111241111
34 graphite_editor.messages.layout.utility_types.layout_widget21
35 graphite_editor.messages.portfolio.document.document_message_handler11211321131411126
36 graphite_editor.messages.portfolio.document.utility_types.misc1
37 graphite_editor.messages.frontend.utility_types2
38 graphite_editor.messages.portfolio.portfolio_message_handler111111111212
39 graphite_editor.messages.tool.tool_messages.select_tool111213193321
40 graphite_editor.dispatcher1121
Uses a module listed above itPart of a loopThe module itself
1 core_types.poll2 graphene_hash3 graphite_editor.utility_traits4 core_types.types5 graphene_resource6 graphite_editor.messages.viewport.viewport_message_handler7 vector_types.vector.style8 core_types.list9 document_graph_storage.schema.ids10 graphene_application_io11 graphite_editor.messages.input_preprocessor.input_preprocessor_message_handler12 core_types.color.color_types13 document_graph_storage.schema.delta14 document_graph_storage.schema.model15 graph_craft.document16 vector_types.vector.misc17 wgpu_executor18 graphite_editor.messages.portfolio.document.overlays.utility_types_native19 graphite_editor.messages.portfolio.document.utility_types.network_interface.types20 vector_types.vector.vector_types21 graphite_editor.messages.portfolio.document.utility_types.network_interface.template22 vector_types.vector.vector_attributes23 graphite_editor.messages.portfolio.document.utility_types.network_interface24 vector_types.vector.path25 document_format26 graphite_editor.messages.portfolio.document.utility_types.document_metadata27 graphite_editor.messages.tool.common_functionality.edit_target28 graphite_editor.messages.tool.utility_types29 graphite_editor.messages.tool.common_functionality.snap_session30 graphite_editor.messages.tool.tool_messages.path_tool31 graphite_editor.messages.tool.tool_messages.shape_tool32 graphite_editor.messages.tool.common_functionality.shape_editor33 graphite_editor.messages.tool.common_functionality.shapes.arc_shape34 graphite_editor.messages.layout.utility_types.layout_widget35 graphite_editor.messages.portfolio.document.document_message_handler36 graphite_editor.messages.portfolio.document.utility_types.misc37 graphite_editor.messages.frontend.utility_types38 graphite_editor.messages.portfolio.portfolio_message_handler39 graphite_editor.messages.tool.tool_messages.select_tool40 graphite_editor.dispatchercore_types.poll1graphene_hash2graphite_editor.utility_traits3core_types.types4graphene_resource5graphite_editor.messages.viewport.viewport_message_handler6vector_types.vector.style7core_types.list8document_graph_storage.schema.ids9graphene_application_io10graphite_editor.messages.input_preprocessor.input_preprocessor_message_handler11core_types.color.color_types12document_graph_storage.schema.delta13document_graph_storage.schema.model14graph_craft.document15vector_types.vector.misc16wgpu_executor17graphite_editor.messages.portfolio.document.overlays.utility_types_native18graphite_editor.messages.portfolio.document.utility_types.network_interface.types19vector_types.vector.vector_types20graphite_editor.messages.portfolio.document.utility_types.network_interface.template21vector_types.vector.vector_attributes22graphite_editor.messages.portfolio.document.utility_types.network_interface23vector_types.vector.path24document_format25graphite_editor.messages.portfolio.document.utility_types.document_metadata26graphite_editor.messages.tool.common_functionality.edit_target27graphite_editor.messages.tool.utility_types28graphite_editor.messages.tool.common_functionality.snap_session29graphite_editor.messages.tool.tool_messages.path_tool30graphite_editor.messages.tool.tool_messages.shape_tool31graphite_editor.messages.tool.common_functionality.shape_editor32graphite_editor.messages.tool.common_functionality.shapes.arc_shape33graphite_editor.messages.layout.utility_types.layout_widget34graphite_editor.messages.portfolio.document.document_message_handler35graphite_editor.messages.portfolio.document.utility_types.misc36graphite_editor.messages.frontend.utility_types37graphite_editor.messages.portfolio.portfolio_message_handler38graphite_editor.messages.tool.tool_messages.select_tool39graphite_editor.dispatcher40121115111111111362413241311111251125351222621231326125454211222111111111113111112132113624192922114111013221452522111111112411112111211321131411126121111111112121112131933211121+683 more modules (most-connected shown)

At a glance — Code Health · 40% · Weak · gated by D2, R7, X4 ·

At a glance — Architecture · 95% · Exemplary ·

At a glance — Maturity · 77% · Strong ·

At a glance — Readiness · 48% · Weak · gated by R4 ·

At a glance — Security · 68% · Adequate · gated by D29 ·

At a glance — Event-Driven · 80% · Strong ·

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

At a glance — Accessibility · 29% · Weak · gated by AC1, AC2, AC3, AC4, AC6 ·

At a glance — Performance · 94% · Exemplary ·

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 — Injection70High / Critical
A03:2025 — Software Supply Chain Failures41High / Critical
A01:2025 — Broken Access Control1Medium

Roadmap

Top priorities: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh; Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+4.9 ptsMediumKeyboard semantics
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+3.9 ptsMediumPage structure
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+3.1 ptsMediumText alternatives
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.+3.0 ptsMediumVisual & motion safety
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+3.0 ptsMediumForms & labels
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.+2.9 ptsMediumDead Code
Add tests that import the unreached modules (directly or through their public entry).+2.3 ptsMediumTest Coverage
Interpolated log message defeats structured logging+1.4 ptsMediumStructured logging

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.9SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.9SlopDependency Vulnerabilities: High CVE: REDACTED
editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs1.0SlopChange Coupling: Boundary-crossing change coupling: document_node_definitions.rs ↔ text.rs
editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs2.3SlopChange Coupling: Boundary-crossing change coupling: data_panel_message_handler.rs ↔ lib.rs
editor/src/node_graph_executor.rs2.4SlopChange Coupling: Boundary-crossing change coupling: node_graph_executor.rs ↔ lib.rs
editor/src/node_graph_executor/runtime.rs2.6SlopChange Coupling: Boundary-crossing change coupling: runtime.rs ↔ artboard.rs
desktop/src/app.rs2.8SlopChange Coupling: Boundary-crossing change coupling: app.rs ↔ app_window_message_handler.rs
REDACTED4.9MixedData Compliance (PII/GDPR): Medium: REDACTED
desktop/wrapper/src/handle_desktop_wrapper_message.rs5.0MixedChange Coupling: Boundary-crossing change coupling: handle_desktop_wrapper_message.rs ↔ editor_wrapper.rs
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
editor/src/messages/color_picker/color_picker_message_handler.rs5.5MixedCyclomatic Complexity: ColorPickerMessageHandler::process_message (cyclomatic 39)
editor/src/messages/layout/layout_message_handler.rs5.5MixedCyclomatic Complexity: LayoutMessageHandler::handle_widget_callback (cyclomatic 80)
node-graph/libraries/vector-types/src/vector/vector_types.rs5.5MixedCognitive Complexity: Vector::concat (cognitive 27)
document/graph-storage/src/session.rs5.6MixedCyclomatic Complexity: Session::follow (cyclomatic 20)
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.7MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): Medium: REDACTED

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

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

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

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

Could not be resolved — 13

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 72 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 — 72 dimensions across the health lenses
D1D2D3D4D5D6D7D12D13D14D15D16D17D19D20D24D26D28D29D30D32D34D35D36D43D44AC1AC2AC3AC4AC5AC6AX10AX3AX4AX8AX9ED4ES1ES2M1M2M3M4P1P10P2P3P4P6PF1PF3R1R10R2R3R4R5R6R7R8R9X1X14X15X2X21X28X29X30X4X5

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, 2149 of 2200 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 01a1d8bb-38ae-7cf4-ac9e-88858de2b23b.

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: the Rust half could not be measured — the Cargo suite in repository root did not build, so it was never run. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, 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 (.rs) and this repository declares a Cargo test suite (repository root, 245 test files), but it was not re-run: its build outgrew the 12 GB scratch ceiling (12.161 GB measured) and was stopped; its suite was not run. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • 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 crate 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.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — 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's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in 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: 66 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).
  • 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 Rust, Svelte components 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 Rust, Svelte components 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.
  • P5 DR & Backup — 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. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • 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. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 69 further occurrence(s) are not listed individually; the score already reflects all 109.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 67 further occurrence(s) are not listed individually; the score already reflects all 107.
  • 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.
  • X17 Uncapped recursion over a caller-supplied document — 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.
  • X3 Exception handling — 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 — 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. 47 further occurrence(s) are not listed individually; the score already reflects all 87.

Repo exclusion declarations: 2 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 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.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D32 Data Compliance (PII/GDPR): PII/GDPR signals are heuristic pattern matches in code — they flag likely handling concerns, not legal compliance, and cannot trace where data actually flows at runtime.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • 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 Complexity4.5 / 10Weak✓ Tool-verified

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

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

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

223 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NodeGraphMessageHandler::process_message at 442. A further 36 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 graphite_desktop_wrapper::utils::menu::convert_labeled_keys_to_shortcut at 113 — they are counted neither in the figure above nor in this dimension's score. 15 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: desktop/wrapper/src/utils.rs (graphite_desktop_wrapper::utils::menu::convert_labeled_keys_to_shortcut at 113), frontend/wrapper/src/helpers.rs (graphite_wasm_wrapper::helpers::translate_key at 105), desktop/ui/src/internal/display_handler.rs (DisplayHandlerImpl::on_cursor_change at 54), tools/node-docs/src/utility.rs (node_docs::utility::category_description at 33), desktop/wrapper/src/intercept_frontend_message.rs (graphite_desktop_wrapper::intercept_frontend_message::intercept_frontend_message at 32), and 10 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

graphite_editor::messages::portfolio::document_migration::migrate_node (cyclomatic 258) · ×24editor/src/messages/portfolio/document_migration.rs:1908
vector_nodes::vector_nodes::morph (cyclomatic 79) · ×11node-graph/nodes/vector/src/vector_nodes.rs:2842
vector_types::vector::flatten::chain_order (cyclomatic 41) · ×10node-graph/libraries/vector-types/src/vector/flatten.rs:313
NodeNetworkInterface::mirror (cyclomatic 34) · ×8editor/src/messages/portfolio/document/utility_types/network_interface/apply.rs:17
ShapeState::convert_selected_manipulators_to_colinear_handles (cyclomatic 28) · ×8editor/src/messages/tool/common_functionality/shape_editor.rs:1122

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

What to do

  1. Bring the 4 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with NodeGraphMessageHandler::process_message (cyclomatic 442), DocumentMessageHandler::process_message (cyclomatic 312), PathToolFsmState::transition (cyclomatic 273). — 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 4.5 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

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

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

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

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

375 method(s) exceeded the cognitive complexity threshold of 15; the worst was NodeGraphMessageHandler::process_message at 762.

graphite_editor::messages::portfolio::document_migration::migrate_node (cognitive 382) · ×43editor/src/messages/portfolio/document_migration.rs:1908
NodeNetworkInterface::load_stack_dependents_for_nodes (cognitive 68) · ×27editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:122
vector_nodes::vector_nodes::morph (cognitive 121) · ×20node-graph/nodes/vector/src/vector_nodes.rs:2842
vector_types::vector::flatten::chain_order (cognitive 85) · ×19node-graph/libraries/vector-types/src/vector/flatten.rs:313
ShapeState::convert_selected_manipulators_to_colinear_handles (cognitive 86) · ×14editor/src/messages/tool/common_functionality/shape_editor.rs:1122

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

What to do

  1. Bring the 7 bodies over 240 down to 240 or less in Cognitive Complexity — start with NodeGraphMessageHandler::process_message (cognitive 762), PathToolFsmState::transition (cognitive 608), DocumentMessageHandler::process_message (cognitive 401). — 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 7 together lifts Cognitive Complexity from 2.0 to about 3.3/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

D3 · God Classes7.7 / 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 7.7 / 10 · rule-coverage 100% · ceiling Prevented

204 god class(es) detected.

FileTooLong: document/document_message_handler.rs · ×65editor/src/messages/portfolio/document/document_message_handler.rs
MethodTooLong: NodeGraphMessageHandler.process_message · ×44editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:144
FunctionTooLong: graphite_editor::messages::portfolio::document_migration::migrate_node · ×44editor/src/messages/portfolio/document_migration.rs:1908
TooManyMethods: NodeNetworkInterface · ×24editor/src/messages/portfolio/document/utility_types/network_interface.rs:75
ClassTooLong: DocumentMessageHandler · ×23editor/src/messages/portfolio/document/document_message_handler.rs:92

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

What to do

  1. Resolve the 65 FileTooLong finding(s) in God Classes — start with lib.rs (2), graphic.rs (2), document_message_handler.rs. — One of this dimension's main actionable groups (65 warning-level).
  2. Resolve the 44 MethodTooLong finding(s) in God Classes — start with path_tool.rs (3), node_graph_message_handler.rs (2), gradient_tool.rs (2). — One of this dimension's main actionable groups (44 warning-level).
  3. Resolve the 44 FunctionTooLong finding(s) in God Classes — start with node_inspector.rs (5), document_migration.rs (3), codegen.rs (2). — One of this dimension's main actionable groups (44 warning-level).

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

D4 · Code Duplication8.4 / 10Strong✓ 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 8.4 / 10 · rule-coverage 100% · ceiling Verified

273 duplicated block group(s) detected. 4.0 % of the production lines (9,908 of 247,954) are in a reported copy. A further 186 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (8 lines × 2) · ×31document/graph-storage/src/schema/value.rs:122
Duplicated block (6 lines × 2) · ×30desktop/ui/src/internal/browser_process_app.rs:78
Duplicated block (5 lines × 2) · ×28editor/src/messages/portfolio/document/document_message_handler.rs:3215
Duplicated block (7 lines × 2) · ×19editor/src/messages/portfolio/document/overlays/utility_types_web.rs:501
Duplicated block (10 lines × 2) · ×18editor/src/messages/layout/utility_types/layout_widget.rs:291

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

What to do

  1. Resolve the 31 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with clipboard_message_handler.rs (2), node_inspector.rs (2), renderer.rs (2). — One of this dimension's main actionable groups (31 warning-level).
  2. Resolve the 30 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with document_migration.rs (4), utility_types_native.rs (3), node_inspector.rs (2). — One of this dimension's main actionable groups (30 warning-level).
  3. Resolve the 28 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with utility_types_native.rs (4), node_graph_message_handler.rs (3), document_migration.rs (3). — One of this dimension's main actionable groups (28 warning-level).

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

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

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

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

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

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

75 production modules (Cargo+npm), 0 dependency cycle(s), 6 unstable depended-on module(s). Read from the build's own module declarations; 10 module(s) off the main sequence, with abstractness counted on 57 of the 75 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: control-protocol · ×10
Unstable project document-live
Unstable project graphic-nodes
Unstable project graphite-editor
Unstable project math-nodes

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

What to do

  1. Resolve the 10 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 1 Unstable project document-live finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Unstable project graphic-nodes 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.

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

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

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

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

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

5 of 452 classes have LCOM4 above 3.

Low cohesion: Session (LCOM4 5) · ×5document/graph-storage/src/session.rs:16

What to do

  1. Resolve the 5 Low cohesion finding(s) in Cohesion (LCOM4) — start with session.rs, document_metadata.rs, editor_wrapper.rs. — One of this dimension's main actionable groups (5 warning-level).

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

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

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

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

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

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

Detailed fixes: d7_recommendation.md.

D12 · Dependency Hygiene9.1 8.9 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

18 outdated, 0 yanked direct Cargo dependencies. 119 of 121 direct crates were graded against crates.io (0 not published there, 2 not resolved by a committed REDACTED). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: cef · ×18

Detailed fixes: d12_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 759 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 5 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under MIT OR Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate 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 Hotspots7.2 / 10Strong✓ 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 7.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: editor/src/messages/portfolio/document/document_message_handler.rs (72×312=22464); editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs (39×442=17238); editor/src/messages/portfolio/document_migration.rs (56×258=14448)

Hotspot: editor/src/messages/portfolio/document/document_message_handler.rs · ×80editor/src/messages/portfolio/document/document_message_handler.rs:259

What to do

  1. Resolve the 80 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (4), document_message_handler.rs, node_graph_message_handler.rs. — One of this dimension's main actionable groups (80 warning-level).

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

D16 · Bus Factor8.4 / 10Strong✓ Tool-verified

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

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

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

85 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is libraries/math-parser/src/lib.rs. Counted over 556 of the 870 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt9.7 / 10Stronggated by 331 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×328tools/node-docs/src/main.rs:17
HackComment · ×2node-graph/interpreted-executor/src/dynamic_executor.rs:151
TodoComment repeated across 26 filesnode-graph/nodes/text/src/font.rs:67

What to do

  1. Resolve the 328 TodoComment finding(s) in Explicit Debt — start with graphic.rs (14), adjustments.rs (14), renderer.rs (12). — One of this dimension's main actionable groups (328 warning-level).
  2. Resolve the 2 HackComment finding(s) in Explicit Debt — start with dynamic_executor.rs, input_mappings.rs. — One of this dimension's main actionable groups (2 warning-level).
  3. Resolve the 1 TodoComment repeated across 26 files finding(s) in Explicit Debt — start with font.rs. — One of this dimension's main actionable groups (1 warning-level).

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

D19 · Documentation Quality5.0 / 10Adequate✓ Tool-verified

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

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

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

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

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

What to do

  1. Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D20 · ADR Quality10.0 / 10Exemplary○ Nothing flagged

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 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 of 4 evaluated ADRs have a defect readable from the log itself (a missing or empty section, no title, a single option, consequences with no cost, no status, a missing enforcement field, a status the log contradicts, a dangling link, an unlinked second decision on one question, a date that is no calendar day). How well each record argues its case is not measured.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D24 · Comment Value9.8 9.8 / 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.8 / 10 · rule-coverage 100% · ceiling Documented

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

redundant commentwebsite/static/js/page/contributor-guide/bisect-tool.js:575

✓ On the Gold path — maintain.

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

D26 · Project Cohesion9.5 / 10Exemplary✓ 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 9.5 / 10 · rule-coverage 100% · ceiling Documented

2 of 75 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

✓ On the Gold path — maintain.

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.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)0.1 / 10Critical✓ Tool-verified

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

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

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

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

75 finding(s): 0 critical, 8 high, 67 medium, 0 low. semgrep hit a parse error in 23 file(s) — `document/container/src/archive.rs` (lines 51–53), `editor/src/messages/portfolio/document/utility_types/network_interface/characterization_tests.rs` (line 2606), `editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs` (line 1090, line 1118, line 1131), `editor/src/messages/portfolio/fonts/fonts_message_handler.rs` (line 48), `editor/src/messages/tool/tool_messages/select_tool.rs` (line 192, line 213, lines 225–241, …), … (+18 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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

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

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

34 finding(s): 0 critical, 12 high, 18 medium, 1 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

D32 · Data Compliance (PII/GDPR)9.0 / 10Stronggated by 1 serious finding✓ Tool-verified

What it measures: Likely personal-data (PII / GDPR) handling concerns — logging or storing data without safeguards.

Method: Heuristic PII/GDPR LEAK scan via semgrep across the repo, using our own ruleset: personal data crossing a boundary it should not — reaching a log/console sink, a URL or query string, or unprotected browser storage. Matches map to severity and a 0-10 wide normalizer. A clean sweep is unscored rather than an unearned 10, and is a statement about the leak paths checked only — this dimension does not inventory the personal data a repository holds (the personal-data map and the C1-C5 compliance cards do that), so it never reports that a repository has no personal-data surface. Reported LOUDLY as a measurement gap if the ruleset is missing from the analyzer image. Exhaustive over the leak paths, advisory-leaning; degrades on parse failure.

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

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

REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Data Compliance (PII/GDPR) — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness9.7 / 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 9.7 / 10 · rule-coverage 100% · ceiling Documented

17 of 556 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is libraries/rawkit/src/tiff/types.rs. Counted over 556 of the 870 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×17libraries/rawkit/src/tiff/types.rs:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

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

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

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

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

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

Strongest change-coupling: app.rs↔handle_desktop_wrapper_message.rs 100%; frontend_message.rs↔node-graph.ts 91%; app.rs↔app_window_message_handler.rs 90%

Boundary-crossing change coupling: app.rs ↔ app_window_message_handler.rs · ×19desktop/src/app.rs:1
Change coupling: app.rs ↔ handle_desktop_wrapper_message.rs · ×20desktop/src/app.rs:1
Change-coupling hub: document_message_handler.rs → export_dialog_message_handler.rs, new_document_dialog_message_handler.rs, node-graph.ts · ×4editor/src/messages/portfolio/document/document_message_handler.rs

What to do

  1. Resolve the 19 Boundary-crossing change coupling finding(s) in Change Coupling — start with document_node_definitions.rs (5), handle_desktop_wrapper_message.rs (3), data_panel_message_handler.rs (2). — One of this dimension's main actionable groups (19 issue-level).
  2. Resolve the 20 Change coupling finding(s) in Change Coupling — start with app.rs (2), frontend_message.rs (2), adjustments.rs (2). — One of this dimension's main actionable groups (20 warning-level).
  3. Resolve the 4 Change-coupling hub finding(s) in Change Coupling — start with document_message_handler.rs, graphic.rs, vector_nodes.rs. — One of this dimension's main actionable groups (4 warning-level).

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

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives3.0 / 10Weak✓ Tool-verified

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

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

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

  • A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. (×3) — frontend/src/components/floating-menus/EyedropperPreview.svelte:60, frontend/src/components/panels/Document.svelte:731, frontend/src/components/views/ThumbnailImage.svelte:14

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels3.2 / 10Weak✓ Tool-verified

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

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

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

  • 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). (×21) — frontend/src/components/panels/History.svelte:85, frontend/src/components/panels/Layers.svelte:1208, frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:65, …
  • 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. (×2) — frontend/src/components/panels/Layers.svelte:1241, frontend/src/components/panels/Layers.svelte:1415
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×5) — frontend/src/components/views/Graph.svelte:603, frontend/src/components/views/Graph.svelte:671, frontend/src/components/views/Graph.svelte:889, …
  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×2) — frontend/src/components/widgets/NodeSection.svelte:128, frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:75
  • This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. — frontend/src/components/widgets/buttons/ImageButton.svelte:25

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 structure2.2 / 10Critical✓ 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.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). — frontend/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — frontend/index.html:2
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — frontend/index.html:11

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.4 / 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".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×4) — frontend/src/components/layout/LayoutCol.svelte:32, frontend/src/components/layout/LayoutRow.svelte:33, frontend/src/components/widgets/buttons/ImageButton.svelte:25, …
  • This <p> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. (×2) — frontend/src/components/views/Graph.svelte:614, frontend/src/components/views/Graph.svelte:683
  • This <svg> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — frontend/src/components/widgets/inputs/SliderInput.svelte:0
  • This <div> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. (×2) — frontend/src/components/widgets/inputs/SliderInput.svelte:712, frontend/src/components/widgets/inputs/SliderInput.svelte:724
  • This <div> binds pointerdown, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click. — frontend/src/components/widgets/inputs/TransferCurveInput.svelte:303

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 safety3.2 / 10Weak✓ 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.

  • `body::after` moves (`animation: spinning-loading-indicator 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/index.html:48
  • `.donation-picker .picker-body .amount-entry input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — website/sass/page/donate.scss:395
  • `.carousel.carousel .screenshot-details .carousel-controls button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — website/sass/component/carousel.scss:83
  • `:where(:focus-visible)` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/Editor.svelte:302
  • `.panel .tab-bar .tab-group .tab .name input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/window/Panel.svelte:595
  • `.field-input input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/widgets/inputs/FieldInput.svelte:241
  • `.math-expression-input .editor` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1168
  • `.working-colors-button .swatch > button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/widgets/inputs/WorkingColorsInput.svelte:84
  • `.graph .name-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — frontend/src/components/views/Graph.svelte:1194
  • `.three-column-layout .chapters .wrapper-outer` moves (`transition: left 0.25s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/template/book.scss:117
  • `.three-column-layout .chapters` moves (`transition: height 0.25s ease-in-out 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/template/book.scss:93
  • `.membership-panel .notices:has(.notice.passing:not([hidden]))` moves (`animation: passing-notices-leave 0.4s ease-in 5s forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/page/membership.scss:89
  • `.carousel.carousel:not(.dragging, .jostling) .carousel-slide :is(img, video)` moves (`transition: transform 500ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/carousel.scss:37
  • `.name-fade.fade > .credits-name` moves (`animation: credits-name-fade calc(1.5s * (var(--name-color-count, 2) - 1)) ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:95
  • `.name-fade.flow > .credits-name` moves (`animation: credits-name-flow calc(2s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:102
  • `.name-fade.shimmer > .credits-name` moves (`animation: credits-name-shimmer 3s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:110
  • `.name-fade.rise > .credits-name` moves (`animation: credits-name-rise calc(2s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:117
  • `.name-fade.wipe > .credits-name` moves (`animation: credits-name-wipe calc(2.8s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:124
  • `.name-fade.stripes > .credits-name` moves (`animation: credits-name-stripes calc(1.5s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:131
  • `.name-fade.glow > .credits-name::before` moves (`animation: credits-name-glow 2.4s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/credits-names.scss:165
  • `.image-comparison .slide-bar .arrows svg:nth-of-type(1)` moves (`animation: 3s infinite ease-out pulse-left, 3s infinite ease-out pulse-opacity`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/image-comparison.scss:79
  • `.image-comparison .slide-bar .arrows svg:nth-of-type(2)` moves (`animation: 3s infinite ease-out pulse-right, 3s infinite ease-out pulse-opacity`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — website/sass/component/image-comparison.scss:84
  • `.panel .docking-ghost` moves (`transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/src/components/window/Panel.svelte:707
  • `.graph .redirect-dot .dot` moves (`transition: transform 0.1s, background-color 0.1s, outline-color 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/src/components/views/Graph.svelte:1714
  • `.graph .connector path` moves (`transition: fill 0.1s, transform 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — frontend/src/components/views/Graph.svelte:1787

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.7 / 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.

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

  • `document_storage_io$module.load_legacy_document` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command. — editor/src/messages/portfolio/document_storage_io.rs:385

What to do

  • Keep query handlers read-only — move the writes/event-publishes into a command handler so reads stay safe to retry, cache, and route to a read replica.
ED4 · Outbox / dual-write8.0 / 10Strong✓ Tool-verified

Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.

Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.

  • `spawn$module.handle_message` performs two independent DURABLE writes — a durable state write (`died_reported.store`, :346) and an independent publish to an event bus (`events.send`, :347) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox). — desktop/ui/src/remote/spawn.rs:340

What to do

  • Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
ES1 · Fold determinism10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether the recovery-replay fold is deterministic — state derived purely from each event's own fields, no clock/random/IO on the replay path.

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.

ES2 · Immutable events10.0 / 10Exemplary✓ Tool-verified

Other · Event Sourcing — Whether domain events stay immutable (private fields, set once) rather than carrying mutable state.

Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.

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

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation6.0 / 10Adequate✓ 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 C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.

What to do

  • Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

P10 · Library API & versioning10.0 / 10Exemplary✓ Tool-verified

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.

  • 1 public type in `graphene_canvas_utils.wasm` is marked as implementation by its own namespace, folder or name: `CanvasImpl` (node-graph/libraries/canvas-utils/src/wasm.rs:166, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — node-graph/libraries/canvas-utils/src/wasm.rs:166
  • 2 public types in `core_types.context` are marked as implementation by their own namespace, folder or name: `OwnedContextImpl` (node-graph/libraries/core-types/src/context.rs:587, name ends in `Impl`), `ContextImpl` (node-graph/libraries/core-types/src/context.rs:829, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — node-graph/libraries/core-types/src/context.rs:587

What to do

  • Hide `graphene_canvas_utils.wasm` (`CanvasImpl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `core_types.context` (`OwnedContextImpl`, `ContextImpl`) (Rust: `pub(crate)`, or keep the module private): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability6.5 / 10Adequate✓ Tool-verified

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

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

  • Only 24/29 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `desktop/bundle`, `desktop/platform/linux`, `desktop/platform/mac`, `desktop/platform/win`, `document/migrations/snapshot`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling5.0 / 10Adequate✓ 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.

  • `frontend/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — frontend/package.json:13

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
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.
PF1 · Benchmark discipline9.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ 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.

R1 · Type Safety10.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 Duplication8.1 / 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.

  • frontend/src/stores/app-window.ts:26 · frontend/src/stores/document.ts:38 — the two spans are one implementation copied and then locally edited — 276 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/stores/app-window.ts:26
  • frontend/src/components/widgets/inputs/TextAreaInput.svelte:4 · frontend/src/components/widgets/inputs/TextInput.svelte:4 — the two spans are one implementation copied and then locally edited — 147 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/components/widgets/inputs/TextAreaInput.svelte:4
  • frontend/src/utility-functions/clipboard.ts:1 · frontend/src/utility-functions/clipboard.ts:52 — the two spans are one implementation copied and then locally edited — 176 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/utility-functions/clipboard.ts:1
  • frontend/src/components/layout/LayoutCol.svelte:4 · frontend/src/components/layout/LayoutRow.svelte:4 — 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. — frontend/src/components/layout/LayoutCol.svelte:4
  • frontend/src/components/widgets/WidgetSpan.svelte:269 · frontend/src/components/widgets/WidgetSpan.svelte:287 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — frontend/src/components/widgets/WidgetSpan.svelte:269
  • frontend/src/components/panels/Inspector.svelte:26 · frontend/src/components/panels/Inspector.svelte:38 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/components/panels/Inspector.svelte:26
  • frontend/src/components/panels/Inspector.svelte:81 · frontend/src/components/panels/Layers.svelte:745 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/components/panels/Inspector.svelte:81
  • frontend/src/components/widgets/inputs/ScrollbarInput.svelte:193 · frontend/src/components/widgets/inputs/TransferCurveInput.svelte:268 — 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. — frontend/src/components/widgets/inputs/ScrollbarInput.svelte:193
  • frontend/src/components/widgets/inputs/SliderInput.svelte:585 · frontend/src/components/widgets/inputs/TransferCurveInput.svelte:250 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/components/widgets/inputs/SliderInput.svelte:585
  • frontend/vite.config.ts:40 · frontend/vite.config.ts:60 — 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. — frontend/vite.config.ts:40
  • frontend/src/components/panels/Layers.svelte:175 · frontend/src/components/panels/Layers.svelte:193 · frontend/src/components/widgets/inputs/NumberInput.svelte:150 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — frontend/src/components/panels/Layers.svelte:175
  • frontend/src/components/widgets/inputs/CheckboxInput.svelte:6 · frontend/src/components/widgets/inputs/TextInput.svelte:4 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/components/widgets/inputs/CheckboxInput.svelte:6
  • frontend/src/components/widgets/inputs/DropdownInput.svelte:144 · frontend/src/utility-functions/input.ts:297 — the two spans are one implementation copied and then locally edited — 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — frontend/src/components/widgets/inputs/DropdownInput.svelte:144
  • frontend/src/components/widgets/inputs/SliderInput.svelte:623 · frontend/src/components/widgets/inputs/SliderInput.svelte:633 · frontend/src/components/widgets/inputs/VisualColorPickersInput.svelte:146 — 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. — frontend/src/components/widgets/inputs/SliderInput.svelte:623
  • frontend/src/components/panels/Document.svelte:420 · frontend/src/components/panels/Document.svelte:556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/components/panels/Document.svelte:420
  • frontend/src/components/widgets/buttons/ImageButton.svelte:5 · frontend/src/components/widgets/labels/ImageLabel.svelte:4 — 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. — frontend/src/components/widgets/buttons/ImageButton.svelte:5
  • frontend/src/components/window/Panel.svelte:378 · frontend/src/components/window/Panel.svelte:386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — frontend/src/components/window/Panel.svelte:378
  • frontend/src/stores/app-window.ts:26 · frontend/src/stores/document.ts:38 · frontend/src/stores/fullscreen.ts:19 · frontend/src/stores/tooltip.ts:43 — the 4 copies are spread across 4 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. — frontend/src/stores/app-window.ts:26
  • frontend/src/utility-functions/persistence.ts:48 · frontend/src/utility-functions/persistence.ts:115 — 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. — frontend/src/utility-functions/persistence.ts:48
  • frontend/src/components/layout/FloatingMenu.svelte:91 · frontend/src/components/layout/LayoutCol.svelte:17 · frontend/src/components/layout/LayoutRow.svelte:18 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — frontend/src/components/layout/FloatingMenu.svelte:91
  • frontend/src/components/widgets/buttons/TextButton.svelte:30 · frontend/src/components/widgets/inputs/ColorInput.svelte:21 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited. — frontend/src/components/widgets/buttons/TextButton.svelte:30
  • frontend/src/managers/drag-toggle.ts:23 · frontend/src/managers/drag-toggle.ts:37 — 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. — frontend/src/managers/drag-toggle.ts:23
  • frontend/src/stores/color-picker.ts:25 · frontend/src/stores/fullscreen.ts:12 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/stores/color-picker.ts:25
  • frontend/src/utility-functions/rasterization.ts:4 · frontend/src/utility-functions/rasterization.ts:65 — 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. — frontend/src/utility-functions/rasterization.ts:4
  • frontend/src/components/layout/FloatingMenu.svelte:29 · frontend/src/components/layout/LayoutCol.svelte:4 · frontend/src/components/layout/LayoutRow.svelte:4 · frontend/src/components/widgets/inputs/FieldInput.svelte:14 · +1 more site(s) not listed — the 5 copies are spread across 5 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/components/layout/FloatingMenu.svelte:29
  • frontend/src/stores/app-window.ts:20 · frontend/src/stores/color-picker.ts:26 · frontend/src/stores/dialog.ts:28 · frontend/src/stores/document.ts:28 · +2 more site(s) not listed — the 6 copies are spread across 6 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — frontend/src/stores/app-window.ts:20

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.1 / 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.

  • positionAndStyleFloatingMenu has cyclomatic complexity 58 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/layout/FloatingMenu.svelte:213
  • handleKey has cyclomatic complexity 42 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. — frontend/src/components/floating-menus/MenuList.svelte:490
  • onKeyDown has cyclomatic complexity 37 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:910
  • shouldRedirectKeyboardEventToBackend has cyclomatic complexity 33 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/input.ts:29
  • render has cyclomatic complexity 32 and cognitive complexity 54; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:145
  • onBeforeInput has cyclomatic complexity 30 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:828
  • parseMarkdown has cyclomatic complexity 21 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. — REDACTED:10
  • stepThroughBrackets has cyclomatic complexity 21 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:535
  • dragPointerUp 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. — frontend/src/components/window/Panel.svelte:215
  • getLocalizedScanCode has cyclomatic complexity 20 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. — frontend/src/utility-functions/keyboard-entry.ts:41
  • dragPointerMove has cyclomatic complexity 20 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. — frontend/src/components/window/Panel.svelte:139
  • pointerOver has cyclomatic complexity 19 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/floating-menus/MenuList.svelte:329
  • readAtCaret has cyclomatic complexity 18 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. — frontend/src/utility-functions/clipboard.ts:1
  • tabBetweenTextFields has cyclomatic complexity 17 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/input.ts:395
  • onPotentialDoubleClick has cyclomatic complexity 17 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. — frontend/src/utility-functions/input.ts:188
  • keyboardHintIcon has cyclomatic complexity 17 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/labels/ShortcutLabel.svelte:59
  • resizePanel has cyclomatic complexity 16 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/window/PanelSubdivision.svelte:47
  • updateConstant has cyclomatic complexity 16 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:346
  • draggingPointerMove has cyclomatic complexity 15 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. — frontend/src/components/panels/Layers.svelte:898
  • onPointerDown has cyclomatic complexity 15 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/input.ts:139
  • chainDraggingPointerUp has cyclomatic complexity 15 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/panels/Layers.svelte:855
  • (anonymous) has cyclomatic complexity 14 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/panels/Layers.svelte:617
  • moveActiveMidpoint has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/SliderInput.svelte:495
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/persistence.ts:174
  • (anonymous) has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/labels/ShortcutLabel.svelte:37
  • watchOpen has cyclomatic complexity 14 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/floating-menus/MenuList.svelte:113
  • insertAtCaret has cyclomatic complexity 13 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/clipboard.ts:52
  • browserVersion has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/platform.ts:1
  • onPointerMove has cyclomatic complexity 13 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/managers/drag-toggle.ts:84
  • chainDraggingPointerMove has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/panels/Layers.svelte:748
  • typeIntoSearch has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/floating-menus/MenuList.svelte:596
  • detectDockingEdge has cyclomatic complexity 12 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/window/Panel.svelte:290
  • clippingHover has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/panels/Layers.svelte:455
  • updateExact has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/NumberInput.svelte:237
  • hoverTransfer has cyclomatic complexity 11 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/layout/FloatingMenu.svelte:405
  • updateEyedropperSamplingState has cyclomatic complexity 11 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/panels/Document.svelte:231
  • updateValue has cyclomatic complexity 11 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 is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/NumberInput.svelte:212
  • (anonymous) has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/floating-menus/NodeCatalog.svelte:44
  • adjustConstant has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:418
  • onKeyDown has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — frontend/src/utility-functions/input.ts:74
R3 · Large Files5.7 / 10Adequate✓ Tool-verified

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

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

  • frontend/src/components/views/Graph.svelte has 1722 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/views/Graph.svelte:1
  • frontend/src/components/panels/Layers.svelte has 1717 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/panels/Layers.svelte:1
  • frontend/src/components/widgets/inputs/NumberInput.svelte has 1143 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/widgets/inputs/NumberInput.svelte:1
  • frontend/src/components/widgets/inputs/MathExpressionInput.svelte has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1
  • frontend/src/icons.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/icons.ts:1
  • frontend/src/components/panels/Document.svelte has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/panels/Document.svelte:1
  • frontend/src/components/widgets/inputs/SliderInput.svelte has 858 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/widgets/inputs/SliderInput.svelte:1
  • frontend/src/components/floating-menus/MenuList.svelte has 764 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/floating-menus/MenuList.svelte:1
  • frontend/src/utility-functions/keyboard-entry.ts has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/utility-functions/keyboard-entry.ts:1
  • frontend/src/components/layout/FloatingMenu.svelte has 662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/layout/FloatingMenu.svelte:1
  • frontend/src/components/window/Panel.svelte has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/window/Panel.svelte:1
  • frontend/src/components/widgets/NodeSection.svelte has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — frontend/src/components/widgets/NodeSection.svelte:1

What to do

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

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

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

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×40) — frontend/src/components/panels/Layers.svelte:1, frontend/src/icons.ts:1, frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.7 / 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 · Tooling10.0 / 10Exemplary✓ Tool-verified

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

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

R7 · Dead Code0.0 / 10Critical✓ Tool-verified

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

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

  • Unreachable from the 6 application, 7 tooling and 2 test entry point(s) detected in this repo. Gate removals on `npm run check` — an undetected custom entry would make these reachable.
  • no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×39) — frontend/src/components/panels/Layers.svelte, frontend/src/icons.ts, frontend/src/components/widgets/inputs/MathExpressionInput.svelte, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Strong✓ 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.

  • Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

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.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

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

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

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

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

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

  • Only 0/3 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `fetchJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — website/static/js/page/contributor-guide/bisect-tool.js:13
  • `loadDemoArtwork` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — frontend/src/utility-functions/network.ts:50
  • `initWasm` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — frontend/src/utility-functions/wasm-loader.ts:6

What to do

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

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

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

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

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

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

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

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

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

X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

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

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

X4 · Structured logging3.4 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `debug!` at line 32 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/delegate.rs:32
  • `error!` at line 13 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/dirs.rs:13
  • `error!` at line 41 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/dirs.rs:41
  • `error!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — desktop/ui/src/ipc.rs:73, desktop/ui/src/remote/host.rs:73
  • `error!` at line 29 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. (×2) — desktop/ui/src/remote.rs:29, desktop/ui/src/internal/resource_request_handler.rs:29
  • `error!` at line 38 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/resources.rs:38
  • `warn!` at line 105 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/host.rs:105
  • `debug!` at line 41 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:41
  • `error!` at line 105 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:105
  • `error!` at line 122 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:122
  • `error!` at line 148 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:148
  • `info!` at line 206 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:206
  • `debug!` at line 279 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:279
  • `error!` at line 299 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:299
  • `error!` at line 345 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/remote/spawn.rs:345
  • `error!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/platform/mac.rs:61
  • `error!` at line 117 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/display_handler.rs:117
  • `warn!` at line 118 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/display_handler.rs:118
  • `info!` at line 119 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/display_handler.rs:119
  • `debug!` at line 120 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/display_handler.rs:120
  • `trace!` at line 121 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/display_handler.rs:121
  • `error!` at line 32 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/life_span_handler.rs:32
  • `error!` at line 78 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/render_process_handler.rs:78
  • `error!` at line 54 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/render_process_v8_handler.rs:54
  • `warn!` at line 31 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/request_handler.rs:31
  • `error!` at line 64 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/internal/request_handler.rs:64
  • `error!` at line 31 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/plane.rs:31
  • `error!` at line 53 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/receive.rs:53
  • `error!` at line 57 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/receive.rs:57
  • `error!` at line 120 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/receive.rs:120
  • `debug!` at line 31 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/sink.rs:31
  • `debug!` at line 40 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/sink.rs:40
  • `warn!` at line 123 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/streamer.rs:123
  • `debug!` at line 127 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/streamer.rs:127
  • `debug!` at line 140 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/streamer.rs:140
  • `debug!` at line 151 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/streamer.rs:151
  • `error!` at line 85 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/surface.rs:85
  • `warn!` at line 57 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`. — desktop/ui/src/frames/plane/linux.rs:57

What to do

  • Interpolated log message defeats structured logging
X5 · Nullable reference types10.0 / 10Exemplary○ Nothing flagged

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.

WCAG coverage — what static analysis assessed

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

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

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

Reference — by lens

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

LensScoreRatingImpact
Code Health40%Weak — gated by D2, R7, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95%ExemplarySolid.
Maturity77%StrongSolid.
Readiness48%Weak — gated by R4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security68%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven80%StrongSolid.
Event Sourcing100%ExemplaryStrongest area.
Accessibility29%Weak — gated by AC1, AC2, AC3, AC4, AC6Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance94%ExemplarySolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.

  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 55 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; 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: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. 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 — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • 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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~17599 lines of test source are present (.rs) 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 .rs suite was found but not re-run
  • 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 sibling role token rows: 1 candidate(s) found and not reported.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • 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 — None of 0 binding record(s) states a rule in checkable form (a backticked element with a prohibition, or an `adr-rules` block), so conformance cannot be read from the code. Write the rule as an `adr-rules` block (`forbid:` a symbol, a package or a dependency) to make it checkable.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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.
  • 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.
  • D8 Code Coverage — Coverage not measured — Rust suite
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 156 value object(s); 4 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • 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 — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Rust 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
  • 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.
  • S1 Web-Security Posture — No web surface: 817 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — X12 reached only 10% of this repository's production lines — rust (242,630 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
  • X16 Unfloored truncation loop — X16 reached only 10% of this repository's production lines — rust (242,630 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 — X17 reached only 10% of this repository's production lines — rust (242,630 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 10% of this repository's production lines — rust (242,630 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. Rust's compiler refuses the unsynchronised version: a collection shared between a callback's thread and the waiting body must be `Sync`, which a `Vec`, `VecDeque` or `HashMap` is only behind a `Mutex`/`RwLock`, so the race this check looks for cannot be written in safe Rust. 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
  • X3 Exception handling — X3 reached only 10% of this repository's production lines — rust (242,630 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.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 84 finding(s)
AC2 · Forms & labels · <button> with no accessible text · ×21
  • <button> with no accessible text frontend/src/components/panels/History.svelte:85 — 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 frontend/src/components/panels/Layers.svelte:1208 — 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 frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:65 — 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 frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:69 — 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 frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:71 — 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 frontend/src/components/widgets/inputs/NumberInput.svelte:1007 — 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 frontend/src/components/widgets/inputs/NumberInput.svelte:1014 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:27 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:28 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:29 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:30 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:31 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:32 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:33 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:34 — 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 frontend/src/components/widgets/inputs/ReferencePointInput.svelte:35 — 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 frontend/src/components/widgets/inputs/ScrollbarInput.svelte:210 — 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 frontend/src/components/widgets/inputs/ScrollbarInput.svelte:214 — 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 frontend/src/components/widgets/inputs/WorkingColorsInput.svelte:39 — 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 frontend/src/components/widgets/inputs/WorkingColorsInput.svelte:52 — 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 frontend/src/components/window/Panel.svelte:460 — 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).
D35 · Change Coupling · Boundary-crossing change coupling · ×19
  • Boundary-crossing change coupling: app.rs ↔ app_window_message_handler.rs desktop/src/app.rs:1 — `desktop/src/app.rs` (context desktop) and `editor/src/messages/app_window/app_window_message_handler.rs` (context editor) sit in DIFFERENT parts of the tree yet change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `63725ea6` Desktop: Make input routing aware of floating menus (#4498); `d97fe835` Desktop: Focus app window when loading a document (#4124); `95d35562` Replace globals with editor environment (#3656) — run `git show` on any of them.
  • Boundary-crossing change coupling: intercept_frontend_message.rs ↔ app_window_message_handler.rs desktop/wrapper/src/intercept_frontend_message.rs:1 — `desktop/wrapper/src/intercept_frontend_message.rs` (context desktop) and `editor/src/messages/app_window/app_window_message_handler.rs` (context editor) sit in DIFFERENT parts of the tree yet change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `63725ea6` Desktop: Make input routing aware of floating menus (#4498); `d97fe835` Desktop: Focus app window when loading a document (#4124); `07fbcd48` Desktop: Add fullscreen window mode (#3625) — run `git show` on any of them.
  • Boundary-crossing change coupling: handle_desktop_wrapper_message.rs ↔ editor_wrapper.rs desktop/wrapper/src/handle_desktop_wrapper_message.rs:1 — `desktop/wrapper/src/handle_desktop_wrapper_message.rs` (context desktop) and `frontend/wrapper/src/editor_wrapper.rs` (context wrapper) sit in DIFFERENT parts of the tree yet change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `78679a5b` Implement editor level future message handler (#4182); `b100892b` Add support for persistent storage of panel layouts, sizes, and activ…; `2be7790d` Improve UX of importing vs. opening files (#3661) (at that commit the file was still `frontend/wasm/src/editor_api.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: data_panel_message_handler.rs ↔ lib.rs editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:1 — `editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs` (context editor) and `node-graph/libraries/graphic-types/src/lib.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `daa8b6a5` Delete the vestigial region domain, reverting to naive logic for mesh…; `4b01abe3` Add a "Cyclic" gradient option that closes the ramp into a seamless l…; `fd01d660` Add a gradient interpolation space attribute with sRGB Gamma (existin… — run `git show` on any of them.
  • Boundary-crossing change coupling: app_window_message_handler.rs ↔ editor_wrapper.rs editor/src/messages/app_window/app_window_message_handler.rs:1 — `editor/src/messages/app_window/app_window_message_handler.rs` (context editor) and `frontend/wrapper/src/editor_wrapper.rs` (context wrapper) sit in DIFFERENT parts of the tree yet change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `95d35562` Replace globals with editor environment (#3656) (at that commit the file was still `frontend/wasm/src/editor_api.rs`); `07fbcd48` Desktop: Add fullscreen window mode (#3625) (at that commit the file was still `frontend/wasm/src/editor_api.rs`); `73682b48` Desktop: Implement pointer lock for NumberInput (#3638) (at that commit the file was still `frontend/wasm/src/editor_api.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: document_node_definitions.rs ↔ text.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1 — `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` (context editor) and `node-graph/nodes/gstd/src/text.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `c91d0cd5` Update all node parameters with appropriate attributes of #[unit(...)…; `f05a644b` Revamp the syntax to #[hard(a..b)] and #[soft(a..b)] bounds on node d…; `3b55064f` Add tooltip documentation to the Text node and tidy up node catalog c… — run `git show` on any of them.
  • Boundary-crossing change coupling: document_node_definitions.rs ↔ repeat_nodes.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1 — `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` (context editor) and `node-graph/nodes/repeat/src/repeat_nodes.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `8ef7432e` Rework 'Split Vec2' and 'Split Channels' as multi-output nodes and me…; `c91d0cd5` Update all node parameters with appropriate attributes of #[unit(...)…; `0eab6aa9` Rename the nodes 'Length' -> 'Magnitude', 'Flatten Path' -> 'Combine … — run `git show` on any of them.
  • Boundary-crossing change coupling: data_panel_message_handler.rs ↔ vector_modification_nodes.rs editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:1 — `editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs` (context editor) and `node-graph/nodes/vector/src/vector_modification_nodes.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `f28eab08` Inspect nodes without recompiling the graph (#4803); `180b78ce` Improve performance of vector data operations (#4781); `0847d7b0` Centralize attribute strings in consts and rename "editor:layer" to "… — run `git show` on any of them.
  • Boundary-crossing change coupling: node_graph_executor.rs ↔ lib.rs editor/src/node_graph_executor.rs:1 — `editor/src/node_graph_executor.rs` (context editor) and `node-graph/interpreted-executor/src/lib.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `6c158c68` Warn user when the tile cache invariant is violated (#4815); `180b78ce` Improve performance of vector data operations (#4781); `d9cbf975` Deprecate automatic composition (#3088) — run `git show` on any of them.
  • Boundary-crossing change coupling: document_node_definitions.rs ↔ lib.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1 — `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` (context editor) and `node-graph/interpreted-executor/src/lib.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `21e5e06b` Clean up document message wrappers around proto nodes so they're now …; `d9cbf975` Deprecate automatic composition (#3088); `69ed80b7` Add `::IDENTITY` to node macro to return a `ProtoNodeIdentifier` that… — run `git show` on any of them.
  • Boundary-crossing change coupling: runtime.rs ↔ artboard.rs editor/src/node_graph_executor/runtime.rs:1 — `editor/src/node_graph_executor/runtime.rs` (context editor) and `node-graph/libraries/graphic-types/src/artboard.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `7e6e4276` Render thumbnails with Vello (#4805); `69585b25` Rename the Graphic enum wrapper variants with a "List" suffix (#4434); `a0d5f418` Replace Table<Table<Graphic>> with Table<Artboard> where Artboard is … — run `git show` on any of them.
  • Boundary-crossing change coupling: portfolio_message.rs ↔ editor_wrapper.rs editor/src/messages/portfolio/portfolio_message.rs:1 — `editor/src/messages/portfolio/portfolio_message.rs` (context editor) and `frontend/wrapper/src/editor_wrapper.rs` (context wrapper) sit in DIFFERENT parts of the tree yet change together 53% of the time (29 of the 55 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 29 shared commits counted here, the most recent 3 are `8a38af5b` Rework clipboard handling to carry embedded resources across document…; `83d03ad6` Fix panel docking bugs and polish its behavior (#4087); `d44b0cd3` Make documents fall back to "Untitled Document" (+ number suffix) if … — run `git show` on any of them.
  • Boundary-crossing change coupling: document_node_definitions.rs ↔ lib.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1 — `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` (context editor) and `node-graph/libraries/raster-types/src/lib.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 51% of the time (25 of the 49 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `a182a734` Extract `gbrush` (#2784) (at that commit the file was still `node-graph/gcore/src/raster.rs`); `a8e209e4` Remove the old node macro and fix/clean up several raster nodes (#2650) (at that commit the file was still `node-graph/gcore/src/raster.rs`); `a696aae0` Instance tables refactor part 5: unwrap GraphicGroup as multi-row Ins… (at that commit the file was still `node-graph/gcore/src/raster.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: node_graph_message.rs ↔ editor_wrapper.rs editor/src/messages/portfolio/document/node_graph/node_graph_message.rs:1 — `editor/src/messages/portfolio/document/node_graph/node_graph_message.rs` (context editor) and `frontend/wrapper/src/editor_wrapper.rs` (context wrapper) sit in DIFFERENT parts of the tree yet change together 51% of the time (27 of the 53 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 27 shared commits counted here, the most recent 3 are `1648e33c` Implement dragging to reorder Properties panel node sections (#4299); `8a38af5b` Rework clipboard handling to carry embedded resources across document…; `6b11b477` Improve the Data panel with type-specific detail pages and nested-lay… — run `git show` on any of them.
  • Boundary-crossing change coupling: document_node_definitions.rs ↔ transform_nodes.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1 — `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` (context editor) and `node-graph/nodes/transform/src/transform_nodes.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `bfd85cab` Replace 'Copy to Points' and 'Assign Colors' with a family of 'Vary' …; `c91d0cd5` Update all node parameters with appropriate attributes of #[unit(...)…; `21e5e06b` Clean up document message wrappers around proto nodes so they're now … — run `git show` on any of them.
  • Boundary-crossing change coupling: misc.rs ↔ editor_wrapper.rs editor/src/messages/input_mapper/utility_types/misc.rs:1 — `editor/src/messages/input_mapper/utility_types/misc.rs` (context editor) and `frontend/wrapper/src/editor_wrapper.rs` (context wrapper) sit in DIFFERENT parts of the tree yet change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `07fbcd48` Desktop: Add fullscreen window mode (#3625) (at that commit the file was still `frontend/wasm/src/editor_api.rs`); `2ee8e56c` Fix sending platform-specific shortcut keys to frontend before editor… (at that commit the file was still `frontend/wasm/src/editor_api.rs`); `f2994970` Add shaking input gesture to disconnect a node being dragged (#2889) (at that commit the file was still `frontend/wasm/src/editor_api.rs`) — run `git show` on any of them.
  • Boundary-crossing change coupling: handle_desktop_wrapper_message.rs ↔ dispatcher.rs desktop/wrapper/src/handle_desktop_wrapper_message.rs:1 — `desktop/wrapper/src/handle_desktop_wrapper_message.rs` (context desktop) and `editor/src/dispatcher.rs` (context editor) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `78679a5b` Implement editor level future message handler (#4182); `b100892b` Add support for persistent storage of panel layouts, sizes, and activ…; `2be7790d` Improve UX of importing vs. opening files (#3661) — run `git show` on any of them.
  • Boundary-crossing change coupling: handle_desktop_wrapper_message.rs ↔ app_window_message_handler.rs desktop/wrapper/src/handle_desktop_wrapper_message.rs:1 — `desktop/wrapper/src/handle_desktop_wrapper_message.rs` (context desktop) and `editor/src/messages/app_window/app_window_message_handler.rs` (context editor) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `95d35562` Replace globals with editor environment (#3656); `73682b48` Desktop: Implement pointer lock for NumberInput (#3638); `bb4516e3` Desktop: Add app menu for Mac (#3428) — run `git show` on any of them.
  • Boundary-crossing change coupling: runtime.rs ↔ test.rs editor/src/node_graph_executor/runtime.rs:1 — `editor/src/node_graph_executor/runtime.rs` (context editor) and `node-graph/interpreted-executor/src/dynamic_executor/test.rs` (context node-graph) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `a43a630a` Fix the Data panel showing another node's output for some layers and …; `c914d7be` Improve NodeError infrastructure (#4836); `a566448a` Edit the inspected node's context in the Data panel (#4804) — run `git show` on any of them.
D30 · Dependency Vulnerabilities · High CVE · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×7
  • <input> without a programmatic label frontend/src/components/panels/Layers.svelte:1241 — 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 frontend/src/components/panels/Layers.svelte:1415 — 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 frontend/src/components/views/Graph.svelte:603 — 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 frontend/src/components/views/Graph.svelte:671 — 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 frontend/src/components/views/Graph.svelte:889 — 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 frontend/src/components/widgets/inputs/NumberInput.svelte:1023 — 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 frontend/src/components/window/Panel.svelte:436 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×3
  • Click handler on a non-interactive <div> frontend/src/components/layout/LayoutCol.svelte:32 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> frontend/src/components/layout/LayoutRow.svelte:33 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:75 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <div> · ×3
  • Double-click handler on a non-interactive <div> frontend/src/components/widgets/inputs/SliderInput.svelte:712 — This <div> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
  • Double-click handler on a non-interactive <div> frontend/src/components/widgets/inputs/SliderInput.svelte:724 — This <div> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
  • Double-click handler on a non-interactive <div> frontend/src/components/widgets/inputs/TransferCurveInput.svelte:303 — This <div> binds pointerdown, pointermove and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×2
  • Custom control with no accessible name on <div> frontend/src/components/widgets/NodeSection.svelte:128 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> frontend/src/components/widgets/inputs/ColorPresetsInput.svelte:75 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <p> · ×2
  • Double-click handler on a non-interactive <p> frontend/src/components/views/Graph.svelte:614 — This <p> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
  • Double-click handler on a non-interactive <p> frontend/src/components/views/Graph.svelte:683 — This <p> binds double-click and nothing else. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <img> · ×1
  • Custom control with no accessible name on <img> frontend/src/components/widgets/buttons/ImageButton.svelte:25 — This <img> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC3 · Page structure · <html> without a lang · ×1
  • <html> without a lang frontend/index.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom frontend/index.html:11 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
AC4 · Keyboard semantics · Click handler on a non-interactive <img> · ×1
  • Click handler on a non-interactive <img> frontend/src/components/widgets/buttons/ImageButton.svelte:25 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
AC4 · Keyboard semantics · Double-click handler on a non-interactive <svg> · ×1
  • Double-click handler on a non-interactive <svg> frontend/src/components/widgets/inputs/SliderInput.svelte — This <svg> binds pointerdown and double-click — pointer gestures with no keyboard form, a double-click among them. No click, no key handler, and no tabindex="0", so it cannot even take focus. Nothing synthesises a double-click from the keyboard: Enter and Space fire a single click, and only on a native <button> or <a href>. So this behaviour has no keyboard path at all. Expose the same action on a real control, or add role + tabindex="0" + a key handler alongside the double-click.
AX9 · CQS / query purity · Query writes persistent state on the read path · ×1
  • Query writes persistent state on the read path: document_storage_io$module.load_legacy_document editor/src/messages/portfolio/document_storage_io.rs:385 — `document_storage_io$module.load_legacy_document` is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
ED4 · Outbox / dual-write · Dual write (no outbox) · ×1
  • Dual write (no outbox): spawn$module.handle_message desktop/ui/src/remote/spawn.rs:340 — `spawn$module.handle_message` performs two independent DURABLE writes — a durable state write (`died_reported.store`, :346) and an independent publish to an event bus (`events.send`, :347) — in one command path with no shared transaction or outbox. A crash between the two leaves the stores diverged (one write committed, the other lost) or emits a phantom record. Wrap both in one transaction, or record the second write in the same store and dispatch it afterwards (a transactional outbox).
Serious — 1995 finding(s)
D17 · Explicit Debt · TodoComment · ×328
  • TodoComment tools/node-docs/src/main.rs:17 — // TODO: Also obtain document nodes, not only proto nodes — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment tools/cargo-run/internal/download/src/main.rs:79 — // TODO: support other compression/archive formats — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/vector/src/vector_nodes.rs:1993 — // TODO: Make this node support stroke align, which it currently ignores — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/vector/src/vector_nodes.rs:2582 — // TODO: apply transform to points instead of modifying the paths — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/vector/src/vector_nodes.rs:3866 — // TODO: Return i64 instead of f64 once automatic type conversion is implemented for nodes with generic type inputs, so an integer output doesn't wall this count off from the generic math nodes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/text/src/lib.rs:909 — // TODO: Return i64 instead of f64 once automatic type conversion is implemented for nodes with generic type inputs, so an integer output doesn't wall this count off from the generic math nodes. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/vector/src/vector_nodes.rs:3867 — // TODO: (Currently automatic type conversion only works for concrete types, via the Graphene preprocessor and not the full Graphene type system.) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/text/src/lib.rs:910 — // TODO: (Currently automatic type conversion only works for concrete types, via the Graphene preprocessor and not the full Graphene type system.) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/graphic/src/graphic.rs:245 — // TODO: (Currently automatic type conversion only works for concrete types, via the Graphene preprocessor and not the full Graphene type system.) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/gcore/src/context.rs:77 — // TODO: (Currently automatic type conversion only works for concrete types, via the Graphene preprocessor and not the full Graphene type system.) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/transform/src/transform_nodes.rs:34 — // TODO: Replace this pair of shear angles with a single `f64` skew angle — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/text/src/path_builder.rs:142 — // TODO: This can be cached for better performance — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/text/src/path_builder.rs:180 — // TODO: Remove this hack and move the attribute up to the parent return value when <https://github.com/GraphiteEditor/Graphite/issues/3779> is done.
  • TodoComment node-graph/nodes/repeat/src/repeat_nodes.rs:77 — // TODO: When using a custom Inspector layout in document_node_definitions.rs and this default is set, the widget weirdly doesn't show up in the Inspector. Investigation is needed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:265 — // TODO: A Lab-only mode once Graphite supports the CIE Lab color space. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:972 — // TODO: Residuals in 8-bit PSD interop: the byte-hue colorize table, the colorize lightness slider (up to 2.5 levels), and the range edges (a few tenths of a degree) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1395 — // TODO: Full PSD interop needs a compatibility variant of `GradientInterpolation` with its own midpoint semantics, position warp, — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1396 — // TODO: and smoothing (a `gradient_smoothness` attribute), plus noise gradients, which we don't yet support. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1397 — // TODO: Its axes differ from ours: its midpoint is always a knee in the position warp and its smoothness blends the curve over — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1398 — // TODO: that fixed warp, while each variant here picks warp and curve together, so neither end of the blend is Linear or Smooth. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1399 — // TODO: Per channel in the gradient space (measured on gamma RGB): — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1400 — // TODO: - Position t maps to a parameter p by a piecewise-linear knee through (stop position, index) and (midpoint, index - 0.5). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1401 — // TODO: - Linear lerps the interval's stop colors by the fraction of p. Smooth is a cubic Hermite over the stop index with tangent — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1402 — // TODO: `(c[i + 1] - c[i - 1]) / 2`, the end stops repeated past the ends, so two stops give `0.5 p + 1.5 p^2 - p^3`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment node-graph/nodes/raster/src/adjustments.rs:1403 — // TODO: - The ramp is `(1 - s) * linear + s * smooth` for smoothness s, clamped per interval to its two stop colors. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 303 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×80
  • Hotspot: editor/src/messages/portfolio/document/document_message_handler.rs editor/src/messages/portfolio/document/document_message_handler.rs:259 — editor/src/messages/portfolio/document/document_message_handler.rs changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 312 in DocumentMessageHandler::process_message at line 259. 10 of those changes were fix/bug commits, and the other 62 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/document_message_handler.rs`: 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: editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:144 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 442 in NodeGraphMessageHandler::process_message at line 144. 7 of those changes were fix/bug commits, and the other 32 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs`: 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: editor/src/messages/portfolio/document_migration.rs editor/src/messages/portfolio/document_migration.rs:1908 — editor/src/messages/portfolio/document_migration.rs changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 258 in graphite_editor::messages::portfolio::document_migration::migrate_node at line 1908. 4 of those changes were fix/bug commits, and the other 52 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document_migration.rs`: 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: editor/src/messages/tool/tool_messages/path_tool.rs editor/src/messages/tool/tool_messages/path_tool.rs:1576 — editor/src/messages/tool/tool_messages/path_tool.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 273 in PathToolFsmState::transition at line 1576. 4 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/tool_messages/path_tool.rs`: 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: editor/src/messages/portfolio/portfolio_message_handler.rs editor/src/messages/portfolio/portfolio_message_handler.rs:79 — editor/src/messages/portfolio/portfolio_message_handler.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 171 in PortfolioMessageHandler::process_message at line 79. 2 of those changes were fix/bug commits, and the other 33 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/portfolio_message_handler.rs`: 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: node-graph/nodes/vector/src/vector_nodes.rs node-graph/nodes/vector/src/vector_nodes.rs:2842 — node-graph/nodes/vector/src/vector_nodes.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 118 in vector_nodes::vector_nodes::morph at line 2842. 4 of those changes were fix/bug commits, and the other 41 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- node-graph/nodes/vector/src/vector_nodes.rs`: 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: editor/src/messages/portfolio/document/node_graph/node_inspector.rs editor/src/messages/portfolio/document/node_graph/node_inspector.rs:286 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type at line 286. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/node_graph/node_inspector.rs`: 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: editor/src/messages/tool/tool_messages/select_tool.rs editor/src/messages/tool/tool_messages/select_tool.rs:901 — editor/src/messages/tool/tool_messages/select_tool.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 189 in SelectToolFsmState::transition at line 901. 3 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/tool_messages/select_tool.rs`: 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: editor/src/messages/tool/tool_messages/pen_tool.rs editor/src/messages/tool/tool_messages/pen_tool.rs:1602 — editor/src/messages/tool/tool_messages/pen_tool.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 134 in PenToolFsmState::transition at line 1602. 5 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/tool_messages/pen_tool.rs`: 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: editor/src/messages/tool/tool_messages/gradient_tool.rs editor/src/messages/tool/tool_messages/gradient_tool.rs:926 — editor/src/messages/tool/tool_messages/gradient_tool.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 136 in GradientToolFsmState::transition at line 926. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/tool_messages/gradient_tool.rs`: 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: libraries/math-parser/src/constants.rs libraries/math-parser/src/constants.rs:465 — libraries/math-parser/src/constants.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 151 in math_parser::constants::builtin_function at line 465. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- libraries/math-parser/src/constants.rs`: 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: node-graph/node-macro/src/codegen.rs node-graph/node-macro/src/codegen.rs:12 — node-graph/node-macro/src/codegen.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in node_macro::codegen::generate_node_code at line 12. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- node-graph/node-macro/src/codegen.rs`: 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: node-graph/libraries/rendering/src/renderer.rs node-graph/libraries/rendering/src/renderer.rs:1716 — node-graph/libraries/rendering/src/renderer.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in rendering::renderer::render_vector_item_to_vello at line 1716. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- node-graph/libraries/rendering/src/renderer.rs`: 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: editor/src/messages/tool/tool_messages/shape_tool.rs editor/src/messages/tool/tool_messages/shape_tool.rs:874 — editor/src/messages/tool/tool_messages/shape_tool.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 103 in ShapeToolFsmState::transition at line 874. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/tool_messages/shape_tool.rs`: 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: editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:112 — editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 100 in TransformLayerMessageHandler::process_message at line 112. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs`: 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: editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:854 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector at line 854. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs`: 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: editor/src/node_graph_executor.rs editor/src/node_graph_executor.rs:452 — editor/src/node_graph_executor.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in NodeGraphExecutor::poll_node_graph_evaluation at line 452. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/node_graph_executor.rs`: 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: editor/src/messages/clipboard/clipboard_message_handler.rs editor/src/messages/clipboard/clipboard_message_handler.rs:57 — editor/src/messages/clipboard/clipboard_message_handler.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 93 in ClipboardMessageHandler::process_message at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/clipboard/clipboard_message_handler.rs`: 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: editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:34 — editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in GraphOperationMessageHandler::process_message at line 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs`: 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: desktop/src/app.rs desktop/src/app.rs:235 — desktop/src/app.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in App::handle_desktop_frontend_message at line 235. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- desktop/src/app.rs`: 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: editor/src/dispatcher.rs editor/src/dispatcher.rs:159 — editor/src/dispatcher.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Dispatcher::handle_message at line 159. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/dispatcher.rs`: 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: editor/src/messages/layout/layout_message_handler.rs editor/src/messages/layout/layout_message_handler.rs:205 — editor/src/messages/layout/layout_message_handler.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in LayoutMessageHandler::handle_widget_callback at line 205. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/layout/layout_message_handler.rs`: 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: libraries/math-parser/src/lexer.rs libraries/math-parser/src/lexer.rs:484 — libraries/math-parser/src/lexer.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in Lexer::next_token at line 484. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- libraries/math-parser/src/lexer.rs`: 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: node-graph/nodes/raster/src/adjustments.rs node-graph/nodes/raster/src/adjustments.rs:1816 — node-graph/nodes/raster/src/adjustments.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in raster_nodes::adjustments::selective_color at line 1816. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- node-graph/nodes/raster/src/adjustments.rs`: 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: editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:568 — editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in NodeNetworkInterface::set_input at line 568. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 18:14:45 -08:00' --until='2026-11-13 18:14:45 -08:00' --full-history --no-merges -- editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs`: 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.
  • + 55 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×65
  • FileTooLong: document/document_message_handler.rs editor/src/messages/portfolio/document/document_message_handler.rs — FileTooLong — 3027 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 90% of them inside a single declaration: DocumentMessageHandler (4 blocks, 92-4272). The bar is 500 significant lines; this is 2527 over it, 6.05× 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: node_graph/node_graph_message_handler.rs editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs — FileTooLong — 2759 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 97% of them inside a single declaration: NodeGraphMessageHandler (5 blocks, 58-4109). The bar is 500 significant lines; this is 2259 over it, 5.52× 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: portfolio/document_migration.rs editor/src/messages/portfolio/document_migration.rs — FileTooLong — 2748 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 2248 over it, 5.50× 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: node_graph/node_inspector.rs editor/src/messages/portfolio/document/node_graph/node_inspector.rs — FileTooLong — 2715 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 82 free functions. The bar is 500 significant lines; this is 2215 over it, 5.43× 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: tool_messages/path_tool.rs editor/src/messages/tool/tool_messages/path_tool.rs — FileTooLong — 2494 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1994 over it, 4.99× 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/vector_nodes.rs node-graph/nodes/vector/src/vector_nodes.rs — FileTooLong — 2418 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 68 free functions. The bar is 500 significant lines; this is 1918 over it, 4.84× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/renderer.rs node-graph/libraries/rendering/src/renderer.rs — FileTooLong — 2126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 67 free functions. The bar is 500 significant lines; this is 1626 over it, 4.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: src/adjustments.rs node-graph/nodes/raster/src/adjustments.rs — FileTooLong — 1912 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 36 free functions. The bar is 500 significant lines; this is 1412 over it, 3.82× 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: tool_messages/pen_tool.rs editor/src/messages/tool/tool_messages/pen_tool.rs — FileTooLong — 1619 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1119 over it, 3.24× 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: tool_messages/select_tool.rs editor/src/messages/tool/tool_messages/select_tool.rs — FileTooLong — 1552 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1052 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/lib.rs node-graph/nodes/math/src/lib.rs — FileTooLong — 1410 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 93 free functions. The bar is 500 significant lines; this is 910 over it, 2.82× 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: common_functionality/shape_editor.rs editor/src/messages/tool/common_functionality/shape_editor.rs — FileTooLong — 1373 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 82% of them inside a single declaration: ShapeState (2 blocks, 157-2336). The bar is 500 significant lines; this is 873 over it, 2.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: tool_messages/gradient_tool.rs editor/src/messages/tool/tool_messages/gradient_tool.rs — FileTooLong — 1354 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 854 over it, 2.71× 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/documentation.rs libraries/math-parser/src/documentation.rs — FileTooLong — 1277 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 777 over it, 2.55× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: node_graph/document_node_definitions.rs editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs — FileTooLong — 1200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 700 over it, 2.40× 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: algorithms/concave_hull.rs node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs — FileTooLong — 1172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 31 free functions. The bar is 500 significant lines; this is 672 over it, 2.34× 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: tool_messages/shape_tool.rs editor/src/messages/tool/tool_messages/shape_tool.rs — FileTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 596 over it, 2.19× 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: data_panel/data_panel_message_handler.rs editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs — FileTooLong — 1090 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 590 over it, 2.18× 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/gradient.rs node-graph/libraries/vector-types/src/gradient.rs — FileTooLong — 1086 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 586 over it, 2.17× 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/icons.ts frontend/src/icons.ts — FileTooLong — 1029 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 529 over it, 2.06× 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: component/credits-particles.js website/static/js/component/credits-particles.js — FileTooLong — 1023 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 523 over it, 2.05× 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/codegen.rs node-graph/node-macro/src/codegen.rs — FileTooLong — 998 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 498 over it, 2.00× 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: network_interface/layout.rs editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs — FileTooLong — 996 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 98% of them inside a single declaration: NodeNetworkInterface (8-1690). The bar is 500 significant lines; this is 496 over it, 1.99× 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: portfolio/portfolio_message_handler.rs editor/src/messages/portfolio/portfolio_message_handler.rs — FileTooLong — 991 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 94% of them inside a single declaration: PortfolioMessageHandler (3 blocks, 54-1461). The bar is 500 significant lines; this is 491 over it, 1.98× 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/list.rs node-graph/libraries/core-types/src/list.rs — FileTooLong — 895 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 395 over it, 1.79× 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.
  • + 40 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 19 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×44
  • MethodTooLong: NodeGraphMessageHandler.process_message editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:144 — MethodTooLong — process_message runs 1698 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1598 over it, 16.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DocumentMessageHandler.process_message editor/src/messages/portfolio/document/document_message_handler.rs:259 — MethodTooLong — process_message runs 1261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1161 over it, 12.61× 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: PathToolFsmState.transition editor/src/messages/tool/tool_messages/path_tool.rs:1576 — MethodTooLong — transition runs 1097 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 997 over it, 10.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PortfolioMessageHandler.process_message editor/src/messages/portfolio/portfolio_message_handler.rs:79 — MethodTooLong — process_message runs 740 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 640 over it, 7.40× 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: SelectToolFsmState.transition editor/src/messages/tool/tool_messages/select_tool.rs:901 — MethodTooLong — transition runs 739 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 639 over it, 7.39× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MenuBarMessageHandler.layout editor/src/messages/menu_bar/menu_bar_message_handler.rs:49 — MethodTooLong — layout runs 654 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 554 over it, 6.54× 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: PenToolFsmState.transition editor/src/messages/tool/tool_messages/pen_tool.rs:1602 — MethodTooLong — transition runs 529 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 429 over it, 5.29× 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: GradientToolFsmState.transition editor/src/messages/tool/tool_messages/gradient_tool.rs:926 — MethodTooLong — transition runs 494 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 394 over it, 4.94× 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: TransformLayerMessageHandler.process_message editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:112 — MethodTooLong — process_message runs 383 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 283 over it, 3.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GraphOperationMessageHandler.process_message editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:34 — MethodTooLong — process_message runs 346 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 246 over it, 3.46× 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: TextToolFsmState.transition editor/src/messages/tool/tool_messages/text_tool.rs:645 — MethodTooLong — transition runs 315 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 215 over it, 3.15× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ClipboardMessageHandler.process_message editor/src/messages/clipboard/clipboard_message_handler.rs:57 — MethodTooLong — process_message runs 308 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 208 over it, 3.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NavigationMessageHandler.process_message editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:41 — MethodTooLong — process_message runs 308 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 208 over it, 3.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: PreferencesDialogMessageHandler.layout editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:53 — MethodTooLong — layout runs 268 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 168 over it, 2.68× 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: LayoutMessageHandler.handle_widget_callback editor/src/messages/layout/layout_message_handler.rs:205 — MethodTooLong — handle_widget_callback runs 234 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 134 over it, 2.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ToolMessageHandler.handle_message editor/src/messages/tool/tool_message_handler.rs:44 — MethodTooLong — handle_message runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ArtboardToolFsmState.transition editor/src/messages/tool/tool_messages/artboard_tool.rs:323 — MethodTooLong — transition runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× 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: WorkspaceMessageHandler.process_message editor/src/messages/portfolio/workspace/workspace_message_handler.rs:21 — MethodTooLong — process_message runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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: Dispatcher.handle_message editor/src/dispatcher.rs:159 — MethodTooLong — handle_message runs 190 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 90 over it, 1.90× 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: ColorPickerMessageHandler.details_layout editor/src/messages/color_picker/color_picker_message_handler.rs:585 — MethodTooLong — details_layout runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SplineToolFsmState.transition editor/src/messages/tool/tool_messages/spline_tool.rs:330 — MethodTooLong — transition runs 173 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 73 over it, 1.73× 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: Replica.handle_packet document/peer-transport/src/replica.rs:595 — MethodTooLong — handle_packet runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: Preprocessor.new node-graph/preprocessor/src/lib.rs:185 — MethodTooLong — new runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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: ColorPickerMessageHandler.process_message editor/src/messages/color_picker/color_picker_message_handler.rs:73 — MethodTooLong — process_message runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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: PathToolData.mouse_down editor/src/messages/tool/tool_messages/path_tool.rs:756 — MethodTooLong — mouse_down runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× 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.
  • + 19 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×44
  • FunctionTooLong: graphite_editor::messages::portfolio::document_migration::migrate_node editor/src/messages/portfolio/document_migration.rs:1908 — FunctionTooLong — graphite_editor::messages::portfolio::document_migration::migrate_node runs 1046 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 946 over it, 10.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: node_macro::codegen::generate_node_code node-graph/node-macro/src/codegen.rs:12 — FunctionTooLong — node_macro::codegen::generate_node_code runs 745 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 645 over it, 7.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::document_node_definitions editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:153 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::document_node_definitions runs 505 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 405 over it, 5.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:854 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector runs 453 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 353 over it, 4.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document_migration::document_migration_upgrades editor/src/messages/portfolio/document_migration.rs:1208 — FunctionTooLong — graphite_editor::messages::portfolio::document_migration::document_migration_upgrades runs 446 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 346 over it, 4.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: interpreted_executor::node_registry::node_registry node-graph/interpreted-executor/src/node_registry.rs:35 — FunctionTooLong — interpreted_executor::node_registry::node_registry runs 427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 327 over it, 4.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: vector_nodes::vector_nodes::morph node-graph/nodes/vector/src/vector_nodes.rs:2842 — FunctionTooLong — vector_nodes::vector_nodes::morph runs 414 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 314 over it, 4.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::input_mapper::input_mappings::input_mappings editor/src/messages/input_mapper/input_mappings.rs:25 — FunctionTooLong — graphite_editor::messages::input_mapper::input_mappings::input_mappings runs 405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 305 over it, 4.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: bisect-tool.document.addEventListener("DOMContentLoaded") website/static/js/page/contributor-guide/bisect-tool.js:1 — FunctionTooLong — document.addEventListener("DOMContentLoaded") runs 384 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 284 over it, 3.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: math_parser::constants::builtin_function libraries/math-parser/src/constants.rs:465 — FunctionTooLong — math_parser::constants::builtin_function runs 319 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 219 over it, 3.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rendering::renderer::render_vector_item_to_vello node-graph/libraries/rendering/src/renderer.rs:1716 — FunctionTooLong — rendering::renderer::render_vector_item_to_vello runs 246 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: membership.window.addEventListener("DOMContentLoaded") REDACTED:185 — FunctionTooLong — window.addEventListener("DOMContentLoaded") runs 246 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 146 over it, 2.46× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::overlays::grid_overlays::overlay_options editor/src/messages/portfolio/document/overlays/grid_overlays.rs:199 — FunctionTooLong — graphite_editor::messages::portfolio::document::overlays::grid_overlays::overlay_options runs 191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path editor/src/messages/portfolio/document/utility_types/wires.rs:148 — FunctionTooLong — graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path runs 185 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 85 over it, 1.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: node_macro::parsing::parse_field node-graph/node-macro/src/parsing.rs:839 — FunctionTooLong — node_macro::parsing::parse_field runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3345 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector runs 169 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: node_macro::destructure::derive_destructure_impl node-graph/node-macro/src/destructure.rs:32 — FunctionTooLong — node_macro::destructure::derive_destructure_impl runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: vector_nodes::vector_nodes::bevel_algorithm node-graph/nodes/vector/src/vector_nodes.rs:3527 — FunctionTooLong — vector_nodes::vector_nodes::bevel_algorithm runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: math_parser::completion::completions libraries/math-parser/src/completion.rs:84 — FunctionTooLong — math_parser::completion::completions runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints editor/src/messages/tool/tool_messages/path_tool.rs:3550 — FunctionTooLong — graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rendering::renderer::render_vector_shape_svg node-graph/libraries/rendering/src/renderer.rs:1462 — FunctionTooLong — rendering::renderer::render_vector_shape_svg runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector editor/src/messages/portfolio/document/node_graph/node_inspector.rs:2090 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: vector_types::vector::algorithms::concave_hull::refine_cycle node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1390 — FunctionTooLong — vector_types::vector::algorithms::concave_hull::refine_cycle runs 135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 35 over it, 1.35× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1913 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type editor/src/messages/portfolio/document/node_graph/node_inspector.rs:286 — FunctionTooLong — graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) 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.
  • + 19 more in this group — see findings.md.
D2 · Cognitive Complexity · graphite_editor · ×43
  • graphite_editor::messages::portfolio::document_migration::migrate_node (cognitive 382) editor/src/messages/portfolio/document_migration.rs:1908 — graphite_editor::messages::portfolio::document_migration::migrate_node has cognitive complexity 382 (threshold 15). Drivers by points: if/else 136 (206 pts), boolean chains 76, match/switch 24 (54 pts), loops 25 (46 pts) (nesting depth added 121). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document_migration::document_migration_upgrades (cognitive 202) editor/src/messages/portfolio/document_migration.rs:1208 — graphite_editor::messages::portfolio::document_migration::document_migration_upgrades has cognitive complexity 202 (threshold 15). Drivers by points: if/else 62 (133 pts), loops 21 (35 pts), match/switch 9 (21 pts), boolean chains 13 (nesting depth added 97). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path (cognitive 121) editor/src/messages/portfolio/document/utility_types/wires.rs:148 — graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path has cognitive complexity 121 (threshold 15). Drivers by points: if/else 40 (90 pts), boolean chains 31 (nesting depth added 50). 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.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::path_marker_overlays (cognitive 87) editor/src/messages/portfolio/document/overlays/utility_functions.rs:333 — graphite_editor::messages::portfolio::document::overlays::utility_functions::path_marker_overlays has cognitive complexity 87 (threshold 15). Drivers by points: if/else 21 (55 pts), loops 7 (24 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints (cognitive 78) editor/src/messages/tool/tool_messages/path_tool.rs:3550 — graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints has cognitive complexity 78 (threshold 15). Drivers by points: if/else 29 (66 pts), boolean chains 7, match/switch 3 (5 pts) (nesting depth added 39). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::generate_node_inspector (cognitive 50) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3131 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::generate_node_inspector has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document_migration::modifications_following_turned_segments (cognitive 47) editor/src/messages/portfolio/document_migration.rs:3588 — graphite_editor::messages::portfolio::document_migration::modifications_following_turned_segments has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 9 (16 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::index_label_overlays (cognitive 42) editor/src/messages/portfolio/document/overlays/utility_functions.rs:489 — graphite_editor::messages::portfolio::document::overlays::utility_functions::index_label_overlays has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 8 (12 pts), match/switch 1 (2 pts), boolean chains 1 (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.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section (cognitive 40) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1913 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 5, loops 4 (5 pts), match/switch 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.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::path_overlays (cognitive 39) editor/src/messages/portfolio/document/overlays/utility_functions.rs:193 — graphite_editor::messages::portfolio::document::overlays::utility_functions::path_overlays has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 4 (10 pts), match/switch 1 (3 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_to_bezpath (cognitive 37) editor/src/messages/portfolio/document/utility_types/wires.rs:472 — graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_to_bezpath has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25 (33 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 10). 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.
  • graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector (cognitive 35) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:854 — graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (26 pts), boolean chains 9 (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.
  • graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points (cognitive 32) editor/src/messages/portfolio/document_migration.rs:4013 — graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 6 (9 pts), match/switch 5 (7 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document_migration::migrate_removed_catalog_definitions (cognitive 31) editor/src/messages/portfolio/document_migration.rs:3739 — graphite_editor::messages::portfolio::document_migration::migrate_removed_catalog_definitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (8 pts), boolean chains 7, match/switch 4 (6 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.
  • graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair (cognitive 31) editor/src/messages/tool/common_functionality/utility_functions.rs:511 — graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), loops 4 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). 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.
  • graphite_editor::messages::tool::tool_messages::shape_tool::sync_shape_options_from_selection (cognitive 31) editor/src/messages/tool/tool_messages/shape_tool.rs:317 — graphite_editor::messages::tool::tool_messages::shape_tool::sync_shape_options_from_selection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 8, match/switch 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.
  • graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion (cognitive 30) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:434 — graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 6 (9 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::tool::common_functionality::color_selector::sync_color_options (cognitive 30) editor/src/messages/tool/common_functionality/color_selector.rs:279 — graphite_editor::messages::tool::common_functionality::color_selector::sync_color_options has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (24 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector (cognitive 29) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3345 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 9 (14 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::tool::common_functionality::shapes::grid_shape::calculate_grid_params (cognitive 28) editor/src/messages/tool/common_functionality/shapes/grid_shape.rs:154 — graphite_editor::messages::tool::common_functionality::shapes::grid_shape::calculate_grid_params has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector (cognitive 27) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:2090 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 6 (7 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • graphite_editor::messages::portfolio::document::utility_types::network_interface::storage_metadata::apply_entries_into_tree (cognitive 26) editor/src/messages/portfolio/document/utility_types/network_interface/storage_metadata.rs:368 — graphite_editor::messages::portfolio::document::utility_types::network_interface::storage_metadata::apply_entries_into_tree has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::tool::tool_messages::gradient_tool::detect_hover_target (cognitive 26) editor/src/messages/tool/tool_messages/gradient_tool.rs:1846 — graphite_editor::messages::tool::tool_messages::gradient_tool::detect_hover_target has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type (cognitive 25) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:286 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 9, boolean chains 4 (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.
  • graphite_editor::messages::tool::common_functionality::utility_functions::transforming_transform_cage (cognitive 25) editor/src/messages/tool/common_functionality/utility_functions.rs:395 — graphite_editor::messages::tool::common_functionality::utility_functions::transforming_transform_cage has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 1 (nesting depth added 13). 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.
  • + 18 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file frontend/src/components/panels/Layers.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/icons.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/NumberInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/utility-functions/keyboard-entry.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/floating-menus/MenuList.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/SliderInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/panels/Document.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/layout/FloatingMenu.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/utility-functions/input.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/window/Panel.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/stores/node-graph.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/WidgetSpan.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/views/Graph.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/TransferCurveInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/utility-functions/persistence.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/utility-functions/colors.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/stores/portfolio.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/ScrollbarInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/panels/Inspector.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/RulerInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/VisualColorPickersInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/window/PanelSubdivision.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/components/widgets/inputs/DropdownInput.svelte:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file frontend/src/utility-functions/decimal.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×31
  • Duplicated block (8 lines × 2) document/graph-storage/src/schema/value.rs:122 — document/graph-storage/src/schema/value.rs:122-129 | document/migrations/formats/src/v4.rs:390-397 — before extracting anything, compare `document/graph-storage/src/schema/value.rs` and `document/migrations/formats/src/v4.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) editor/src/messages/clipboard/clipboard_message_handler.rs:469 — editor/src/messages/clipboard/clipboard_message_handler.rs:469-476 | editor/src/messages/tool/tool_messages/path_tool.rs:2899-2908 — before extracting anything, compare `editor/src/messages/clipboard/clipboard_message_handler.rs` and `editor/src/messages/tool/tool_messages/path_tool.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/clipboard/clipboard_message_handler.rs:469` 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 (8 lines × 2) editor/src/messages/color_picker/color_picker_message_handler.rs:82 — editor/src/messages/color_picker/color_picker_message_handler.rs:82-89 | editor/src/messages/color_picker/color_picker_message_handler.rs:92-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:85 — editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:85-92 | editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:74-81 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:85` 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 (8 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:677 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:677-684 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:804-811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:677` 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 (8 lines × 2) editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:344 — editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:344-351 | editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:378-385 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:344` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:109 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:109-116 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:127-134 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:64 — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:64-71 | editor/src/messages/tool/common_functionality/shapes/line_shape.rs:78-85 — 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 (8 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2789 — editor/src/messages/tool/tool_messages/path_tool.rs:2789-2796 | editor/src/messages/tool/tool_messages/path_tool.rs:2994-3001 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) libraries/rawkit/src/demosaicing/linear_demosaicing.rs:51 — libraries/rawkit/src/demosaicing/linear_demosaicing.rs:51-58 | libraries/rawkit/src/demosaicing/linear_demosaicing.rs:60-67 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) node-graph/libraries/core-types/src/list.rs:797 — node-graph/libraries/core-types/src/list.rs:797-804 | node-graph/libraries/core-types/src/list.rs:1327-1334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) node-graph/libraries/rendering/src/renderer.rs:831 — node-graph/libraries/rendering/src/renderer.rs:831-838 | node-graph/libraries/rendering/src/renderer.rs:1683-1690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/rendering/src/renderer.rs:831` 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 (8 lines × 2) node-graph/node-macro/src/codegen.rs:703 — node-graph/node-macro/src/codegen.rs:703-710 | node-graph/node-macro/src/codegen.rs:770-777 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) node-graph/nodes/gstd/src/platform_application_io.rs:111 — node-graph/nodes/gstd/src/platform_application_io.rs:111-118 | node-graph/nodes/gstd/src/platform_application_io.rs:154-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/gstd/src/platform_application_io.rs:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/nodes/gstd/src/platform_application_io.rs:152` calls `body_mut`, `Some`, `into` and `node-graph/nodes/gstd/src/platform_application_io.rs:109` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) node-graph/nodes/text/src/lib.rs:866 — node-graph/nodes/text/src/lib.rs:866-873 | node-graph/nodes/text/src/lib.rs:889-896 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/text/src/lib.rs:866` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) node-graph/nodes/vector/src/vector_nodes.rs:1819 — node-graph/nodes/vector/src/vector_nodes.rs:1819-1826 | node-graph/nodes/vector/src/vector_nodes.rs:2402-2409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/vector/src/vector_nodes.rs:1819` 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 (8 lines × 2) tools/cargo-run/src/main.rs:103 — tools/cargo-run/src/main.rs:103-110 | tools/cargo-run/src/main.rs:115-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tools/cargo-run/src/main.rs:103` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1732 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1732-1739 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1755-1762 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) editor/src/messages/portfolio/document/overlays/grid_overlays.rs:123 — editor/src/messages/portfolio/document/overlays/grid_overlays.rs:123-130 | editor/src/messages/portfolio/document/overlays/grid_overlays.rs:143-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) node-graph/libraries/rendering/src/renderer.rs:2021 — node-graph/libraries/rendering/src/renderer.rs:2021-2028 | node-graph/libraries/rendering/src/renderer.rs:2035-2042 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) node-graph/node-macro/src/codegen.rs:734 — node-graph/node-macro/src/codegen.rs:734-741 | node-graph/node-macro/src/codegen.rs:808-815 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/codegen.rs:734` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) editor/src/messages/portfolio/document/overlays/utility_functions.rs:92 — editor/src/messages/portfolio/document/overlays/utility_functions.rs:92-99 | editor/src/messages/portfolio/document/overlays/utility_functions.rs:144-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/overlays/utility_functions.rs:92` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) editor/src/messages/tool/tool_messages/select_tool.rs:586 — editor/src/messages/tool/tool_messages/select_tool.rs:586-593 | editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:761-768 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) document/container/src/backends/opfs.rs:224 — document/container/src/backends/opfs.rs:224-231 | node-graph/graph-craft/src/application_io/resource/opfs.rs:117-125 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:719 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:719-726 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:635-642 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×30
  • Duplicated block (6 lines × 2) desktop/ui/src/internal/browser_process_app.rs:78 — desktop/ui/src/internal/browser_process_app.rs:78-83 | desktop/ui/src/platform.rs:27-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:115 — editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:115-120 | editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:126-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:115` 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 (6 lines × 2) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1238 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1238-1243 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1253-1258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1238` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:598 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:598-603 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:619-624 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1079 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1079-1084 | editor/src/messages/tool/tool_messages/text_tool.rs:194-199 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1079` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:528 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:528-533 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:213-218 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document_migration.rs:3707 — editor/src/messages/portfolio/document_migration.rs:3707-3712 | editor/src/messages/portfolio/document_storage_io.rs:426-431 — 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 `editor/src/messages/portfolio/document_migration.rs:3707` 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:179 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:179-184 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:186-191 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/graph_modification_utils.rs:179` 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 (6 lines × 2) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:328 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:328-333 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:356-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:328` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) editor/src/messages/tool/tool_messages/gradient_tool.rs:1350 — editor/src/messages/tool/tool_messages/gradient_tool.rs:1350-1355 | editor/src/messages/tool/tool_messages/gradient_tool.rs:1850-1855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/gradient_tool.rs:1350` 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) editor/src/messages/tool/tool_messages/path_tool.rs:2810 — editor/src/messages/tool/tool_messages/path_tool.rs:2810-2815 | editor/src/messages/tool/tool_messages/path_tool.rs:3021-3026 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:2810` 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) editor/src/messages/tool/tool_messages/pen_tool.rs:1429 — editor/src/messages/tool/tool_messages/pen_tool.rs:1429-1434 | editor/src/messages/tool/tool_messages/pen_tool.rs:1525-1531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/pen_tool.rs:1429` 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 (6 lines × 2) node-graph/nodes/text/src/lib.rs:641 — node-graph/nodes/text/src/lib.rs:641-646 | node-graph/nodes/text/src/lib.rs:653-658 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1027 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1027-1032 | editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1036-1041 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:409 — editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:409-414 | editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:453-458 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:409` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `network_path` to `&[NodeId]` in one and `&[NodeId]) -> Box<dyn Fn(&Type` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document_migration.rs:1298 — editor/src/messages/portfolio/document_migration.rs:1298-1303 | editor/src/messages/portfolio/document_migration.rs:1360-1365 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document_migration.rs:1398 — editor/src/messages/portfolio/document_migration.rs:1398-1403 | editor/src/messages/portfolio/document_migration.rs:1583-1588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:1398` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:603 — node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:603-608 | node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:618-623 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) node-graph/nodes/vector/src/vector_nodes.rs:3471 — node-graph/nodes/vector/src/vector_nodes.rs:3471-3476 | node-graph/nodes/vector/src/vector_nodes.rs:3484-3489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/vector/src/vector_nodes.rs:3471` 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 (6 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:64 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:64-69 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:64-69 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:64` 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 (6 lines × 2) libraries/math-parser/src/constants.rs:569 — libraries/math-parser/src/constants.rs:569-575 | libraries/math-parser/src/constants.rs:583-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `libraries/math-parser/src/constants.rs:569` 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 (6 lines × 2) editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:131 — editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:131-136 | editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:107-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:131` 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 (6 lines × 2) editor/src/messages/portfolio/document_storage_io.rs:195 — editor/src/messages/portfolio/document_storage_io.rs:195-200 | editor/src/messages/portfolio/document_storage_io.rs:241-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_storage_io.rs:195` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) editor/src/messages/portfolio/document_migration.rs:3254 — editor/src/messages/portfolio/document_migration.rs:3254-3259 | editor/src/messages/portfolio/document_migration.rs:3273-3278 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:3254` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) editor/src/messages/tool/tool_messages/gradient_tool.rs:1706 — editor/src/messages/tool/tool_messages/gradient_tool.rs:1706-1711 | editor/src/messages/tool/tool_messages/gradient_tool.rs:1719-1724 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×28
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:3215 — editor/src/messages/portfolio/document/document_message_handler.rs:3215-3219 | editor/src/messages/tool/tool_messages/select_tool.rs:788-793 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:3215` 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) editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:219 — editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:219-223 | editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:230-234 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:219` 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) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2057 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2057-2061 | editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2091-2096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2063` calls `add` and `editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2097` 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:4024 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:4024-4028 | editor/src/messages/tool/tool_messages/select_tool.rs:2071-2075 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:4024` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1149 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1149-1153 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1175-1179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:224 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:224-228 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:802-806 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document/overlays/utility_types_web.rs:801` calls `line_to` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs:223` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document_migration.rs:1927 — editor/src/messages/portfolio/document_migration.rs:1927-1931 | editor/src/messages/portfolio/document_migration.rs:1939-1943 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:1927` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs:147 — editor/src/messages/tool/common_functionality/utility_functions.rs:147-151 | editor/src/messages/tool/common_functionality/utility_functions.rs:172-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/tool/tool_messages/artboard_tool.rs:439 — editor/src/messages/tool/tool_messages/artboard_tool.rs:439-443 | editor/src/messages/tool/tool_messages/artboard_tool.rs:458-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/tool/tool_messages/gradient_tool.rs:453 — editor/src/messages/tool/tool_messages/gradient_tool.rs:453-457 | editor/src/messages/tool/tool_messages/gradient_tool.rs:468-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) node-graph/libraries/core-types/src/list.rs:942 — node-graph/libraries/core-types/src/list.rs:942-946 | node-graph/libraries/core-types/src/list.rs:957-961 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/core-types/src/list.rs:942` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) node-graph/libraries/rendering/src/renderer.rs:1727 — node-graph/libraries/rendering/src/renderer.rs:1727-1731 | node-graph/libraries/rendering/src/renderer.rs:2880-2884 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `ItemRef<'_, Vector>` in one and `ItemRef<'_, Gradient>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (5 lines × 2) node-graph/nodes/text/src/json.rs:327 — node-graph/nodes/text/src/json.rs:327-331 | node-graph/nodes/text/src/lib.rs:130-134 — 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 `node-graph/nodes/text/src/json.rs:327` 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) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:645 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:645-649 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:515-519 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:651 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:651-655 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:624-628 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:849 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:849-853 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:727-731 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1003 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1003-1007 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:890-894 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:148 — editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:148-152 | editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:182-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/layout/layout_message_handler.rs:73 — editor/src/messages/layout/layout_message_handler.rs:73-77 | editor/src/messages/layout/layout_message_handler.rs:86-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/layout/layout_message_handler.rs:73` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/layout/layout_message_handler.rs:70` calls `handle_widget_callback` and `editor/src/messages/layout/layout_message_handler.rs:85` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2373 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2373-2377 | editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:2392-2396 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:772 — editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:772-776 | editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:820-824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:772` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:112 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:112-116 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:115-119 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:112` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/tool/common_functionality/shapes/star_shape.rs:120` calls `Some`, `value`, `Number` and `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:117` 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.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document_migration.rs:2562 — editor/src/messages/portfolio/document_migration.rs:2562-2566 | editor/src/messages/portfolio/document_migration.rs:2569-2573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) editor/src/messages/portfolio/document_migration.rs:3341 — editor/src/messages/portfolio/document_migration.rs:3341-3345 | editor/src/messages/portfolio/document_migration.rs:3406-3410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/portfolio/document_migration.rs:3347` calls `set_input`, `node_at_index`, `clone` and `editor/src/messages/portfolio/document_migration.rs:3413` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) editor/src/messages/tool/common_functionality/color_selector.rs:297 — editor/src/messages/tool/common_functionality/color_selector.rs:297-301 | editor/src/messages/tool/common_functionality/color_selector.rs:471-475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/color_selector.rs:297` 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.
  • + 3 more in this group — see findings.md.
D2 · Cognitive Complexity · NodeNetworkInterface · ×27
  • NodeNetworkInterface::load_stack_dependents_for_nodes (cognitive 68) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:122 — NodeNetworkInterface::load_stack_dependents_for_nodes has cognitive complexity 68 (threshold 15). Drivers by points: if/else 16 (42 pts), loops 11 (21 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::load_structure (cognitive 58) editor/src/messages/portfolio/document/utility_types/network_interface/structure.rs:59 — NodeNetworkInterface::load_structure has cognitive complexity 58 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 7 (17 pts) (nesting depth added 37). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • NodeNetworkInterface::delete_nodes_leaving_dots (cognitive 38) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:982 — NodeNetworkInterface::delete_nodes_leaving_dots has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 6 (11 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.
  • NodeNetworkInterface::set_input (cognitive 35) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:568 — NodeNetworkInterface::set_input has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 8, match/switch 4 (5 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::compute_node_click_targets (cognitive 34) editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:10 — NodeNetworkInterface::compute_node_click_targets has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (29 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::resolve_position (cognitive 34) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:63 — NodeNetworkInterface::resolve_position has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 4 (9 pts), loops 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::upstream_nodes_below_layer (cognitive 31) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:693 — NodeNetworkInterface::upstream_nodes_below_layer has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::move_layer_to_stack (cognitive 30) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:943 — NodeNetworkInterface::move_layer_to_stack has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5, match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 6). 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.
  • NodeNetworkInterface::check_collision_with_stack_dependents (cognitive 29) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:736 — NodeNetworkInterface::check_collision_with_stack_dependents has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 4, loops 2 (3 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.
  • NodeNetworkInterface::copy_nodes (cognitive 29) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:390 — NodeNetworkInterface::copy_nodes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (8 pts), loops 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.
  • NodeNetworkInterface::output_type (cognitive 29) editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:663 — NodeNetworkInterface::output_type has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • NodeNetworkInterface::valid_upstream_chain_nodes (cognitive 27) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:200 — NodeNetworkInterface::valid_upstream_chain_nodes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 5, loops 1 (2 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.
  • NodeNetworkInterface::set_to_node_or_layer (cognitive 26) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:1311 — NodeNetworkInterface::set_to_node_or_layer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (23 pts), match/switch 2, 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.
  • NodeNetworkInterface::selection_with_bridging_dots (cognitive 24) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:340 — NodeNetworkInterface::selection_with_bridging_dots has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::mirror (cognitive 23) editor/src/messages/portfolio/document/utility_types/network_interface/apply.rs:17 — NodeNetworkInterface::mirror has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 4 (7 pts), loops 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • NodeNetworkInterface::is_sole_dependent (cognitive 23) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:582 — NodeNetworkInterface::is_sole_dependent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), match/switch 2 (6 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.
  • NodeNetworkInterface::complete_valid_input_types (cognitive 23) editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:593 — NodeNetworkInterface::complete_valid_input_types has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 4 (8 pts) (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • NodeNetworkInterface::give_diverged_catalog_entries_new_ids (cognitive 22) editor/src/messages/portfolio/document/utility_types/network_interface.rs:148 — NodeNetworkInterface::give_diverged_catalog_entries_new_ids has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::remove_references_from_network (cognitive 21) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:1104 — NodeNetworkInterface::remove_references_from_network has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::try_set_upstream_to_chain (cognitive 20) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:252 — NodeNetworkInterface::try_set_upstream_to_chain has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::post_node_with_index (cognitive 20) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:638 — NodeNetworkInterface::post_node_with_index has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2, match/switch 1 (2 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.
  • NodeNetworkInterface::remove_export (cognitive 19) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:195 — NodeNetworkInterface::remove_export has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (7 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.
  • NodeNetworkInterface::combined_document_bounds (cognitive 17) editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:997 — NodeNetworkInterface::combined_document_bounds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetworkInterface::compute_outward_wires (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:469 — NodeNetworkInterface::compute_outward_wires has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 6 (8 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.
  • NodeNetworkInterface::shift_node (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:816 — NodeNetworkInterface::shift_node has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 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.
  • + 2 more in this group — see findings.md.
D1 · Cyclomatic Complexity · graphite_editor · ×24
  • graphite_editor::messages::portfolio::document_migration::migrate_node (cyclomatic 258) editor/src/messages/portfolio/document_migration.rs:1908 — graphite_editor::messages::portfolio::document_migration::migrate_node has cyclomatic complexity 258 (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.
  • graphite_editor::messages::portfolio::document_migration::document_migration_upgrades (cyclomatic 106) editor/src/messages/portfolio/document_migration.rs:1208 — graphite_editor::messages::portfolio::document_migration::document_migration_upgrades has cyclomatic complexity 106 (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.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type (cyclomatic 72) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:286 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::inspector_row_from_type has cyclomatic complexity 72 (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.
  • graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path (cyclomatic 72) editor/src/messages/portfolio/document/utility_types/wires.rs:148 — graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_path has cyclomatic complexity 72 (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.
  • graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints (cyclomatic 37) editor/src/messages/tool/tool_messages/path_tool.rs:3550 — graphite_editor::messages::tool::tool_messages::path_tool::update_dynamic_hints has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector (cyclomatic 33) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:854 — graphite_editor::messages::portfolio::document::node_graph::document_node_definitions::static_input_inspector has cyclomatic complexity 33 (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.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector (cyclomatic 32) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:2090 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::hue_saturation_inspector has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::path_marker_overlays (cyclomatic 31) editor/src/messages/portfolio/document/overlays/utility_functions.rs:333 — graphite_editor::messages::portfolio::document::overlays::utility_functions::path_marker_overlays 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.
  • graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points (cyclomatic 30) editor/src/messages/portfolio/document_migration.rs:4013 — graphite_editor::messages::portfolio::document_migration::migrate_copy_to_points 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.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section (cyclomatic 29) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1913 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::build_shared_slider_section 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.
  • graphite_editor::messages::portfolio::document_migration::migrate_removed_catalog_definitions (cyclomatic 26) editor/src/messages/portfolio/document_migration.rs:3739 — graphite_editor::messages::portfolio::document_migration::migrate_removed_catalog_definitions has cyclomatic complexity 26 (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.
  • graphite_editor::messages::tool::tool_messages::shape_tool::sync_shape_options_from_selection (cyclomatic 26) editor/src/messages/tool/tool_messages/shape_tool.rs:317 — graphite_editor::messages::tool::tool_messages::shape_tool::sync_shape_options_from_selection 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.
  • graphite_editor::messages::tool::tool_messages::shape_tool::update_dynamic_hints (cyclomatic 26) editor/src/messages/tool/tool_messages/shape_tool.rs:1501 — graphite_editor::messages::tool::tool_messages::shape_tool::update_dynamic_hints 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.
  • graphite_editor::messages::portfolio::document_migration::modifications_following_turned_segments (cyclomatic 24) editor/src/messages/portfolio/document_migration.rs:3588 — graphite_editor::messages::portfolio::document_migration::modifications_following_turned_segments has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::index_label_overlays (cyclomatic 23) editor/src/messages/portfolio/document/overlays/utility_functions.rs:489 — graphite_editor::messages::portfolio::document::overlays::utility_functions::index_label_overlays 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.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::generate_node_inspector (cyclomatic 22) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3131 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::generate_node_inspector has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector (cyclomatic 21) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3345 — graphite_editor::messages::portfolio::document::node_graph::node_inspector::fill_inspector 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.
  • graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_to_bezpath (cyclomatic 20) editor/src/messages/portfolio/document/utility_types/wires.rs:472 — graphite_editor::messages::portfolio::document::utility_types::wires::straight_wire_to_bezpath has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • graphite_editor::messages::tool::common_functionality::color_selector::sync_color_options (cyclomatic 19) editor/src/messages/tool/common_functionality/color_selector.rs:279 — graphite_editor::messages::tool::common_functionality::color_selector::sync_color_options 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.
  • graphite_editor::messages::tool::common_functionality::measure::measurement_marks (cyclomatic 19) editor/src/messages/tool/common_functionality/measure.rs:267 — graphite_editor::messages::tool::common_functionality::measure::measurement_marks 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.
  • graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion (cyclomatic 18) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:434 — graphite_editor::messages::portfolio::document::utility_types::network_interface::editor_delta::stage_conversion 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.
  • graphite_editor::messages::portfolio::document::data_panel::data_panel_message_handler::context_widgets (cyclomatic 17) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:185 — graphite_editor::messages::portfolio::document::data_panel::data_panel_message_handler::context_widgets 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.
  • graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair (cyclomatic 17) editor/src/messages/tool/common_functionality/utility_functions.rs:511 — graphite_editor::messages::tool::common_functionality::utility_functions::fit_handles_to_segment_pair has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • graphite_editor::messages::portfolio::document::overlays::utility_functions::path_overlays (cyclomatic 16) editor/src/messages/portfolio/document/overlays/utility_functions.rs:193 — graphite_editor::messages::portfolio::document::overlays::utility_functions::path_overlays has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D3 · God Classes · TooManyMethods · ×24
  • TooManyMethods: NodeNetworkInterface editor/src/messages/portfolio/document/utility_types/network_interface.rs:75 — TooManyMethods — 404 methods, declared across 15 files: network_interface/queries.rs (98), network_interface/caches.rs (64), network_interface/layout.rs (59), network_interface/mutations.rs (55), +11 more file(s). The bar is 30 methods; this is 374 over it, 13.47× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Gdd document/format/src/lib.rs:90 — TooManyMethods — 110 methods, declared across 6 files: src/persist.rs (46), src/lib.rs (25), src/network.rs (15), src/resource.rs (15), +2 more file(s). The bar is 30 methods; this is 80 over it, 3.67× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Session document/graph-storage/src/session.rs:16 — TooManyMethods — 86 methods. The bar is 30 methods; this is 56 over it, 2.87× 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: DocumentMessageHandler editor/src/messages/portfolio/document/document_message_handler.rs:92 — TooManyMethods — 85 methods. The bar is 30 methods; this is 55 over it, 2.83× 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: Vector node-graph/libraries/vector-types/src/vector/vector_types.rs:21 — TooManyMethods — 71 methods, declared across 2 files: vector/vector_types.rs (60), vector/vector_attributes.rs (11). The bar is 30 methods; this is 41 over it, 2.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Color node-graph/libraries/core-types/src/color/color_types.rs:244 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ShapeState editor/src/messages/tool/common_functionality/shape_editor.rs:157 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: VectorGeometry node-graph/libraries/vector-types/src/vector/geometry.rs:14 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× 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: Replica document/peer-transport/src/replica.rs:76 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: NetworkView editor/src/messages/portfolio/document/utility_types/network_interface/view.rs:23 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× 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: ModifyInputsContext editor/src/messages/portfolio/document/graph_operation/utility_types.rs:33 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× 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: Gradient node-graph/libraries/vector-types/src/gradient.rs:24 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OverlayContextInternal editor/src/messages/portfolio/document/overlays/utility_types_native.rs:488 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 over it, 1.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: OverlayContext editor/src/messages/portfolio/document/overlays/utility_types_web.rs:195 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× 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: NodeNetwork node-graph/graph-craft/src/document.rs:312 — TooManyMethods — 42 methods, declared across 4 files: src/document.rs (22), compiler/flatten.rs (13), compiler/scope.rs (5), compiler/lowering.rs (2). The bar is 30 methods; this is 12 over it, 1.40× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OverlayContext editor/src/messages/portfolio/document/overlays/utility_types_native.rs:209 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× 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: NodeGraphMessageHandler editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:58 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 over it, 1.30× 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: PenToolData editor/src/messages/tool/tool_messages/pen_tool.rs:435 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NodeMut editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:35 — 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: DocumentMetadata editor/src/messages/portfolio/document/utility_types/document_metadata.rs:28 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× 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: Matrix libraries/math-parser/src/matrix.rs:10 — 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: List node-graph/libraries/core-types/src/list.rs:1357 — 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: Lattice node-graph/nodes/vector/src/grid_topology.rs:98 — 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: Curve libraries/snapping/src/curve.rs:41 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D3 · God Classes · ClassTooLong · ×23
  • ClassTooLong: DocumentMessageHandler editor/src/messages/portfolio/document/document_message_handler.rs:92 — ClassTooLong — 2716 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 85 methods, 4 blocks, lines 92-4272. The bar is 400 significant lines; this is 2316 over it, 6.79× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NodeGraphMessageHandler editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:58 — ClassTooLong — 2686 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 39 methods, 5 blocks, lines 58-4109. The bar is 400 significant lines; this is 2286 over it, 6.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ShapeState editor/src/messages/tool/common_functionality/shape_editor.rs:157 — ClassTooLong — 1119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 2 blocks, lines 157-2336. The bar is 400 significant lines; this is 719 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PathToolFsmState editor/src/messages/tool/tool_messages/path_tool.rs:563 — ClassTooLong — 1110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 2 blocks, lines 563-3298. The bar is 400 significant lines; this is 710 over it, 2.78× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PortfolioMessageHandler editor/src/messages/portfolio/portfolio_message_handler.rs:54 — ClassTooLong — 934 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 20 methods, 3 blocks, lines 54-1461. The bar is 400 significant lines; this is 534 over it, 2.34× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SelectToolFsmState editor/src/messages/tool/tool_messages/select_tool.rs:485 — ClassTooLong — 839 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 485-2142. The bar is 400 significant lines; this is 439 over it, 2.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PenToolData editor/src/messages/tool/tool_messages/pen_tool.rs:435 — ClassTooLong — 754 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 38 methods, 2 blocks, lines 435-1596. The bar is 400 significant lines; this is 354 over it, 1.89× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MenuBarMessageHandler editor/src/messages/menu_bar/menu_bar_message_handler.rs:9 — ClassTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 9-798. The bar is 400 significant lines; this is 284 over it, 1.71× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Session document/graph-storage/src/session.rs:16 — ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 86 methods, 3 blocks, lines 16-1245. The bar is 400 significant lines; this is 281 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OverlayContext editor/src/messages/portfolio/document/overlays/utility_types_web.rs:195 — ClassTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 3 blocks, lines 195-1173. The bar is 400 significant lines; this is 237 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PathToolData editor/src/messages/tool/tool_messages/path_tool.rs:588 — ClassTooLong — 631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 27 methods, 2 blocks, lines 588-1570. The bar is 400 significant lines; this is 231 over it, 1.58× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ModifyInputsContext editor/src/messages/portfolio/document/graph_operation/utility_types.rs:33 — ClassTooLong — 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 49 methods, 2 blocks, lines 33-1041. The bar is 400 significant lines; this is 223 over it, 1.56× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ColorPickerMessageHandler editor/src/messages/color_picker/color_picker_message_handler.rs:15 — ClassTooLong — 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 12 methods, 4 blocks, lines 15-823. The bar is 400 significant lines; this is 192 over it, 1.48× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PenToolFsmState editor/src/messages/tool/tool_messages/pen_tool.rs:114 — ClassTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 2 blocks, lines 114-2497. The bar is 400 significant lines; this is 186 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Replica document/peer-transport/src/replica.rs:76 — ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 51 methods, 2 blocks, lines 76-969. The bar is 400 significant lines; this is 153 over it, 1.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GradientToolFsmState editor/src/messages/tool/tool_messages/gradient_tool.rs:329 — ClassTooLong — 553 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 329-1785. The bar is 400 significant lines; this is 153 over it, 1.38× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OverlayContextInternal editor/src/messages/portfolio/document/overlays/utility_types_native.rs:488 — ClassTooLong — 509 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 46 methods, 3 blocks, lines 488-1302. The bar is 400 significant lines; this is 109 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: App desktop/src/app.rs:31 — ClassTooLong — 456 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 3 blocks, lines 31-710. The bar is 400 significant lines; this is 56 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Color node-graph/libraries/core-types/src/color/color_types.rs:244 — ClassTooLong — 454 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 68 methods, 11 blocks, lines 193-1013. The bar is 400 significant lines; this is 54 over it, 1.14× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TransformLayerMessageHandler editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:80 — ClassTooLong — 443 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 3 blocks, lines 80-726. The bar is 400 significant lines; this is 43 over it, 1.11× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Lattice node-graph/nodes/vector/src/grid_topology.rs:98 — ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 34 methods, 2 blocks, lines 98-813. The bar is 400 significant lines; this is 32 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Vector node-graph/libraries/vector-types/src/vector/vector_types.rs:21 — ClassTooLong — 414 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 71 methods, 11 blocks, lines 23-959. The bar is 400 significant lines; this is 14 over it, 1.04× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ShapeToolFsmState editor/src/messages/tool/tool_messages/shape_tool.rs:782 — ClassTooLong — 414 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 0 methods, 3 blocks, lines 782-1466. The bar is 400 significant lines; this is 14 over it, 1.04× 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.
D2 · Cognitive Complexity · vector_nodes · ×20
  • vector_nodes::vector_nodes::morph (cognitive 121) node-graph/nodes/vector/src/vector_nodes.rs:2842 — vector_nodes::vector_nodes::morph has cognitive complexity 121 (threshold 15). Drivers by points: if/else 82 (111 pts), loops 16 (24 pts), match/switch 9 (15 pts), boolean chains 12 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (vector_nodes::vector_nodes::morph::lerp_appearance) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::merge_qr_squares::merge_qr_squares (cognitive 102) node-graph/nodes/vector/src/merge_qr_squares.rs:8 — vector_nodes::merge_qr_squares::merge_qr_squares has cognitive complexity 102 (threshold 15). Drivers by points: if/else 11 (46 pts), loops 13 (44 pts), match/switch 1 (7 pts), boolean chains 5 (nesting depth added 72). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::grid_topology::fewest_trails (cognitive 63) node-graph/nodes/vector/src/grid_topology.rs:930 — vector_nodes::grid_topology::fewest_trails has cognitive complexity 63 (threshold 15). Drivers by points: loops 16 (31 pts), if/else 7 (18 pts), match/switch 3 (11 pts), boolean chains 3 (nesting depth added 34). 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.
  • vector_nodes::vector_nodes::smooth_anchors (cognitive 48) node-graph/nodes/vector/src/vector_nodes.rs:1300 — vector_nodes::vector_nodes::smooth_anchors has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 6, loops 3 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::vector_nodes::replace_with_polygons (cognitive 37) node-graph/nodes/vector/src/vector_nodes.rs:1690 — vector_nodes::vector_nodes::replace_with_polygons has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 5 (13 pts), match/switch 1 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::grid_topology::pair_odd_points (cognitive 33) node-graph/nodes/vector/src/grid_topology.rs:1071 — vector_nodes::grid_topology::pair_odd_points has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 8 (13 pts), boolean chains 5 (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.
  • vector_nodes::vector_nodes::decimate (cognitive 32) node-graph/nodes/vector/src/vector_nodes.rs:2275 — vector_nodes::vector_nodes::decimate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 4 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). Of this number, 16 points are the body's own statements and 16 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.
  • vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments (cognitive 28) node-graph/nodes/vector/src/vector_nodes.rs:3677 — vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 5, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (vector_nodes::vector_nodes::bevel_algorithm::calculate_distance_to_split, vector_nodes::vector_nodes::bevel_algorithm::sort_segments) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::turtle::turtle_path (cognitive 25) node-graph/nodes/vector/src/turtle.rs:297 — vector_nodes::turtle::turtle_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 2 (5 pts), loops 2 (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.
  • vector_nodes::vector_nodes::spline (cognitive 24) node-graph/nodes/vector/src/vector_nodes.rs:2611 — vector_nodes::vector_nodes::spline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::vector_nodes::fill (cognitive 22) node-graph/nodes/vector/src/vector_nodes.rs:408 — vector_nodes::vector_nodes::fill has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 2 (6 pts), match/switch 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::vector_nodes::round_subpath_corners (cognitive 22) node-graph/nodes/vector/src/vector_nodes.rs:641 — vector_nodes::vector_nodes::round_subpath_corners has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • vector_nodes::vector_nodes::bevel_algorithm::calculate_distance_to_split (cognitive 21) node-graph/nodes/vector/src/vector_nodes.rs:3569 — vector_nodes::vector_nodes::bevel_algorithm::calculate_distance_to_split has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (vector_nodes::vector_nodes::bevel_algorithm::sort_segments, vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::vector_nodes::pack_strips (cognitive 19) node-graph/nodes/vector/src/vector_nodes.rs:1177 — vector_nodes::vector_nodes::pack_strips has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 4, loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::vector_nodes::sample_polyline (cognitive 17) node-graph/nodes/vector/src/vector_nodes.rs:2122 — vector_nodes::vector_nodes::sample_polyline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::voronoi::clip_to_convex (cognitive 17) node-graph/nodes/vector/src/voronoi.rs:233 — vector_nodes::voronoi::clip_to_convex has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::generator_nodes::rectangle (cognitive 16) node-graph/nodes/vector/src/generator_nodes.rs:120 — vector_nodes::generator_nodes::rectangle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_nodes::vector_nodes::evaluate_path (cognitive 16) node-graph/nodes/vector/src/vector_nodes.rs:2502 — vector_nodes::vector_nodes::evaluate_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • vector_nodes::vector_nodes::morph::lerp_appearance (cognitive 16) node-graph/nodes/vector/src/vector_nodes.rs:3038 — vector_nodes::vector_nodes::morph::lerp_appearance has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (vector_nodes::vector_nodes::morph) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::vector_nodes::bevel_algorithm::sort_segments (cognitive 16) node-graph/nodes/vector/src/vector_nodes.rs:3644 — vector_nodes::vector_nodes::bevel_algorithm::sort_segments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (vector_nodes::vector_nodes::bevel_algorithm::calculate_distance_to_split, vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D35 · Change Coupling · Change coupling · ×20
  • Change coupling: app.rs ↔ handle_desktop_wrapper_message.rs desktop/src/app.rs:1 — `desktop/src/app.rs` and `desktop/wrapper/src/handle_desktop_wrapper_message.rs` change together 100% of the time (12 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `78679a5b` Implement editor level future message handler (#4182); `b100892b` Add support for persistent storage of panel layouts, sizes, and activ…; `2be7790d` Improve UX of importing vs. opening files (#3661) — run `git show` on any of them.
  • Change coupling: frontend_message.rs ↔ node-graph.ts editor/src/messages/frontend/frontend_message.rs:1 — `editor/src/messages/frontend/frontend_message.rs` and `frontend/src/stores/node-graph.ts` change together 91% of the time (21 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are `fba33376` Show other peers' pointers in collaborative editing (#4892); `7e6e4276` Render thumbnails with Vello (#4805); `c6ac909d` Add virtual scrolling to the Layers panel, sending details and thumbn… — run `git show` on any of them.
  • Change coupling: app.rs ↔ intercept_frontend_message.rs desktop/src/app.rs:1 — `desktop/src/app.rs` and `desktop/wrapper/src/intercept_frontend_message.rs` change together 79% of the time (19 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `f11e2d76` Add cross-application copy-paste by also copying layers to the clipbo…; `63725ea6` Desktop: Make input routing aware of floating menus (#4498); `78679a5b` Implement editor level future message handler (#4182) — run `git show` on any of them.
  • Change coupling: handle_desktop_wrapper_message.rs ↔ intercept_frontend_message.rs desktop/wrapper/src/handle_desktop_wrapper_message.rs:1 — `desktop/wrapper/src/handle_desktop_wrapper_message.rs` and `desktop/wrapper/src/intercept_frontend_message.rs` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `78679a5b` Implement editor level future message handler (#4182); `b100892b` Add support for persistent storage of panel layouts, sizes, and activ…; `2be7790d` Improve UX of importing vs. opening files (#3661) — run `git show` on any of them.
  • Change coupling: portfolio_message_handler.rs ↔ Welcome.svelte editor/src/messages/portfolio/portfolio_message_handler.rs:1 — `editor/src/messages/portfolio/portfolio_message_handler.rs` and `frontend/src/components/panels/Welcome.svelte` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `95c1ab81` Prep for the RC6 release of the desktop app; `ab7f59ca` Prep for the RC5 release of the desktop app; `83d03ad6` Fix panel docking bugs and polish its behavior (#4087) — run `git show` on any of them.
  • Change coupling: Layers.svelte ↔ IconButton.svelte frontend/src/components/panels/Layers.svelte:1 — `frontend/src/components/panels/Layers.svelte` and `frontend/src/components/widgets/buttons/IconButton.svelte` change together 62% of the time (13 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `a024a810` Add node chains as selectable, draggable icons in the Layers panel (#…; `06e2a049` Implement dragging layers into the group/new/delete buttons in the La…; `938a688f` Polish up the Layers panel design — run `git show` on any of them.
  • Change coupling: render_cache.rs ↔ render_node.rs node-graph/nodes/gstd/src/render_cache.rs:1 — `node-graph/nodes/gstd/src/render_cache.rs` and `node-graph/nodes/gstd/src/render_node.rs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `c20da5c3` Make the Vello GPU renderer robustly handle complex/degenerate scenes…; `58b8aeb0` Fix viewport zoom perf regression caused by #3848 (#4749); `a040362d` Change footprint to always be in physical instead of logical space (#… — run `git show` on any of them.
  • Change coupling: adjustments.rs ↔ image_color_palette.rs node-graph/nodes/raster/src/adjustments.rs:1 — `node-graph/nodes/raster/src/adjustments.rs` and `node-graph/nodes/raster/src/image_color_palette.rs` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `f05a644b` Revamp the syntax to #[hard(a..b)] and #[soft(a..b)] bounds on node d…; `f42d12da` Improve type handling for ints/floats with the #[hard/soft_min/max(..…; `fdb09e33` Improve the categorization across many nodes (at that commit the files were still `node-graph/gcore/src/raster/adjustments.rs` and `node-graph/gstd/src/image_color_palette.rs`) — run `git show` on any of them.
  • Change coupling: new_document_dialog_message_handler.rs ↔ portfolio_message_handler.rs editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:1 — `editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs` and `editor/src/messages/portfolio/portfolio_message_handler.rs` change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `83d03ad6` Fix panel docking bugs and polish its behavior (#4087); `ba63c26c` Replace the Artboard struct with a Table<Table<Graphic>> shape (#4077); `da45ab2f` Add a checkered background to transparent artboards and the infinite … — run `git show` on any of them.
  • Change coupling: transform_utils.rs ↔ document_node_definitions.rs editor/src/messages/portfolio/document/graph_operation/transform_utils.rs:1 — `editor/src/messages/portfolio/document/graph_operation/transform_utils.rs` and `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `332088bc` Make the Transform node use angles in degrees instead of radians for …; `a6af5d48` Memoize hashing (#1876) (at that commit the file was still `editor/src/messages/portfolio/document/node_graph/document_node_types.rs`); `5bca9318` Rename handle mirroring to colinear (at that commit the files were still `editor/src/messages/portfolio/document/node_graph/graph_operation_message_handler/transform_utils.rs` and `editor/src/messages/portfolio/document/node_graph/node_graph_message_handler/document_node_types.rs`) — run `git show` on any of them.
  • Change coupling: frontend_message.rs ↔ files.ts editor/src/messages/frontend/frontend_message.rs:1 — `editor/src/messages/frontend/frontend_message.rs` and `frontend/src/utility-functions/files.ts` change together 54% of the time (7 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `c2afc07a` Move file filter creation from frontend to editor (#4351); `2be7790d` Improve UX of importing vs. opening files (#3661); `96a1b12a` Desktop: Unify save file handling and add file dialog for export (#3008) — run `git show` on any of them.
  • Change coupling: adjustments.rs ↔ blending_nodes.rs node-graph/nodes/raster/src/adjustments.rs:1 — `node-graph/nodes/raster/src/adjustments.rs` and `node-graph/nodes/raster/src/blending_nodes.rs` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `c91d0cd5` Update all node parameters with appropriate attributes of #[unit(...)…; `951339a6` Move the adjustment nodes to 64-bit precision number parameters (#4579); `506690d1` Fix the 'Mix' and 'Color Overlay' nodes to use spec-compliant math fo… — run `git show` on any of them.
  • Change coupling: Document.svelte ↔ IconButton.svelte frontend/src/components/panels/Document.svelte:1 — `frontend/src/components/panels/Document.svelte` and `frontend/src/components/widgets/buttons/IconButton.svelte` change together 52% of the time (11 of the 21 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `01499de8` Make the tool shelf adapt to multiple columns and improve panel scrol…; `e877eea4` Fix all remaining Vue/TS errors flagged in Volar (at that commit the files were still `frontend/src/components/panels/Document.vue` and `frontend/src/components/widgets/buttons/IconButton.vue`); `5518384e` Vue/TS bug and bad typing fixes (at that commit the files were still `frontend/src/components/panels/Document.vue` and `frontend/src/components/widgets/buttons/IconButton.vue`) — run `git show` on any of them.
  • Change coupling: layout_message_handler.rs ↔ WidgetSpan.svelte editor/src/messages/layout/layout_message_handler.rs:1 — `editor/src/messages/layout/layout_message_handler.rs` and `frontend/src/components/widgets/WidgetSpan.svelte` change together 52% of the time (23 of the 44 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `76039460` Turn the Properties panel into a tree of the chains feeding each node…; `23e6b0f1` Make the dropdown widget's file drop a callback and keep stray file d…; `eb4a1223` Rename the SpectrumInput widget to SliderInput (#4541) — run `git show` on any of them.
  • Change coupling: node_registry.rs ↔ lib.rs node-graph/interpreted-executor/src/node_registry.rs:1 — `node-graph/interpreted-executor/src/node_registry.rs` and `node-graph/libraries/raster-types/src/lib.rs` change together 51% of the time (25 of the 49 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 25 shared commits counted here, the most recent 3 are `e238753a` Implement clipping masks, stroke align, and stroke paint order (#2644) (at that commit the file was still `node-graph/gcore/src/raster.rs`); `a8e209e4` Remove the old node macro and fix/clean up several raster nodes (#2650) (at that commit the file was still `node-graph/gcore/src/raster.rs`); `349ec5da` Add MemoizeImpure node and cache image base64 in graph (#1595) (at that commit the file was still `node-graph/gcore/src/raster.rs`) — run `git show` on any of them.
  • Change coupling: freehand_tool.rs ↔ pen_tool.rs editor/src/messages/tool/tool_messages/freehand_tool.rs:1 — `editor/src/messages/tool/tool_messages/freehand_tool.rs` and `editor/src/messages/tool/tool_messages/pen_tool.rs` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `525e49f7` Make the Shape tool's modes' parameter controls sync with the selecte…; `93880abc` Experimental vector meshes (#2223); `ed119ad3` Add Freehand tool drawing new subpaths on an existing layer with Shif… — run `git show` on any of them.
  • Change coupling: freehand_tool.rs ↔ spline_tool.rs editor/src/messages/tool/tool_messages/freehand_tool.rs:1 — `editor/src/messages/tool/tool_messages/freehand_tool.rs` and `editor/src/messages/tool/tool_messages/spline_tool.rs` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `5612b636` Extend open paths from endpoints with the Freehand tool and skip hidd…; `97430120` Revert #1594 and #1623 so the Freehand tool no longer extends existin…; `525e49f7` Make the Shape tool's modes' parameter controls sync with the selecte… — run `git show` on any of them.
  • Change coupling: color_picker_message_handler.rs ↔ gradient_tool.rs editor/src/messages/color_picker/color_picker_message_handler.rs:1 — `editor/src/messages/color_picker/color_picker_message_handler.rs` and `editor/src/messages/tool/tool_messages/gradient_tool.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `681b4033` Add a gradient interpolation attribute with Stepped, Linear (existing…; `4b01abe3` Add a "Cyclic" gradient option that closes the ramp into a seamless l…; `3f082c88` Make gradient evaluation follow the ramp's interpolation space attrib… — run `git show` on any of them.
  • Change coupling: artboard.rs ↔ lib.rs node-graph/libraries/graphic-types/src/artboard.rs:1 — `node-graph/libraries/graphic-types/src/artboard.rs` and `node-graph/nodes/blending/src/lib.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `4474de46` Replace the AlphaBlending struct with separate attributes (#4086); `0847d7b0` Centralize attribute strings in consts and rename "editor:layer" to "…; `6d669ad7` Add documentation to many nodes (#3338) (at that commit the files were still `node-graph/gcore/src/artboard.rs` and `node-graph/gcore/src/blending_nodes.rs`) — run `git show` on any of them.
  • Change coupling: lib.rs ↔ transform_nodes.rs node-graph/nodes/blending/src/lib.rs:1 — `node-graph/nodes/blending/src/lib.rs` and `node-graph/nodes/transform/src/transform_nodes.rs` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `c91d0cd5` Update all node parameters with appropriate attributes of #[unit(...)…; `0847d7b0` Centralize attribute strings in consts and rename "editor:layer" to "…; `6d669ad7` Add documentation to many nodes (#3338) (at that commit the files were still `node-graph/gcore/src/blending_nodes.rs` and `node-graph/gcore/src/transform_nodes.rs`) — run `git show` on any of them.
D2 · Cognitive Complexity · vector_types · ×19
  • vector_types::vector::flatten::chain_order (cognitive 85) node-graph/libraries/vector-types/src/vector/flatten.rs:313 — vector_types::vector::flatten::chain_order has cognitive complexity 85 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 9 (15 pts), boolean chains 9, match/switch 1 (3 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::concave_hull::refine_cycle (cognitive 66) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1390 — vector_types::vector::algorithms::concave_hull::refine_cycle has cognitive complexity 66 (threshold 15). Drivers by points: if/else 18 (44 pts), loops 8 (11 pts), match/switch 3 (8 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::concave_hull::trace_hull (cognitive 43) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:946 — vector_types::vector::algorithms::concave_hull::trace_hull has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 10 (14 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.
  • vector_types::vector::algorithms::weld::weld_nearby_points (cognitive 41) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:387 — vector_types::vector::algorithms::weld::weld_nearby_points has cognitive complexity 41 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 8 (16 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::concave_hull::emit_cycle (cognitive 40) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1648 — vector_types::vector::algorithms::concave_hull::emit_cycle has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 5 (10 pts), loops 7 (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.
  • vector_types::vector::algorithms::offset_bezpath::offset_bezpath (cognitive 38) node-graph/libraries/vector-types/src/vector/algorithms/offset_bezpath.rs:23 — vector_types::vector::algorithms::offset_bezpath::offset_bezpath has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 2 (6 pts), boolean chains 2, loops 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.
  • vector_types::vector::algorithms::concave_hull::end_candidates (cognitive 37) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1217 — vector_types::vector::algorithms::concave_hull::end_candidates has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (32 pts), boolean chains 2, loops 1 (2 pts), 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.
  • vector_types::vector::algorithms::concave_hull::solve_span (cognitive 37) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1271 — vector_types::vector::algorithms::concave_hull::solve_span has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 4 (8 pts), boolean chains 7, match/switch 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::contour::contours_with (cognitive 35) node-graph/libraries/vector-types/src/vector/contour.rs:94 — vector_types::vector::contour::contours_with has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (28 pts), loops 3 (5 pts), boolean chains 1, 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.
  • vector_types::vector::algorithms::convex_hull::refine_transitions (cognitive 31) node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:486 — vector_types::vector::algorithms::convex_hull::refine_transitions has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (7 pts), loops 3 (5 pts), boolean chains 2 (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.
  • vector_types::vector::algorithms::concave_hull::extract_pieces (cognitive 27) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1099 — vector_types::vector::algorithms::concave_hull::extract_pieces has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 5 (8 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::poisson_disk::poisson_disk_sample (cognitive 25) node-graph/libraries/vector-types/src/vector/algorithms/poisson_disk.rs:11 — vector_types::vector::algorithms::poisson_disk::poisson_disk_sample has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::convex_hull::normalize_geometry (cognitive 24) node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:145 — vector_types::vector::algorithms::convex_hull::normalize_geometry has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::vector_attributes::reverse_spans_in_place (cognitive 21) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:918 — vector_types::vector::vector_attributes::reverse_spans_in_place has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::bezpath_algorithms::compute_sample_locations (cognitive 20) node-graph/libraries/vector-types/src/vector/algorithms/bezpath_algorithms.rs:98 — vector_types::vector::algorithms::bezpath_algorithms::compute_sample_locations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (3 pts), match/switch 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.
  • vector_types::vector::algorithms::concave_hull::normalize_geometry (cognitive 20) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:147 — vector_types::vector::algorithms::concave_hull::normalize_geometry has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (5 pts), match/switch 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::convex_hull::extract_contacts (cognitive 20) node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:413 — vector_types::vector::algorithms::convex_hull::extract_contacts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 2 (4 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • vector_types::vector::algorithms::concave_hull::strand_partners (cognitive 18) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1841 — vector_types::vector::algorithms::concave_hull::strand_partners has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (6 pts), match/switch 3 (6 pts), boolean chains 3, loops 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.
  • vector_types::gradient::hue_delta (cognitive 17) node-graph/libraries/vector-types/src/gradient.rs:461 — vector_types::gradient::hue_delta has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, match/switch 1 (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.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×19
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:501 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:501-507 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:609-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:63 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:63-69 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:78-84 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:63` 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 (7 lines × 2) editor/src/messages/tool/tool_messages/text_tool.rs:991 — editor/src/messages/tool/tool_messages/text_tool.rs:991-997 | editor/src/messages/tool/tool_messages/text_tool.rs:1032-1038 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) libraries/math-parser/src/parser.rs:516 — libraries/math-parser/src/parser.rs:516-522 | libraries/math-parser/src/parser.rs:560-566 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `libraries/math-parser/src/parser.rs:516` 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 (7 lines × 2) node-graph/libraries/rendering/src/renderer.rs:2469 — node-graph/libraries/rendering/src/renderer.rs:2469-2475 | node-graph/libraries/rendering/src/renderer.rs:2602-2608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/rendering/src/renderer.rs:2469` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `ItemRef<'_, Raster<CPU>>` in one and `ItemRef<'_, Raster<GPU>>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) node-graph/node-macro/src/codegen.rs:617 — node-graph/node-macro/src/codegen.rs:617-623 | node-graph/node-macro/src/codegen.rs:653-659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/codegen.rs:617` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) node-graph/nodes/raster/src/filter.rs:235 — node-graph/nodes/raster/src/filter.rs:235-241 | node-graph/nodes/raster/src/filter.rs:283-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/raster/src/filter.rs:235` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) proc-macros/src/message_handler_data_attr.rs:54 — proc-macros/src/message_handler_data_attr.rs:54-60 | proc-macros/src/message_handler_data_attr.rs:86-92 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:224 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:224-230 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:287-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document_migration.rs:3827 — editor/src/messages/portfolio/document_migration.rs:3827-3833 | editor/src/messages/portfolio/document_migration.rs:3842-3848 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:3842` 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 (7 lines × 2) editor/src/messages/portfolio/portfolio_message_handler.rs:578 — editor/src/messages/portfolio/portfolio_message_handler.rs:578-584 | editor/src/messages/portfolio/portfolio_message_handler.rs:610-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/portfolio_message_handler.rs:578` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (7 lines × 2) editor/src/messages/tool/tool_messages/pen_tool.rs:1798 — editor/src/messages/tool/tool_messages/pen_tool.rs:1798-1804 | editor/src/messages/tool/tool_messages/pen_tool.rs:1919-1925 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1277 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1277-1283 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1148-1154 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1285 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1285-1291 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1156-1162 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1281 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1281-1287 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1339-1346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1281` 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 (7 lines × 2) node-graph/node-macro/src/validation.rs:304 — node-graph/node-macro/src/validation.rs:304-310 | node-graph/node-macro/src/validation.rs:326-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/validation.rs:304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) editor/src/messages/tool/tool_messages/artboard_tool.rs:669 — editor/src/messages/tool/tool_messages/artboard_tool.rs:669-675 | editor/src/messages/tool/tool_messages/text_tool.rs:1147-1153 — 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 `editor/src/messages/tool/tool_messages/artboard_tool.rs:669` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/tool/tool_messages/text_tool.rs:1144` calls `HintData`, `HintGroup`, `mouse` and `editor/src/messages/tool/tool_messages/artboard_tool.rs:666` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1295 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1295-1301 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1166-1172 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) node-graph/nodes/transform/src/transform_nodes.rs:261 — node-graph/nodes/transform/src/transform_nodes.rs:261-267 | node-graph/nodes/transform/src/transform_nodes.rs:315-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/transform/src/transform_nodes.rs:261` 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×18
  • Duplicated block (10 lines × 2) editor/src/messages/layout/utility_types/layout_widget.rs:291 — editor/src/messages/layout/utility_types/layout_widget.rs:291-300 | editor/src/messages/layout/utility_types/layout_widget.rs:343-352 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/layout/utility_types/layout_widget.rs:291` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:3970 — editor/src/messages/portfolio/document/document_message_handler.rs:3970-3979 | editor/src/messages/portfolio/document/document_message_handler.rs:3992-4001 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:3970` 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 (10 lines × 2) editor/src/messages/portfolio/portfolio_message_handler.rs:1066 — editor/src/messages/portfolio/portfolio_message_handler.rs:1066-1075 | editor/src/messages/portfolio/portfolio_message_handler.rs:1098-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/portfolio_message_handler.rs:1066` 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 (10 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:204 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:204-213 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:217-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:204` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:230 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:230-239 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:243-252 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:1840 — editor/src/messages/tool/tool_messages/path_tool.rs:1840-1849 | editor/src/messages/tool/tool_messages/path_tool.rs:1966-1975 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:1840` 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 (10 lines × 2) editor/src/messages/tool/tool_messages/shape_tool.rs:1207 — editor/src/messages/tool/tool_messages/shape_tool.rs:1207-1216 | editor/src/messages/tool/tool_messages/shape_tool.rs:1222-1231 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) libraries/math-parser/src/parser.rs:504 — libraries/math-parser/src/parser.rs:504-513 | libraries/math-parser/src/parser.rs:540-549 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) libraries/rawkit/src/tiff/types.rs:314 — libraries/rawkit/src/tiff/types.rs:314-323 | libraries/rawkit/src/tiff/types.rs:339-348 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `libraries/rawkit/src/tiff/types.rs:335` calls `try_into`, `Err` and `libraries/rawkit/src/tiff/types.rs:312` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) node-graph/libraries/vector-types/src/vector/vector_types.rs:327 — node-graph/libraries/vector-types/src/vector/vector_types.rs:327-336 | node-graph/nodes/vector/src/vector_nodes.rs:1920-1929 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) node-graph/nodes/brush/src/basic_brush/convert.rs:66 — node-graph/nodes/brush/src/basic_brush/convert.rs:66-75 | node-graph/nodes/brush/src/basic_brush/pipeline.rs:394-403 — 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 `node-graph/nodes/brush/src/basic_brush/convert.rs:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) node-graph/nodes/raster/src/filter.rs:217 — node-graph/nodes/raster/src/filter.rs:217-226 | node-graph/nodes/raster/src/filter.rs:268-277 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/raster/src/filter.rs:217` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/nodes/raster/src/filter.rs:266` calls `min`, `max` and `node-graph/nodes/raster/src/filter.rs:215` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs:404 — editor/src/messages/tool/common_functionality/utility_functions.rs:404-413 | editor/src/messages/tool/tool_messages/text_tool.rs:751-760 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/utility_functions.rs:404` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:37 — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:37-46 | editor/src/messages/tool/common_functionality/shapes/line_shape.rs:55-64 — 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 (10 lines × 2) document/container/src/lib.rs:106 — document/container/src/lib.rs:106-115 | node-graph/graph-craft/src/application_io/resource/mmap.rs:150-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/graph-craft/src/application_io/resource/mmap.rs:148` calls `MmappedBytes` and `document/container/src/lib.rs:102` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:35 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:35-44 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:35-44 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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.
  • Duplicated block (10 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:687 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:687-696 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:561-570 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (10 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:976 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:976-985 | editor/src/messages/portfolio/document/overlays/utility_types_native.rs:988-997 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×17
  • Animation without a prefers-reduced-motion guard frontend/index.html:48 — `body::after` moves (`animation: spinning-loading-indicator 1s linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/template/book.scss:117 — `.three-column-layout .chapters .wrapper-outer` moves (`transition: left 0.25s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/template/book.scss:93 — `.three-column-layout .chapters` moves (`transition: height 0.25s ease-in-out 0.25s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/page/membership.scss:89 — `.membership-panel .notices:has(.notice.passing:not([hidden]))` moves (`animation: passing-notices-leave 0.4s ease-in 5s forwards`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/carousel.scss:37 — `.carousel.carousel:not(.dragging, .jostling) .carousel-slide :is(img, video)` moves (`transition: transform 500ms`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:95 — `.name-fade.fade > .credits-name` moves (`animation: credits-name-fade calc(1.5s * (var(--name-color-count, 2) - 1)) ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:102 — `.name-fade.flow > .credits-name` moves (`animation: credits-name-flow calc(2s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:110 — `.name-fade.shimmer > .credits-name` moves (`animation: credits-name-shimmer 3s ease-in-out infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:117 — `.name-fade.rise > .credits-name` moves (`animation: credits-name-rise calc(2s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:124 — `.name-fade.wipe > .credits-name` moves (`animation: credits-name-wipe calc(2.8s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:131 — `.name-fade.stripes > .credits-name` moves (`animation: credits-name-stripes calc(1.5s * var(--name-color-count, 2)) linear infinite`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/credits-names.scss:165 — `.name-fade.glow > .credits-name::before` moves (`animation: credits-name-glow 2.4s ease-in-out infinite alternate`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/image-comparison.scss:79 — `.image-comparison .slide-bar .arrows svg:nth-of-type(1)` moves (`animation: 3s infinite ease-out pulse-left, 3s infinite ease-out pulse-opacity`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard website/sass/component/image-comparison.scss:84 — `.image-comparison .slide-bar .arrows svg:nth-of-type(2)` moves (`animation: 3s infinite ease-out pulse-right, 3s infinite ease-out pulse-opacity`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard frontend/src/components/window/Panel.svelte:707 — `.panel .docking-ghost` moves (`transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard frontend/src/components/views/Graph.svelte:1714 — `.graph .redirect-dot .dot` moves (`transition: transform 0.1s, background-color 0.1s, outline-color 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard frontend/src/components/views/Graph.svelte:1787 — `.graph .connector path` moves (`transition: fill 0.1s, transform 0.1s`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×17
  • Duplicated block (9 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:465 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:465-473 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:535-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:465` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:659 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:659-667 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:524-532 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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.
  • Duplicated block (9 lines × 2) editor/src/messages/portfolio/document_migration.rs:3352 — editor/src/messages/portfolio/document_migration.rs:3352-3360 | editor/src/messages/portfolio/document_migration.rs:3413-3421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:3352` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document_migration.rs:3347` calls `set_input`, `node_at_index`, `clone` and `editor/src/messages/portfolio/document_migration.rs:3410` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) editor/src/messages/portfolio/workspace/workspace_message_handler.rs:71 — editor/src/messages/portfolio/workspace/workspace_message_handler.rs:71-79 | editor/src/messages/portfolio/workspace/workspace_message_handler.rs:214-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/spiral_turns_handle.rs:261 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/spiral_turns_handle.rs:261-269 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/spiral_turns_handle.rs:274-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/spiral_turns_handle.rs:261` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:3701 — editor/src/messages/tool/tool_messages/path_tool.rs:3701-3709 | editor/src/messages/tool/tool_messages/path_tool.rs:3711-3719 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) node-graph/libraries/rendering/src/renderer.rs:849 — node-graph/libraries/rendering/src/renderer.rs:849-857 | node-graph/libraries/rendering/src/renderer.rs:2405-2413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/rendering/src/renderer.rs:849` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:2333 — editor/src/messages/portfolio/document/document_message_handler.rs:2333-2341 | editor/src/messages/portfolio/document/document_message_handler.rs:2371-2379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:2333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:548 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:548-556 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:568-576 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) node-graph/node-macro/src/codegen.rs:713 — node-graph/node-macro/src/codegen.rs:713-721 | node-graph/node-macro/src/codegen.rs:787-795 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:179 — node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:179-187 | node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:189-197 — 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 `node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:179` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:46 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:46-54 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:46-54 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:78 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:78-86 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:78-86 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:78` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) node-graph/nodes/gstd/src/platform_application_io.rs:211 — node-graph/nodes/gstd/src/platform_application_io.rs:211-219 | node-graph/nodes/raster/src/std_nodes.rs:222-230 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/raster/src/std_nodes.rs:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) node-graph/nodes/brush/src/basic_brush/pipeline.rs:178 — node-graph/nodes/brush/src/basic_brush/pipeline.rs:178-186 | node-graph/nodes/brush/src/basic_brush/pipeline.rs:282-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/brush/src/basic_brush/pipeline.rs:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) node-graph/nodes/gstd/src/render_background.rs:214 — node-graph/nodes/gstd/src/render_background.rs:214-222 | node-graph/nodes/gstd/src/render_background.rs:243-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/gstd/src/render_background.rs:214` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:218 — editor/src/messages/tool/tool_messages/path_tool.rs:218-226 | editor/src/messages/tool/tool_messages/path_tool.rs:234-242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:218` 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.
D2 · Cognitive Complexity · ShapeState · ×14
  • ShapeState::convert_selected_manipulators_to_colinear_handles (cognitive 86) editor/src/messages/tool/common_functionality/shape_editor.rs:1122 — ShapeState::convert_selected_manipulators_to_colinear_handles has cognitive complexity 86 (threshold 15). Drivers by points: if/else 22 (72 pts), loops 3 (7 pts), match/switch 1 (4 pts), boolean chains 3 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::delete_selected_points (cognitive 63) editor/src/messages/tool/common_functionality/shape_editor.rs:1458 — ShapeState::delete_selected_points has cognitive complexity 63 (threshold 15). Drivers by points: if/else 13 (40 pts), loops 6 (15 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::get_inside_points_and_segments (cognitive 61) editor/src/messages/tool/common_functionality/shape_editor.rs:2219 — ShapeState::get_inside_points_and_segments has cognitive complexity 61 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 5 (19 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::move_selected_points_and_segments (cognitive 56) editor/src/messages/tool/common_functionality/shape_editor.rs:1248 — ShapeState::move_selected_points_and_segments has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (48 pts), loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::alternate_selected_handles (cognitive 42) editor/src/messages/tool/common_functionality/shape_editor.rs:1946 — ShapeState::alternate_selected_handles has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (37 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::flip_smooth_sharp (cognitive 40) editor/src/messages/tool/common_functionality/shape_editor.rs:2076 — ShapeState::flip_smooth_sharp has cognitive complexity 40 (threshold 15). Drivers by points: if/else 6 (21 pts), loops 4 (14 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::break_path_at_selected_point (cognitive 33) editor/src/messages/tool/common_functionality/shape_editor.rs:1611 — ShapeState::break_path_at_selected_point has cognitive complexity 33 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 4 (10 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::convert_manipulator_handles_to_colinear (cognitive 32) editor/src/messages/tool/common_functionality/shape_editor.rs:1021 — ShapeState::convert_manipulator_handles_to_colinear has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::select_connected (cognitive 27) editor/src/messages/tool/common_functionality/shape_editor.rs:693 — ShapeState::select_connected has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::select_all_in_shape (cognitive 26) editor/src/messages/tool/common_functionality/shape_editor.rs:2146 — ShapeState::select_all_in_shape has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (6 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::delete_point_and_break_path (cognitive 23) editor/src/messages/tool/common_functionality/shape_editor.rs:1664 — ShapeState::delete_point_and_break_path has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::close_selected_path (cognitive 19) editor/src/messages/tool/common_functionality/shape_editor.rs:491 — ShapeState::close_selected_path has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::disable_colinear_handles_state_on_selected (cognitive 19) editor/src/messages/tool/common_functionality/shape_editor.rs:1713 — ShapeState::disable_colinear_handles_state_on_selected has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ShapeState::select_handles_and_anchor_connected_to_current_handle (cognitive 17) editor/src/messages/tool/common_functionality/shape_editor.rs:2006 — ShapeState::select_handles_and_anchor_connected_to_current_handle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) editor/src/messages/layout/layout_message_handler.rs:154 — editor/src/messages/layout/layout_message_handler.rs:154-164 | editor/src/messages/layout/layout_message_handler.rs:182-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/layout/layout_message_handler.rs:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/layout/layout_message_handler.rs:180` calls `push` and `editor/src/messages/layout/layout_message_handler.rs:153` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143-1153 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1158-1168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:867 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:867-877 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:745-755 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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 `editor/src/messages/portfolio/document/overlays/utility_types_native.rs:867` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:98 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:98-108 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:177-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:172` calls `manipulator_handle` and `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:93` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) editor/src/messages/tool/common_functionality/shape_editor.rs:2293 — editor/src/messages/tool/common_functionality/shape_editor.rs:2293-2303 | editor/src/messages/tool/common_functionality/shape_editor.rs:2318-2328 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/shape_editor.rs:2293` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:1654 — editor/src/messages/tool/tool_messages/path_tool.rs:1654-1664 | editor/src/messages/tool/tool_messages/path_tool.rs:1707-1717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:1654` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) editor/src/messages/tool/tool_messages/spline_tool.rs:477 — editor/src/messages/tool/tool_messages/spline_tool.rs:477-487 | editor/src/messages/tool/tool_messages/spline_tool.rs:513-523 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) editor/src/node_graph_executor.rs:1088 — editor/src/node_graph_executor.rs:1088-1098 | node-graph/preprocessor/src/value_types.rs:121-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/node_graph_executor.rs:1088` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) node-graph/nodes/vector/src/vector_nodes.rs:1819 — node-graph/nodes/vector/src/vector_nodes.rs:1819-1829 | node-graph/nodes/vector/src/vector_nodes.rs:2198-2208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/vector/src/vector_nodes.rs:1819` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) libraries/math-parser/src/executer.rs:386 — libraries/math-parser/src/executer.rs:386-396 | libraries/math-parser/src/executer.rs:542-552 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) node-graph/libraries/rendering/src/renderer.rs:1536 — node-graph/libraries/rendering/src/renderer.rs:1536-1546 | node-graph/libraries/rendering/src/renderer.rs:1994-2004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) node-graph/libraries/vector-types/src/vector/style.rs:262 — node-graph/libraries/vector-types/src/vector/style.rs:262-272 | node-graph/nodes/vector/src/vector_nodes.rs:3302-3312 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:88 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:88-98 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:93-103 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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.
  • Duplicated block (11 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:717 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:717-727 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:844-854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:717` 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 · Edited copy of a member (13 corresponding lines) · ×12
  • Edited copy of a member (13 corresponding lines) node-graph/nodes/graphic/src/graphic.rs:287 — node-graph/nodes/graphic/src/graphic.rs:287-299 | node-graph/nodes/text/src/lib.rs:289-306 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/sync/sync_message_handler.rs:747 — editor/src/messages/portfolio/sync/sync_message_handler.rs:747-759 | editor/src/messages/portfolio/sync/sync_message_handler.rs:761-778 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/document_migration.rs:3854 — editor/src/messages/portfolio/document_migration.rs:3854-3866 | editor/src/messages/portfolio/document_migration.rs:3894-3906 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) node-graph/nodes/raster/src/filter.rs:177 — node-graph/nodes/raster/src/filter.rs:177-190 | node-graph/nodes/raster/src/filter.rs:192-204 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/tool/common_functionality/color_selector.rs:507 — editor/src/messages/tool/common_functionality/color_selector.rs:507-519 | editor/src/messages/tool/common_functionality/color_selector.rs:522-537 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/document/document_message_handler.rs:2331 — editor/src/messages/portfolio/document/document_message_handler.rs:2331-2343 | editor/src/messages/portfolio/document/document_message_handler.rs:2369-2382 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) node-graph/nodes/graphic/src/graphic.rs:434 — node-graph/nodes/graphic/src/graphic.rs:434-446 | node-graph/nodes/text/src/lib.rs:973-985 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/tool/tool_messages/path_tool.rs:739 — editor/src/messages/tool/tool_messages/path_tool.rs:739-752 | editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:713-725 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:928 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:928-940 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:942-954 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:292 — editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:292-304 | editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:437-450 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:186 — editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:186-198 | editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:201-213 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) node-graph/libraries/core-types/src/list.rs:920 — node-graph/libraries/core-types/src/list.rs:920-932 | node-graph/libraries/core-types/src/list.rs:1254-1267 — 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.
D1 · Cyclomatic Complexity · vector_nodes · ×11
  • vector_nodes::vector_nodes::morph (cyclomatic 79) node-graph/nodes/vector/src/vector_nodes.rs:2842 — vector_nodes::vector_nodes::morph has cyclomatic complexity 79 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (vector_nodes::vector_nodes::morph::lerp_appearance) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::merge_qr_squares::merge_qr_squares (cyclomatic 34) node-graph/nodes/vector/src/merge_qr_squares.rs:8 — vector_nodes::merge_qr_squares::merge_qr_squares has cyclomatic complexity 34 (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.
  • vector_nodes::grid_topology::fewest_trails (cyclomatic 32) node-graph/nodes/vector/src/grid_topology.rs:930 — vector_nodes::grid_topology::fewest_trails has cyclomatic complexity 32 (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.
  • vector_nodes::turtle::turtle_path (cyclomatic 32) node-graph/nodes/vector/src/turtle.rs:297 — vector_nodes::turtle::turtle_path has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • vector_nodes::vector_nodes::smooth_anchors (cyclomatic 22) node-graph/nodes/vector/src/vector_nodes.rs:1300 — vector_nodes::vector_nodes::smooth_anchors has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_nodes::grid_topology::pair_odd_points (cyclomatic 20) node-graph/nodes/vector/src/grid_topology.rs:1071 — vector_nodes::grid_topology::pair_odd_points 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.
  • vector_nodes::vector_nodes::decimate (cyclomatic 19) node-graph/nodes/vector/src/vector_nodes.rs:2275 — vector_nodes::vector_nodes::decimate has cyclomatic complexity 19 (threshold 15). Of this number, 11 points are the body's own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_nodes::vector_nodes::round_subpath_corners (cyclomatic 18) node-graph/nodes/vector/src/vector_nodes.rs:641 — vector_nodes::vector_nodes::round_subpath_corners has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • vector_nodes::vector_nodes::fill (cyclomatic 16) node-graph/nodes/vector/src/vector_nodes.rs:408 — vector_nodes::vector_nodes::fill has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_nodes::vector_nodes::morph::lerp_appearance (cyclomatic 16) node-graph/nodes/vector/src/vector_nodes.rs:3038 — vector_nodes::vector_nodes::morph::lerp_appearance 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. This shape REPEATS in the file: one other method here (vector_nodes::vector_nodes::morph) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments (cyclomatic 16) node-graph/nodes/vector/src/vector_nodes.rs:3677 — vector_nodes::vector_nodes::bevel_algorithm::update_existing_segments has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · node_macro · ×11
  • node_macro::codegen::generate_node_code (cognitive 100) node-graph/node-macro/src/codegen.rs:12 — node_macro::codegen::generate_node_code has cognitive complexity 100 (threshold 15). Drivers by points: match/switch 41 (47 pts), if/else 28 (36 pts), boolean chains 11, loops 2 (6 pts) (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.
  • node_macro::codegen::generate_register_node_impl (cognitive 46) node-graph/node-macro/src/codegen.rs:1286 — node_macro::codegen::generate_register_node_impl has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 5 (18 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • node_macro::validation::ranked_input_violations (cognitive 46) node-graph/node-macro/src/validation.rs:134 — node_macro::validation::ranked_input_violations has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (32 pts), loops 3 (9 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • node_macro::parsing::parse_field (cognitive 32) node-graph/node-macro/src/parsing.rs:839 — node_macro::parsing::parse_field has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (27 pts), loops 1 (3 pts), boolean chains 1, match/switch 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.
  • node_macro::destructure::derive_destructure_impl (cognitive 29) node-graph/node-macro/src/destructure.rs:32 — node_macro::destructure::derive_destructure_impl has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), match/switch 3 (4 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • node_macro::validation::validate_implementations_for_generics (cognitive 25) node-graph/node-macro/src/validation.rs:401 — node_macro::validation::validate_implementations_for_generics has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (6 pts), boolean chains 4, match/switch 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.
  • node_macro::parsing::parse_node_type (cognitive 23) node-graph/node-macro/src/parsing.rs:1095 — node_macro::parsing::parse_node_type has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 13). 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.
  • node_macro::parsing::parse_inputs (cognitive 21) node-graph/node-macro/src/parsing.rs:721 — node_macro::parsing::parse_inputs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (4 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • node_macro::validation::validate_min_max (cognitive 19) node-graph/node-macro/src/validation.rs:293 — node_macro::validation::validate_min_max has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • node_macro::validation::validate_no_item_parameters (cognitive 18) node-graph/node-macro/src/validation.rs:30 — node_macro::validation::validate_no_item_parameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 1, 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.
  • node_macro::derive_choice_type::derive_enum (cognitive 16) node-graph/node-macro/src/derive_choice_type.rs:69 — node_macro::derive_choice_type::derive_enum has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 5, loops 3 (4 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.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×11
  • Edited copy of a member (7 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:855 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:855-861 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:733-739 — 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) node-graph/libraries/vector-types/src/vector/vector_types.rs:170 — node-graph/libraries/vector-types/src/vector/vector_types.rs:170-176 | node-graph/libraries/vector-types/src/vector/vector_types.rs:179-185 — 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) editor/src/messages/portfolio/document/utility_types/nodes.rs:140 — editor/src/messages/portfolio/document/utility_types/nodes.rs:140-146 | editor/src/messages/portfolio/document/utility_types/nodes.rs:148-154 — 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) node-graph/libraries/rendering/src/renderer.rs:118 — node-graph/libraries/rendering/src/renderer.rs:118-124 | node-graph/libraries/rendering/src/renderer.rs:126-132 — 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) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:513 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:513-519 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:855-862 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:531 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:531-537 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:558-564 — 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) editor/src/messages/portfolio/document/utility_types/document_metadata.rs:84 — editor/src/messages/portfolio/document/utility_types/document_metadata.rs:84-90 | editor/src/messages/portfolio/document/utility_types/document_metadata.rs:224-230 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/template.rs:238 — editor/src/messages/portfolio/document/utility_types/network_interface/template.rs:238-244 | editor/src/messages/portfolio/document/utility_types/network_interface/template.rs:247-257 — 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) node-graph/libraries/core-types/src/context.rs:671 — node-graph/libraries/core-types/src/context.rs:671-678 | node-graph/libraries/core-types/src/context.rs:812-818 — 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) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:792 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:792-798 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:414-420 — 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) editor/src/node_graph_executor/runtime.rs:543 — editor/src/node_graph_executor/runtime.rs:543-549 | node-graph/libraries/core-types/src/poll.rs:40-46 — 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 · Edited copy of a member (8 corresponding lines) · ×11
  • Edited copy of a member (8 corresponding lines) editor/src/messages/tool/common_functionality/snap_session/scene_mirror.rs:66 — editor/src/messages/tool/common_functionality/snap_session/scene_mirror.rs:66-73 | libraries/snapping/src/curve.rs:288-295 — 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) node-graph/libraries/rendering/src/vello_scene_builder.rs:110 — node-graph/libraries/rendering/src/vello_scene_builder.rs:110-117 | node-graph/libraries/rendering/src/vello_scene_builder.rs:120-127 — 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) document/format/src/persist.rs:263 — document/format/src/persist.rs:263-274 | document/format/src/persist.rs:361-368 — 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) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1294 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1294-1301 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1165-1172 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:419 — editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:419-426 | editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:428-435 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1159 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1159-1166 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1181-1188 — 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) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1648 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1648-1655 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1658-1665 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:629 — editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:629-636 | editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:638-645 — 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) node-graph/libraries/core-types/src/math/midpoint.rs:7 — node-graph/libraries/core-types/src/math/midpoint.rs:7-20 | node-graph/libraries/core-types/src/math/midpoint.rs:24-31 — 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) libraries/math-parser/src/executer.rs:96 — libraries/math-parser/src/executer.rs:96-103 | libraries/math-parser/src/executer.rs:106-113 — 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) node-graph/node-macro/src/parsing.rs:812 — node-graph/node-macro/src/parsing.rs:812-819 | node-graph/node-macro/src/parsing.rs:821-837 — 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 · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:591 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:591-603 | editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:620-632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:667 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:667-679 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:687-699 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:667` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:710 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:710-722 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:731-743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/node_inspector.rs:710` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:990 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:990-1002 | editor/src/messages/tool/tool_messages/text_tool.rs:125-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (13 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs:293 — editor/src/messages/tool/common_functionality/utility_functions.rs:293-305 | editor/src/messages/tool/common_functionality/utility_functions.rs:379-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/utility_functions.rs:293` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2340 — editor/src/messages/tool/tool_messages/path_tool.rs:2340-2352 | editor/src/messages/tool/tool_messages/path_tool.rs:2431-2443 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/tool/tool_messages/path_tool.rs:2354` calls `add` and `editor/src/messages/tool/tool_messages/path_tool.rs:2445` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) editor/src/messages/tool/utility_types.rs:179 — editor/src/messages/tool/utility_types.rs:179-191 | editor/src/messages/tool/utility_types.rs:200-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/utility_types.rs:179` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) node-graph/nodes/text/src/json.rs:147 — node-graph/nodes/text/src/json.rs:147-159 | node-graph/nodes/text/src/json.rs:166-178 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) node-graph/nodes/graphic/src/graphic.rs:1074 — node-graph/nodes/graphic/src/graphic.rs:1074-1086 | node-graph/nodes/vector/src/vector_nodes.rs:1874-1886 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/graphic/src/graphic.rs:1074` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:185 — node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:185-197 | node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:248-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:185` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:117 — editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:117-129 | editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:295-307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:117` 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.
D1 · Cyclomatic Complexity · vector_types · ×10
  • vector_types::vector::flatten::chain_order (cyclomatic 41) node-graph/libraries/vector-types/src/vector/flatten.rs:313 — vector_types::vector::flatten::chain_order has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_types::vector::algorithms::concave_hull::refine_cycle (cyclomatic 37) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1390 — vector_types::vector::algorithms::concave_hull::refine_cycle has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_types::vector::algorithms::concave_hull::trace_hull (cyclomatic 29) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:946 — vector_types::vector::algorithms::concave_hull::trace_hull 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.
  • vector_types::vector::algorithms::concave_hull::emit_cycle (cyclomatic 27) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1648 — vector_types::vector::algorithms::concave_hull::emit_cycle has cyclomatic complexity 27 (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.
  • vector_types::vector::algorithms::concave_hull::solve_span (cyclomatic 26) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1271 — vector_types::vector::algorithms::concave_hull::solve_span 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.
  • vector_types::vector::algorithms::offset_bezpath::offset_bezpath (cyclomatic 23) node-graph/libraries/vector-types/src/vector/algorithms/offset_bezpath.rs:23 — vector_types::vector::algorithms::offset_bezpath::offset_bezpath 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.
  • vector_types::vector::algorithms::convex_hull::refine_transitions (cyclomatic 19) node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:486 — vector_types::vector::algorithms::convex_hull::refine_transitions 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.
  • vector_types::vector::contour::contours_with (cyclomatic 17) node-graph/libraries/vector-types/src/vector/contour.rs:94 — vector_types::vector::contour::contours_with 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.
  • vector_types::vector::algorithms::concave_hull::end_candidates (cyclomatic 16) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:1217 — vector_types::vector::algorithms::concave_hull::end_candidates has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • vector_types::vector::algorithms::weld::weld_nearby_points (cyclomatic 16) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:387 — vector_types::vector::algorithms::weld::weld_nearby_points has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · math_parser · ×10
  • math_parser::constants::builtin_function (cognitive 126) libraries/math-parser/src/constants.rs:465 — math_parser::constants::builtin_function has cognitive complexity 126 (threshold 15). Drivers by points: if/else 51 (100 pts), match/switch 9 (16 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 58). 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.
  • math_parser::highlight::highlight (cognitive 49) libraries/math-parser/src/highlight.rs:63 — math_parser::highlight::highlight has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (30 pts), match/switch 4 (11 pts), boolean chains 6, loops 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • math_parser::completion::completions (cognitive 39) libraries/math-parser/src/completion.rs:84 — math_parser::completion::completions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 7, loops 4 (5 pts), match/switch 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • math_parser::constants::combinatorial (cognitive 30) libraries/math-parser/src/constants.rs:308 — math_parser::constants::combinatorial has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 3, 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.
  • math_parser::highlight::mark_exponents (cognitive 19) libraries/math-parser/src/highlight.rs:336 — math_parser::highlight::mark_exponents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 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.
  • math_parser::constants::clamp_to_region (cognitive 18) libraries/math-parser/src/constants.rs:1002 — math_parser::constants::clamp_to_region has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • math_parser::executer::value_of_matrix (cognitive 18) libraries/math-parser/src/executer.rs:450 — math_parser::executer::value_of_matrix has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 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.
  • math_parser::highlight::draw_literals (cognitive 16) libraries/math-parser/src/highlight.rs:260 — math_parser::highlight::draw_literals has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • math_parser::lexer::classify_bars (cognitive 16) libraries/math-parser/src/lexer.rs:253 — math_parser::lexer::classify_bars has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 5, if/else 3 (5 pts), loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • math_parser::parser::oversized (cognitive 16) libraries/math-parser/src/parser.rs:191 — math_parser::parser::oversized has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · rendering · ×10
  • rendering::renderer::render_vector_item_to_vello (cognitive 76) node-graph/libraries/rendering/src/renderer.rs:1716 — rendering::renderer::render_vector_item_to_vello has cognitive complexity 76 (threshold 15). Drivers by points: if/else 41 (50 pts), match/switch 8 (13 pts), boolean chains 8, loops 2 (5 pts) (nesting depth added 17). 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.
  • rendering::renderer::render_vector_shape_svg (cognitive 37) node-graph/libraries/rendering/src/renderer.rs:1462 — rendering::renderer::render_vector_shape_svg has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20, boolean chains 10, match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • rendering::renderer::collect_vector_items_metadata (cognitive 25) node-graph/libraries/rendering/src/renderer.rs:2080 — rendering::renderer::collect_vector_items_metadata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 4 (5 pts), match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rendering::renderer::render_raster_cpu_item_svg (cognitive 25) node-graph/libraries/rendering/src/renderer.rs:2364 — rendering::renderer::render_raster_cpu_item_svg has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (25 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rendering::vello_scene_builder::finite_path (cognitive 25) node-graph/libraries/rendering/src/vello_scene_builder.rs:253 — rendering::vello_scene_builder::finite_path has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 6 (10 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rendering::convert_usvg_path::convert_usvg_path (cognitive 24) node-graph/libraries/rendering/src/convert_usvg_path.rs:3 — rendering::convert_usvg_path::convert_usvg_path has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (21 pts), match/switch 1 (2 pts), loops 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.
  • rendering::renderer::render_graphic_item_to_vello (cognitive 22) node-graph/libraries/rendering/src/renderer.rs:876 — rendering::renderer::render_graphic_item_to_vello has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, 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.
  • rendering::renderer::render_gradient_item_svg_with_thumbnail_rect (cognitive 21) node-graph/libraries/rendering/src/renderer.rs:2789 — rendering::renderer::render_gradient_item_svg_with_thumbnail_rect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (19 pts), loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • rendering::render_ext::render_gradient_paint (cognitive 20) node-graph/libraries/rendering/src/render_ext.rs:86 — rendering::render_ext::render_gradient_paint has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (3 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.
  • rendering::renderer::render_graphic_item_svg (cognitive 17) node-graph/libraries/rendering/src/renderer.rs:799 — rendering::renderer::render_graphic_item_svg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×10
  • Edited copy of a member (9 corresponding lines) editor/src/messages/portfolio/document_migration.rs:1878 — editor/src/messages/portfolio/document_migration.rs:1878-1887 | editor/src/messages/portfolio/document_migration.rs:1890-1898 — 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) node-graph/libraries/core-types/src/list.rs:796 — node-graph/libraries/core-types/src/list.rs:796-804 | node-graph/libraries/core-types/src/list.rs:1326-1334 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:176 — editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:176-184 | editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:187-195 — 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) node-graph/nodes/math/src/lib.rs:1506 — node-graph/nodes/math/src/lib.rs:1506-1514 | node-graph/nodes/math/src/lib.rs:1524-1532 — 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) editor/src/messages/tool/common_functionality/shape_editor.rs:868 — editor/src/messages/tool/common_functionality/shape_editor.rs:868-876 | editor/src/messages/tool/common_functionality/shape_editor.rs:879-887 — 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) document/graph-storage/src/schema/value.rs:121 — document/graph-storage/src/schema/value.rs:121-129 | document/migrations/formats/src/v4.rs:389-397 — 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) editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:447 — editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:447-455 | editor/src/messages/layout/utility_types/layout_widget.rs:128-136 — 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) editor/src/messages/portfolio/document/document_message_handler.rs:2965 — editor/src/messages/portfolio/document/document_message_handler.rs:2965-2974 | editor/src/messages/portfolio/document/document_message_handler.rs:2976-2984 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:902 — editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:902-910 | editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:929-939 — 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) node-graph/libraries/graphic-types/src/graphic.rs:491 — node-graph/libraries/graphic-types/src/graphic.rs:491-499 | node-graph/nodes/gcore/src/ops.rs:70-78 — 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.
D5 · Coupling · Off the main sequence · ×10
  • Off the main sequence: control-protocol — control-protocol: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ipsum — ipsum: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: snapping — snapping: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: wgpu-sync — wgpu-sync: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: math-parser — math-parser: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: graphic-nodes — graphic-nodes: abstractness 1.00, instability 0.88, distance 0.88 — zone of uselessness — abstract and unstable, so it's likely unused.
  • Off the main sequence: cargo-run — cargo-run: abstractness 0.25, instability 0.00, distance 0.75 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: document-graph-storage — document-graph-storage: abstractness 0.02, instability 0.25, distance 0.73 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: document-container — document-container: abstractness 0.28, instability 0.00, distance 0.72 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: vector-types — vector-types: abstractness 0.07, instability 0.22, distance 0.71 — zone of pain — concrete and depended on by 14 project(s), so it's rigid to change.
D2 · Cognitive Complexity · Vector · ×9
  • Vector::weld_flow_ends (cognitive 63) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:154 — Vector::weld_flow_ends has cognitive complexity 63 (threshold 15). Drivers by points: if/else 15 (36 pts), loops 14 (24 pts), boolean chains 3 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Vector::unweld (cognitive 42) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:301 — Vector::unweld has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 8, loops 5 (7 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.
  • Vector::anchor_tangents (cognitive 35) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:562 — Vector::anchor_tangents has cognitive complexity 35 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 4 (10 pts), match/switch 2 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Vector::normalize_winding_directions (cognitive 35) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:806 — Vector::normalize_winding_directions has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 5 (7 pts), boolean chains 4 (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.
  • Vector::stroke_manipulator_groups_and_anchor_indices (cognitive 28) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:747 — Vector::stroke_manipulator_groups_and_anchor_indices has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (6 pts) (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.
  • Vector::weld_connected (cognitive 27) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:28 — Vector::weld_connected has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 6 (7 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Vector::concat (cognitive 27) node-graph/libraries/vector-types/src/vector/vector_types.rs:797 — Vector::concat has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Vector::auto_join_paths (cognitive 22) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:623 — Vector::auto_join_paths has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Vector::connected_points (cognitive 16) node-graph/libraries/vector-types/src/vector/vector_types.rs:496 — Vector::connected_points has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×9
  • Edited copy of a member (12 corresponding lines) editor/src/messages/tool/common_functionality/gizmos/gizmo_manager.rs:135 — editor/src/messages/tool/common_functionality/gizmos/gizmo_manager.rs:135-146 | editor/src/messages/tool/common_functionality/gizmos/gizmo_manager.rs:156-167 — 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) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:732 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:732-746 | editor/src/messages/portfolio/document/overlays/utility_types_native.rs:762-773 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:911 — editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:911-922 | editor/src/messages/portfolio/document/utility_types/network_interface/storage_metadata.rs:173-184 — 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) node-graph/libraries/vector-types/src/vector/vector_modification.rs:1108 — node-graph/libraries/vector-types/src/vector/vector_modification.rs:1108-1119 | node-graph/libraries/vector-types/src/vector/vector_modification.rs:1128-1139 — 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) editor/src/messages/color_picker/color_picker_message_handler.rs:825 — editor/src/messages/color_picker/color_picker_message_handler.rs:825-836 | editor/src/messages/color_picker/color_picker_message_handler.rs:838-850 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1046 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1046-1057 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1060-1071 — 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) node-graph/nodes/text/src/l_system.rs:557 — node-graph/nodes/text/src/l_system.rs:557-568 | node-graph/nodes/vector/src/turtle.rs:278-294 — 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) document/container/src/backends/opfs.rs:81 — document/container/src/backends/opfs.rs:81-92 | node-graph/graph-craft/src/application_io/resource/opfs.rs:35-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.
  • Edited copy of a member (12 corresponding lines) node-graph/nodes/text/src/l_system.rs:375 — node-graph/nodes/text/src/l_system.rs:375-387 | node-graph/nodes/text/src/l_system.rs:390-401 — 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.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×8
  • Focus outline removed in CSS without a :focus replacement website/sass/page/donate.scss:395 — `.donation-picker .picker-body .amount-entry input:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement website/sass/component/carousel.scss:83 — `.carousel.carousel .screenshot-details .carousel-controls button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/Editor.svelte:302 — `:where(:focus-visible)` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/window/Panel.svelte:595 — `.panel .tab-bar .tab-group .tab .name input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/widgets/inputs/FieldInput.svelte:241 — `.field-input input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1168 — `.math-expression-input .editor` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/widgets/inputs/WorkingColorsInput.svelte:84 — `.working-colors-button .swatch > button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement frontend/src/components/views/Graph.svelte:1194 — `.graph .name-input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · NodeNetworkInterface · ×8
  • NodeNetworkInterface::mirror (cyclomatic 34) editor/src/messages/portfolio/document/utility_types/network_interface/apply.rs:17 — NodeNetworkInterface::mirror 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.
  • NodeNetworkInterface::set_input (cyclomatic 32) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:568 — NodeNetworkInterface::set_input 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.
  • NodeNetworkInterface::load_stack_dependents_for_nodes (cyclomatic 29) editor/src/messages/portfolio/document/utility_types/network_interface/caches.rs:122 — NodeNetworkInterface::load_stack_dependents_for_nodes 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.
  • NodeNetworkInterface::move_layer_to_stack (cyclomatic 25) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:943 — NodeNetworkInterface::move_layer_to_stack has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • NodeNetworkInterface::delete_nodes_leaving_dots (cyclomatic 23) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:982 — NodeNetworkInterface::delete_nodes_leaving_dots 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.
  • NodeNetworkInterface::load_structure (cyclomatic 19) editor/src/messages/portfolio/document/utility_types/network_interface/structure.rs:59 — NodeNetworkInterface::load_structure 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.
  • NodeNetworkInterface::set_to_node_or_layer (cyclomatic 17) editor/src/messages/portfolio/document/utility_types/network_interface/mutations.rs:1311 — NodeNetworkInterface::set_to_node_or_layer 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.
  • NodeNetworkInterface::compute_node_click_targets (cyclomatic 16) editor/src/messages/portfolio/document/utility_types/network_interface/geometry.rs:10 — NodeNetworkInterface::compute_node_click_targets has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ShapeState · ×8
  • ShapeState::convert_selected_manipulators_to_colinear_handles (cyclomatic 28) editor/src/messages/tool/common_functionality/shape_editor.rs:1122 — ShapeState::convert_selected_manipulators_to_colinear_handles has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ShapeState::delete_selected_points (cyclomatic 25) editor/src/messages/tool/common_functionality/shape_editor.rs:1458 — ShapeState::delete_selected_points has cyclomatic complexity 25 (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.
  • ShapeState::move_selected_points_and_segments (cyclomatic 22) editor/src/messages/tool/common_functionality/shape_editor.rs:1248 — ShapeState::move_selected_points_and_segments has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ShapeState::get_inside_points_and_segments (cyclomatic 22) editor/src/messages/tool/common_functionality/shape_editor.rs:2219 — ShapeState::get_inside_points_and_segments has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ShapeState::convert_manipulator_handles_to_colinear (cyclomatic 19) editor/src/messages/tool/common_functionality/shape_editor.rs:1021 — ShapeState::convert_manipulator_handles_to_colinear 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.
  • ShapeState::select_connected (cyclomatic 17) editor/src/messages/tool/common_functionality/shape_editor.rs:693 — ShapeState::select_connected 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.
  • ShapeState::alternate_selected_handles (cyclomatic 16) editor/src/messages/tool/common_functionality/shape_editor.rs:1946 — ShapeState::alternate_selected_handles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • ShapeState::select_all_in_shape (cyclomatic 16) editor/src/messages/tool/common_functionality/shape_editor.rs:2146 — ShapeState::select_all_in_shape has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · snapping · ×8
  • snapping::constructions::find_constructions (cognitive 50) libraries/snapping/src/constructions.rs:98 — snapping::constructions::find_constructions has cognitive complexity 50 (threshold 15). Drivers by points: if/else 7 (27 pts), loops 7 (18 pts), match/switch 2 (5 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • snapping::solve::resolve_freely (cognitive 38) libraries/snapping/src/solve.rs:454 — snapping::solve::resolve_freely has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 8, loops 5 (8 pts), match/switch 2 (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.
  • snapping::spacing::find_equal_sizes (cognitive 28) libraries/snapping/src/spacing.rs:319 — snapping::spacing::find_equal_sizes has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • snapping::spacing::find_spacing (cognitive 27) libraries/snapping/src/spacing.rs:251 — snapping::spacing::find_spacing has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • snapping::find::find_near_probe (cognitive 24) libraries/snapping/src/find.rs:69 — snapping::find::find_near_probe has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • snapping::snap::snap_features (cognitive 20) libraries/snapping/src/snap.rs:89 — snapping::snap::snap_features has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 2, loops 2, 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.
  • snapping::solve::solve (cognitive 19) libraries/snapping/src/solve.rs:320 — snapping::solve::solve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (7 pts), match/switch 6 (7 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • snapping::curve::roots_between (cognitive 16) libraries/snapping/src/curve.rs:678 — snapping::curve::roots_between has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 1, loops 1, 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 · raster_nodes · ×8
  • raster_nodes::color_lookup_table::format_csp::parse (cognitive 24) node-graph/nodes/raster/src/color_lookup_table/format_csp.rs:7 — raster_nodes::color_lookup_table::format_csp::parse has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, loops 2 (3 pts), 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.
  • raster_nodes::filter::gaussian_separable (cognitive 23) node-graph/nodes/raster/src/filter.rs:206 — raster_nodes::filter::gaussian_separable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 4 (10 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • raster_nodes::std_nodes::noise_pattern (cognitive 20) node-graph/nodes/raster/src/std_nodes.rs:235 — raster_nodes::std_nodes::noise_pattern has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 3 (5 pts), match/switch 5, boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • raster_nodes::color_lookup_table::format_3dl::parse (cognitive 19) REDACTED:7 — raster_nodes::color_lookup_table::format_3dl::parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 2, 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.
  • raster_nodes::std_nodes::channels_to_image (cognitive 19) node-graph/nodes/raster/src/std_nodes.rs:45 — raster_nodes::std_nodes::channels_to_image has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (12 pts), if/else 3, loops 2 (3 pts), boolean chains 1 (nesting depth added 9). 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.
  • raster_nodes::adjustments::selective_color (cognitive 17) node-graph/nodes/raster/src/adjustments.rs:1816 — raster_nodes::adjustments::selective_color has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), match/switch 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • raster_nodes::filter::box_separable (cognitive 17) node-graph/nodes/raster/src/filter.rs:257 — raster_nodes::filter::box_separable has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (5 pts), match/switch 1 (2 pts) (nesting depth added 11). 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.
  • raster_nodes::image_color_palette::image_color_palette (cognitive 16) node-graph/nodes/raster/src/image_color_palette.rs:18 — raster_nodes::image_color_palette::image_color_palette has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D30 · Dependency Vulnerabilities · Medium CVE · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×8
  • Edited copy of a member (10 corresponding lines) libraries/math-parser/src/executer.rs:162 — libraries/math-parser/src/executer.rs:162-171 | libraries/math-parser/src/executer.rs:174-183 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) node-graph/nodes/gcore/src/animation.rs:108 — node-graph/nodes/gcore/src/animation.rs:108-119 | node-graph/nodes/gcore/src/animation.rs:154-163 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) node-graph/nodes/vector/src/vector_nodes.rs:1759 — node-graph/nodes/vector/src/vector_nodes.rs:1759-1773 | node-graph/nodes/vector/src/voronoi.rs:300-309 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) desktop/ui/src/frames/plane/mac.rs:80 — desktop/ui/src/frames/plane/mac.rs:80-89 | desktop/ui/src/frames/plane/mac.rs:91-100 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) editor/src/messages/tool/common_functionality/shapes/arc_shape.rs:134 — editor/src/messages/tool/common_functionality/shapes/arc_shape.rs:134-143 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:113-122 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) libraries/snapping/src/curve.rs:180 — libraries/snapping/src/curve.rs:180-189 | libraries/snapping/src/curve.rs:193-207 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) editor/src/messages/portfolio/document/utility_types/network_interface/view.rs:276 — editor/src/messages/portfolio/document/utility_types/network_interface/view.rs:276-286 | editor/src/messages/portfolio/document/utility_types/network_interface/view.rs:301-310 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) node-graph/libraries/vector-types/src/gradient.rs:1104 — node-graph/libraries/vector-types/src/gradient.rs:1104-1113 | node-graph/libraries/vector-types/src/gradient.rs:1117-1126 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D2 · Cognitive Complexity · text_nodes · ×7
  • text_nodes::json::parse_json_path (cognitive 100) node-graph/nodes/text/src/json.rs:295 — text_nodes::json::parse_json_path has cognitive complexity 100 (threshold 15). Drivers by points: if/else 21 (56 pts), loops 6 (27 pts), match/switch 2 (14 pts), boolean chains 3 (nesting depth added 68). 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.
  • text_nodes::format_number (cognitive 31) node-graph/nodes/text/src/lib.rs:342 — text_nodes::format_number has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, loops 2 (4 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • text_nodes::l_system::rewrite (cognitive 27) node-graph/nodes/text/src/l_system.rs:191 — text_nodes::l_system::rewrite has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (7 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • text_nodes::string_capitalization (cognitive 21) node-graph/nodes/text/src/lib.rs:817 — text_nodes::string_capitalization has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • text_nodes::text_context::for_each_styled_glyph_run (cognitive 19) node-graph/nodes/text/src/text_context.rs:32 — text_nodes::text_context::for_each_styled_glyph_run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • text_nodes::string_pad (cognitive 17) node-graph/nodes/text/src/lib.rs:604 — text_nodes::string_pad has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 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.
  • text_nodes::string_occurrences (cognitive 16) node-graph/nodes/text/src/lib.rs:745 — text_nodes::string_occurrences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (6 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.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×7
  • Edited copy of a member (14 corresponding lines) node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:183 — node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:183-197 | node-graph/libraries/vector-types/src/vector/algorithms/intersection.rs:246-260 — 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) desktop/bundle/src/mac.rs:20 — desktop/bundle/src/mac.rs:20-36 | desktop/bundle/src/win.rs:9-22 — 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) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:474 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:474-487 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:490-503 — 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) node-graph/libraries/vector-types/src/vector/algorithms/shapes.rs:179 — node-graph/libraries/vector-types/src/vector/algorithms/shapes.rs:179-192 | node-graph/libraries/vector-types/src/vector/algorithms/shapes.rs:195-210 — 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) editor/src/messages/tool/common_functionality/utility_functions.rs:142 — editor/src/messages/tool/common_functionality/utility_functions.rs:142-156 | editor/src/messages/tool/common_functionality/utility_functions.rs:166-179 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:813 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:813-827 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1030-1043 — 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) libraries/snapping/src/scene.rs:233 — libraries/snapping/src/scene.rs:233-246 | libraries/snapping/src/scene.rs:249-262 — 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 copy of a member (16 corresponding lines) · ×7
  • Edited copy of a member (16 corresponding lines) editor/src/messages/portfolio/document/utility_types/document_metadata.rs:557 — editor/src/messages/portfolio/document/utility_types/document_metadata.rs:557-572 | editor/src/messages/portfolio/document/utility_types/document_metadata.rs:575-590 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:269 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:269-285 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:288-303 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:597 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:597-616 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:618-633 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) libraries/rawkit/src/tiff/types.rs:310 — libraries/rawkit/src/tiff/types.rs:310-325 | libraries/rawkit/src/tiff/types.rs:331-350 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) document/format/src/export.rs:297 — document/format/src/export.rs:297-312 | document/format/src/persist.rs:370-385 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) editor/src/messages/tool/tool_messages/path_tool.rs:657 — editor/src/messages/tool/tool_messages/path_tool.rs:657-672 | editor/src/messages/tool/tool_messages/select_tool.rs:716-731 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) node-graph/libraries/core-types/src/types.rs:497 — node-graph/libraries/core-types/src/types.rs:497-512 | node-graph/nodes/text/src/l_system.rs:600-615 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×7
  • Edited copy of a member (15 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:863 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:863-877 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:741-755 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3797 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3797-3815 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:3821-3835 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) editor/src/messages/tool/common_functionality/shape_editor.rs:121 — editor/src/messages/tool/common_functionality/shape_editor.rs:121-135 | editor/src/messages/tool/common_functionality/shape_editor.rs:137-151 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:259 — editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:259-273 | editor/src/messages/portfolio/document/utility_types/network_interface/store/cursor.rs:289-303 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) node-graph/libraries/wgpu-executor/src/vello_render.rs:513 — node-graph/libraries/wgpu-executor/src/vello_render.rs:513-530 | node-graph/nodes/brush/src/basic_brush/pipeline.rs:390-404 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) node-graph/libraries/core-types/src/misc.rs:111 — node-graph/libraries/core-types/src/misc.rs:111-125 | node-graph/libraries/core-types/src/misc.rs:129-143 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) editor/src/messages/tool/common_functionality/shape_editor.rs:1911 — editor/src/messages/tool/common_functionality/shape_editor.rs:1911-1925 | editor/src/messages/tool/common_functionality/shape_editor.rs:1928-1943 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×7
  • Edited copy of a member (5 corresponding lines) editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:845 — editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:845-849 | editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:852-856 — 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) node-graph/interpreted-executor/src/dynamic_executor.rs:315 — node-graph/interpreted-executor/src/dynamic_executor.rs:315-319 | node-graph/interpreted-executor/src/dynamic_executor.rs:336-340 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:292 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:292-296 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:404-411 — 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) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1152 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1152-1156 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:1169-1178 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:967 — editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:967-972 | editor/src/messages/portfolio/document/utility_types/network_interface/storage_metadata.rs:106-110 — 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) editor/src/messages/portfolio/document/document_message_handler.rs:2251 — editor/src/messages/portfolio/document/document_message_handler.rs:2251-2256 | editor/src/messages/portfolio/document/document_message_handler.rs:2309-2313 — 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) document/graph-storage/src/sorted.rs:12 — document/graph-storage/src/sorted.rs:12-16 | node-graph/libraries/resources/src/lib.rs:372-376 — 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 · Duplicated block (12 lines × 2) · ×7
  • Duplicated block (12 lines × 2) document/container/src/archive/xz.rs:45 — document/container/src/archive/xz.rs:45-56 | document/container/src/archive/zip.rs:40-51 — 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 `document/container/src/archive/xz.rs:45` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:608 — editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:608-619 | editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:667-678 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:608` 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 (12 lines × 2) editor/src/messages/tool/tool_messages/gradient_tool.rs:1919 — editor/src/messages/tool/tool_messages/gradient_tool.rs:1919-1930 | editor/src/messages/tool/tool_messages/gradient_tool.rs:1974-1985 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/gradient_tool.rs:1919` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) node-graph/node-macro/src/codegen.rs:918 — node-graph/node-macro/src/codegen.rs:918-929 | node-graph/node-macro/src/codegen.rs:938-949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/codegen.rs:918` 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 (12 lines × 2) node-graph/nodes/brush/src/basic_brush/convert.rs:41 — node-graph/nodes/brush/src/basic_brush/convert.rs:41-52 | node-graph/nodes/brush/src/basic_brush/pipeline.rs:304-315 — 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 `node-graph/nodes/brush/src/basic_brush/convert.rs:41` 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 (12 lines × 2) node-graph/node-macro/src/codegen.rs:882 — node-graph/node-macro/src/codegen.rs:882-893 | node-graph/node-macro/src/codegen.rs:895-906 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2395 — editor/src/messages/tool/tool_messages/path_tool.rs:2395-2406 | editor/src/messages/tool/tool_messages/path_tool.rs:2637-2648 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:2395` 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.
D1 · Cyclomatic Complexity · node_macro · ×6
  • node_macro::codegen::generate_node_code (cyclomatic 88) node-graph/node-macro/src/codegen.rs:12 — node_macro::codegen::generate_node_code has cyclomatic complexity 88 (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.
  • node_macro::parsing::parse_field (cyclomatic 26) node-graph/node-macro/src/parsing.rs:839 — node_macro::parsing::parse_field 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.
  • node_macro::codegen::generate_register_node_impl (cyclomatic 22) node-graph/node-macro/src/codegen.rs:1286 — node_macro::codegen::generate_register_node_impl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • node_macro::destructure::derive_destructure_impl (cyclomatic 19) node-graph/node-macro/src/destructure.rs:32 — node_macro::destructure::derive_destructure_impl 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.
  • node_macro::validation::ranked_input_violations (cyclomatic 18) node-graph/node-macro/src/validation.rs:134 — node_macro::validation::ranked_input_violations 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.
  • node_macro::validation::validate_no_item_parameters (cyclomatic 16) node-graph/node-macro/src/validation.rs:30 — node_macro::validation::validate_no_item_parameters has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · PathToolData · ×6
  • PathToolData::mouse_down (cognitive 81) editor/src/messages/tool/tool_messages/path_tool.rs:756 — PathToolData::mouse_down has cognitive complexity 81 (threshold 15). Drivers by points: if/else 24 (57 pts), loops 4 (13 pts), boolean chains 8, match/switch 1 (3 pts) (nesting depth added 44). 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.
  • PathToolData::drag (cognitive 45) editor/src/messages/tool/tool_messages/path_tool.rs:1429 — PathToolData::drag has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 6, match/switch 1 (nesting depth added 20). 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.
  • PathToolData::start_dragging_point (cognitive 24) editor/src/messages/tool/tool_messages/path_tool.rs:969 — PathToolData::start_dragging_point has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PathToolData::update_colinear (cognitive 23) editor/src/messages/tool/tool_messages/path_tool.rs:1078 — PathToolData::update_colinear has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 11). 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.
  • PathToolData::start_sliding_point (cognitive 23) editor/src/messages/tool/tool_messages/path_tool.rs:1294 — PathToolData::start_sliding_point has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PathToolData::slide_point (cognitive 16) editor/src/messages/tool/tool_messages/path_tool.rs:1336 — PathToolData::slide_point has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. 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.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×6
  • Edited copy of a member (11 corresponding lines) node-graph/nodes/transform/src/transform_nodes.rs:259 — node-graph/nodes/transform/src/transform_nodes.rs:259-274 | node-graph/nodes/transform/src/transform_nodes.rs:313-327 — 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) editor/src/messages/portfolio/document/overlays/utility_functions.rs:712 — editor/src/messages/portfolio/document/overlays/utility_functions.rs:712-722 | node-graph/libraries/core-types/src/color/color_types.rs:113-125 — 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) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:277 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:277-287 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:304-317 — 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) editor/src/messages/portfolio/document/utility_types/document_metadata.rs:531 — editor/src/messages/portfolio/document/utility_types/document_metadata.rs:531-541 | editor/src/messages/portfolio/document/utility_types/document_metadata.rs:544-554 — 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) node-graph/libraries/core-types/src/list.rs:936 — node-graph/libraries/core-types/src/list.rs:936-946 | node-graph/libraries/core-types/src/list.rs:949-961 — 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) editor/src/messages/tool/utility_types.rs:639 — editor/src/messages/tool/utility_types.rs:639-649 | editor/src/messages/tool/utility_types.rs:685-695 — 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 (20 corresponding lines) · ×6
  • Edited copy of a member (20 corresponding lines) node-graph/libraries/graphic-types/src/graphic.rs:825 — node-graph/libraries/graphic-types/src/graphic.rs:825-844 | node-graph/libraries/graphic-types/src/graphic.rs:846-865 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) node-graph/nodes/gstd/src/platform_application_io.rs:99 — node-graph/nodes/gstd/src/platform_application_io.rs:99-118 | node-graph/nodes/gstd/src/platform_application_io.rs:137-161 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) editor/src/messages/tool/utility_types.rs:175 — editor/src/messages/tool/utility_types.rs:175-194 | editor/src/messages/tool/utility_types.rs:196-215 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) editor/src/messages/tool/common_functionality/color_selector.rs:545 — editor/src/messages/tool/common_functionality/color_selector.rs:545-566 | editor/src/messages/tool/common_functionality/color_selector.rs:569-588 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) node-graph/libraries/core-types/src/poll.rs:164 — node-graph/libraries/core-types/src/poll.rs:164-184 | node-graph/libraries/core-types/src/poll.rs:218-237 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) node-graph/nodes/graphic/src/graphic.rs:1058 — node-graph/nodes/graphic/src/graphic.rs:1058-1086 | node-graph/nodes/vector/src/vector_nodes.rs:1867-1886 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) document/container/src/backends/opfs.rs:375 — document/container/src/backends/opfs.rs:375-388 | document/container/src/backends/opfs.rs:412-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `document/container/src/backends/opfs.rs:375` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `document/container/src/backends/opfs.rs:411` calls `from`, `seek_with_f64` and `document/container/src/backends/opfs.rs:374` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) editor/src/messages/portfolio/document_migration.rs:3362 — editor/src/messages/portfolio/document_migration.rs:3362-3375 | editor/src/messages/portfolio/document_migration.rs:3423-3436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:3362` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:659 — editor/src/messages/tool/tool_messages/path_tool.rs:659-672 | editor/src/messages/tool/tool_messages/select_tool.rs:718-731 — 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 `editor/src/messages/tool/tool_messages/path_tool.rs:659` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) node-graph/node-macro/src/parsing.rs:688 — node-graph/node-macro/src/parsing.rs:688-701 | node-graph/node-macro/src/parsing.rs:983-996 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/parsing.rs:688` 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 (14 lines × 2) proc-macros/src/combined_message_attrs.rs:79 — proc-macros/src/combined_message_attrs.rs:79-92 | proc-macros/src/combined_message_attrs.rs:103-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) editor/src/messages/tool/tool_messages/select_tool.rs:2030 — editor/src/messages/tool/tool_messages/select_tool.rs:2030-2043 | editor/src/messages/tool/utility_types.rs:78-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D1 · Cyclomatic Complexity · math_parser · ×5
  • math_parser::constants::builtin_function (cyclomatic 151) libraries/math-parser/src/constants.rs:465 — math_parser::constants::builtin_function has cyclomatic complexity 151 (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.
  • math_parser::highlight::highlight (cyclomatic 39) libraries/math-parser/src/highlight.rs:63 — math_parser::highlight::highlight has cyclomatic complexity 39 (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.
  • math_parser::completion::completions (cyclomatic 29) libraries/math-parser/src/completion.rs:84 — math_parser::completion::completions 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.
  • math_parser::documentation::matrix_literal_tooltip (cyclomatic 17) libraries/math-parser/src/documentation.rs:1442 — math_parser::documentation::matrix_literal_tooltip has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Operator::doc (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • math_parser::lexer::classify_bars (cyclomatic 16) libraries/math-parser/src/lexer.rs:253 — math_parser::lexer::classify_bars 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. This is NOT this file's highest cyclomatic complexity: Token::fmt (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Vector · ×5
  • Vector::weld_flow_ends (cyclomatic 33) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:154 — Vector::weld_flow_ends has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Vector::unweld (cyclomatic 25) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:301 — Vector::unweld has cyclomatic complexity 25 (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.
  • Vector::normalize_winding_directions (cyclomatic 20) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:806 — Vector::normalize_winding_directions 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.
  • Vector::anchor_tangents (cyclomatic 17) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:562 — Vector::anchor_tangents 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.
  • Vector::weld_connected (cyclomatic 16) node-graph/libraries/vector-types/src/vector/algorithms/weld.rs:28 — Vector::weld_connected has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · DocumentMessageHandler · ×5
  • DocumentMessageHandler::process_message (cognitive 401) editor/src/messages/portfolio/document/document_message_handler.rs:259 — DocumentMessageHandler::process_message has cognitive complexity 401 (threshold 15). Drivers by points: if/else 164 (319 pts), loops 19 (42 pts), match/switch 12 (23 pts), boolean chains 17 (nesting depth added 189). 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.
  • DocumentMessageHandler::selected_layers_reverse (cognitive 29) editor/src/messages/portfolio/document/document_message_handler.rs:4126 — DocumentMessageHandler::selected_layers_reverse has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 7 (11 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.
  • DocumentMessageHandler::has_selected_descendant_in_graph (cognitive 18) editor/src/messages/portfolio/document/document_message_handler.rs:2836 — DocumentMessageHandler::has_selected_descendant_in_graph has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • DocumentMessageHandler::collect_descendant_tree_paths (cognitive 17) editor/src/messages/portfolio/document/document_message_handler.rs:2914 — DocumentMessageHandler::collect_descendant_tree_paths has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 4 (6 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.
  • DocumentMessageHandler::group_selected_layers (cognitive 16) editor/src/messages/portfolio/document/document_message_handler.rs:3357 — DocumentMessageHandler::group_selected_layers has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 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 · migration_runner · ×5
  • migration_runner::node::upstream_most (cognitive 32) document/migrations/runner/src/node.rs:103 — migration_runner::node::upstream_most has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 5 (11 pts), boolean chains 3 (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.
  • migration_runner::node::rewrite_history (cognitive 28) document/migrations/runner/src/node.rs:313 — migration_runner::node::rewrite_history has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • migration_runner::order::order_migrations (cognitive 27) document/migrations/runner/src/order.rs:12 — migration_runner::order::order_migrations has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 7 (11 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.
  • migration_runner::node::apply_runs (cognitive 22) document/migrations/runner/src/node.rs:153 — migration_runner::node::apply_runs has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 8 (10 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • migration_runner::format::run_format_migrations (cognitive 18) document/migrations/runner/src/format.rs:20 — migration_runner::format::run_format_migrations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (7 pts), loops 3 (6 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PenToolData · ×5
  • PenToolData::drag_handle (cognitive 26) editor/src/messages/tool/tool_messages/pen_tool.rs:1123 — PenToolData::drag_handle has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PenToolData::place_handle_or_segment (cognitive 18) editor/src/messages/tool/tool_messages/pen_tool.rs:888 — PenToolData::place_handle_or_segment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 1, loops 1, 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.
  • PenToolData::adjust_handle_length (cognitive 18) editor/src/messages/tool/tool_messages/pen_tool.rs:1221 — PenToolData::adjust_handle_length has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (nesting depth added 10). 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.
  • PenToolData::bend_from_previous_point (cognitive 16) editor/src/messages/tool/tool_messages/pen_tool.rs:795 — PenToolData::bend_from_previous_point has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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.
  • PenToolData::swap_handles (cognitive 16) editor/src/messages/tool/tool_messages/pen_tool.rs:1018 — PenToolData::swap_handles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (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.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×5
  • Edited copy of a member (6 corresponding lines) node-graph/libraries/core-types/src/color/color_types.rs:763 — node-graph/libraries/core-types/src/color/color_types.rs:763-768 | node-graph/libraries/core-types/src/color/color_types.rs:771-776 — 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) node-graph/libraries/core-types/src/math/bbox.rs:30 — node-graph/libraries/core-types/src/math/bbox.rs:30-35 | node-graph/libraries/core-types/src/math/bbox.rs:48-53 — 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) document/format/src/persist.rs:423 — document/format/src/persist.rs:423-428 | document/format/src/persist.rs:699-706 — 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) document/peer-transport/src/mock.rs:165 — document/peer-transport/src/mock.rs:165-171 | libraries/snapping/src/find.rs:45-50 — 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) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1353 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:1353-1358 | editor/src/messages/portfolio/document/utility_types/network_interface/resolved_types.rs:199-204 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (3 corresponding lines) · ×5
  • Edited copy of a member (3 corresponding lines) editor/src/messages/portfolio/document/document_message_handler.rs:4344 — editor/src/messages/portfolio/document/document_message_handler.rs:4344-4346 | node-graph/libraries/vector-types/src/math/mod.rs:10-12 — 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) editor/src/node_graph_executor.rs:714 — editor/src/node_graph_executor.rs:714-720 | node-graph/libraries/vector-types/src/vector/click_target.rs:88-90 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:924 — editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:924-927 | editor/src/messages/portfolio/document/utility_types/network_interface/storage_metadata.rs:78-80 — 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) node-graph/libraries/rendering/src/render_ext.rs:186 — node-graph/libraries/rendering/src/render_ext.rs:186-194 | node-graph/libraries/rendering/src/renderer.rs:2544-2546 — 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) libraries/math-parser/src/matrix.rs:497 — libraries/math-parser/src/matrix.rs:497-499 | libraries/snapping/src/curve.rs:606-608 — 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 (15 lines × 2) · ×5
  • Duplicated block (15 lines × 2) document/graph-storage/src/schema/value.rs:98 — document/graph-storage/src/schema/value.rs:98-112 | document/migrations/formats/src/v4.rs:370-384 — before extracting anything, compare `document/graph-storage/src/schema/value.rs` and `document/migrations/formats/src/v4.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `document/graph-storage/src/schema/value.rs:98` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:406 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:406-420 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:470-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs:440 — editor/src/messages/tool/common_functionality/utility_functions.rs:440-454 | editor/src/messages/tool/common_functionality/utility_functions.rs:475-489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) editor/src/messages/portfolio/document_migration.rs:2284 — editor/src/messages/portfolio/document_migration.rs:2284-2298 | editor/src/messages/portfolio/document_migration.rs:2327-2341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) editor/src/messages/tool/tool_messages/select_tool.rs:2164 — editor/src/messages/tool/tool_messages/select_tool.rs:2164-2178 | editor/src/messages/tool/tool_messages/select_tool.rs:2226-2240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/select_tool.rs:2164` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×5
  • Low cohesion: Session (LCOM4 5) document/graph-storage/src/session.rs:16 — Session's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LayerNodeIdentifier (LCOM4 4) editor/src/messages/portfolio/document/utility_types/document_metadata.rs:399 — LayerNodeIdentifier's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: EditorWrapper (LCOM4 4) frontend/wrapper/src/editor_wrapper.rs:37 — EditorWrapper's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Gradient (LCOM4 4) node-graph/libraries/vector-types/src/gradient.rs:24 — Gradient's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Vector (LCOM4 4) node-graph/libraries/vector-types/src/vector/vector_types.rs:21 — Vector's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · rendering · ×4
  • rendering::renderer::render_vector_item_to_vello (cyclomatic 60) node-graph/libraries/rendering/src/renderer.rs:1716 — rendering::renderer::render_vector_item_to_vello has cyclomatic complexity 60 (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.
  • rendering::renderer::render_vector_shape_svg (cyclomatic 29) node-graph/libraries/rendering/src/renderer.rs:1462 — rendering::renderer::render_vector_shape_svg has cyclomatic complexity 29 (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.
  • rendering::vello_scene_builder::finite_path (cyclomatic 19) node-graph/libraries/rendering/src/vello_scene_builder.rs:253 — rendering::vello_scene_builder::finite_path 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.
  • rendering::renderer::render_graphic_item_to_vello (cyclomatic 16) node-graph/libraries/rendering/src/renderer.rs:876 — rendering::renderer::render_graphic_item_to_vello has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · raster_nodes · ×4
  • raster_nodes::std_nodes::noise_pattern (cyclomatic 33) node-graph/nodes/raster/src/std_nodes.rs:235 — raster_nodes::std_nodes::noise_pattern has cyclomatic complexity 33 (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.
  • raster_nodes::adjustments::selective_color (cyclomatic 22) node-graph/nodes/raster/src/adjustments.rs:1816 — raster_nodes::adjustments::selective_color 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.
  • raster_nodes::color_lookup_table::format_3dl::parse (cyclomatic 16) REDACTED:7 — raster_nodes::color_lookup_table::format_3dl::parse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • raster_nodes::color_lookup_table::format_csp::parse (cyclomatic 16) node-graph/nodes/raster/src/color_lookup_table/format_csp.rs:7 — raster_nodes::color_lookup_table::format_csp::parse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · snapping · ×4
  • snapping::solve::resolve_freely (cyclomatic 25) libraries/snapping/src/solve.rs:454 — snapping::solve::resolve_freely has cyclomatic complexity 25 (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.
  • snapping::constructions::find_constructions (cyclomatic 20) libraries/snapping/src/constructions.rs:98 — snapping::constructions::find_constructions 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.
  • snapping::find::find_near_probe (cyclomatic 19) libraries/snapping/src/find.rs:69 — snapping::find::find_near_probe has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • snapping::solve::solve (cyclomatic 17) libraries/snapping/src/solve.rs:320 — snapping::solve::solve 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.
D2 · Cognitive Complexity · graphite_proc_macros · ×4
  • graphite_proc_macros::editor_commands::editor_commands_impl (cognitive 47) proc-macros/src/editor_commands.rs:7 — graphite_proc_macros::editor_commands::editor_commands_impl has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 23). Of this number, 34 points are the body's own statements and 13 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_proc_macros::helpers::clean_rust_type_syntax (cognitive 40) proc-macros/src/helpers.rs:45 — graphite_proc_macros::helpers::clean_rust_type_syntax has cognitive complexity 40 (threshold 15). Drivers by points: loops 10 (31 pts), if/else 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 26). 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.
  • graphite_proc_macros::discriminant::derive_discriminant_impl (cognitive 21) proc-macros/src/discriminant.rs:6 — graphite_proc_macros::discriminant::derive_discriminant_impl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 4 (9 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphite_proc_macros::message_handler_data_attr::message_handler_data_attr_impl (cognitive 20) proc-macros/src/message_handler_data_attr.rs:6 — graphite_proc_macros::message_handler_data_attr::message_handler_data_attr_impl has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 5 (14 pts), if/else 3 (5 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 · Lattice · ×4
  • Lattice::loop_route (cognitive 43) node-graph/nodes/vector/src/grid_topology.rs:728 — Lattice::loop_route has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 3 (9 pts), boolean chains 4 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lattice::spiral (cognitive 23) node-graph/nodes/vector/src/grid_topology.rs:660 — Lattice::spiral has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 6 (8 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lattice::new (cognitive 20) node-graph/nodes/vector/src/grid_topology.rs:115 — Lattice::new has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Lattice::chain_outline (cognitive 17) node-graph/nodes/vector/src/grid_topology.rs:607 — Lattice::chain_outline has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeNetwork · ×4
  • NodeNetwork::flatten_with_fns (cognitive 39) node-graph/graph-craft/src/compiler/flatten.rs:169 — NodeNetwork::flatten_with_fns has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 6 (8 pts), match/switch 2 (6 pts), boolean chains 3 (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.
  • NodeNetwork::remove_dead_nodes (cognitive 20) node-graph/graph-craft/src/compiler/flatten.rs:112 — NodeNetwork::remove_dead_nodes has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeNetwork::replace_node_with_its_exports (cognitive 17) node-graph/graph-craft/src/compiler/flatten.rs:314 — NodeNetwork::replace_node_with_its_exports has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 2 (5 pts) (nesting depth added 11). 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.
  • NodeNetwork::lift_nested_networks (cognitive 16) node-graph/graph-craft/src/document.rs:590 — NodeNetwork::lift_nested_networks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (5 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · TooManyFields · ×4
  • TooManyFields: PathToolData editor/src/messages/tool/tool_messages/path_tool.rs:588 — TooManyFields — 48 stored fields beside 27 methods. The bar is 30 stored fields; this is 18 over it, 1.60× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: NodeGraphMessageHandler editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:58 — TooManyFields — 41 stored fields beside 39 methods. The bar is 30 stored fields; this is 11 over it, 1.37× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: DocumentMessageHandler editor/src/messages/portfolio/document/document_message_handler.rs:92 — TooManyFields — 34 stored fields beside 85 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
  • TooManyFields: PenToolData editor/src/messages/tool/tool_messages/pen_tool.rs:435 — TooManyFields — 34 stored fields beside 38 methods. The bar is 30 stored fields; this is 4 over it, 1.13× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Change-coupling hub · ×4
  • Change-coupling hub: document_message_handler.rs → export_dialog_message_handler.rs, new_document_dialog_message_handler.rs, node-graph.ts editor/src/messages/portfolio/document/document_message_handler.rs — `editor/src/messages/portfolio/document/document_message_handler.rs` changes together with 3 other files — `editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs`, `editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs`, `frontend/src/stores/node-graph.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: graphic.rs → context_modification.rs, repeat_nodes.rs, vector_modification_nodes.rs node-graph/nodes/graphic/src/graphic.rs — `node-graph/nodes/graphic/src/graphic.rs` changes together with 3 other files — `node-graph/nodes/gcore/src/context_modification.rs`, `node-graph/nodes/repeat/src/repeat_nodes.rs`, `node-graph/nodes/vector/src/vector_modification_nodes.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: vector_nodes.rs → artboard.rs, lib.rs, lib.rs, context_modification.rs, filter.rs, transform_nodes.rs, vector_modification_nodes.rs node-graph/nodes/vector/src/vector_nodes.rs — `node-graph/nodes/vector/src/vector_nodes.rs` changes together with 7 other files — `node-graph/libraries/graphic-types/src/artboard.rs`, `node-graph/libraries/graphic-types/src/lib.rs`, `node-graph/nodes/blending/src/lib.rs`, `node-graph/nodes/gcore/src/context_modification.rs`, `node-graph/nodes/raster/src/filter.rs`, `node-graph/nodes/transform/src/transform_nodes.rs`, `node-graph/nodes/vector/src/vector_modification_nodes.rs` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 7.
  • Change-coupling hub: node_inspector.rs → color_picker_message_handler.rs, graph_operation_message.rs, transform_utils.rs editor/src/messages/portfolio/document/node_graph/node_inspector.rs — `editor/src/messages/portfolio/document/node_graph/node_inspector.rs` changes together with 3 other files — `editor/src/messages/color_picker/color_picker_message_handler.rs`, `editor/src/messages/portfolio/document/graph_operation/graph_operation_message.rs`, `editor/src/messages/portfolio/document/graph_operation/transform_utils.rs` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×4
  • Edited copy of a member (27 corresponding lines) editor/src/messages/tool/tool_messages/artboard_tool.rs:649 — editor/src/messages/tool/tool_messages/artboard_tool.rs:649-675 | editor/src/messages/tool/tool_messages/text_tool.rs:1123-1153 — These two members are one piece of code written twice and then edited apart: 27 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 (27 corresponding lines) document/container/src/backends/opfs.rs:362 — document/container/src/backends/opfs.rs:362-388 | document/container/src/backends/opfs.rs:390-425 — These two members are one piece of code written twice and then edited apart: 27 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 (27 corresponding lines) node-graph/nodes/repeat/src/repeat_nodes.rs:86 — node-graph/nodes/repeat/src/repeat_nodes.rs:86-115 | node-graph/nodes/repeat/src/repeat_nodes.rs:146-172 — These two members are one piece of code written twice and then edited apart: 27 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 (27 corresponding lines) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:531 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:531-557 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:560-586 — These two members are one piece of code written twice and then edited apart: 27 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 (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) node-graph/libraries/vector-types/src/vector/misc.rs:525 — node-graph/libraries/vector-types/src/vector/misc.rs:525-541 | node-graph/libraries/vector-types/src/vector/misc.rs:546-565 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) editor/src/messages/layout/utility_types/widgets/input_widgets.rs:185 — editor/src/messages/layout/utility_types/widgets/input_widgets.rs:185-206 | editor/src/messages/layout/utility_types/widgets/input_widgets.rs:400-416 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) editor/src/node_graph_executor.rs:1082 — editor/src/node_graph_executor.rs:1082-1098 | node-graph/preprocessor/src/value_types.rs:112-131 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:1457 — editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:1457-1473 | editor/src/messages/portfolio/document/data_panel/data_panel_message_handler.rs:1516-1533 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×4
  • Edited copy of a member (4 corresponding lines) node-graph/nodes/vector/src/generator_nodes.rs:43 — node-graph/nodes/vector/src/generator_nodes.rs:43-51 | node-graph/nodes/vector/src/generator_nodes.rs:362-365 — 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) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:714 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:714-717 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:630-633 — 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) node-graph/nodes/vector/src/generator_nodes.rs:171 — node-graph/nodes/vector/src/generator_nodes.rs:171-174 | node-graph/nodes/vector/src/vector_nodes.rs:571-574 — 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) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:30 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:30-33 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:30-33 — 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×4
  • Duplicated block (12–13 lines × 2) editor/src/messages/clipboard/clipboard_message_handler.rs:496 — editor/src/messages/clipboard/clipboard_message_handler.rs:496-507 | editor/src/messages/tool/tool_messages/path_tool.rs:2919-2931 — before extracting anything, compare `editor/src/messages/clipboard/clipboard_message_handler.rs` and `editor/src/messages/tool/tool_messages/path_tool.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/clipboard/clipboard_message_handler.rs:496` 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 (12–13 lines × 2) editor/src/messages/tool/tool_messages/text_tool.rs:873 — editor/src/messages/tool/tool_messages/text_tool.rs:873-885 | editor/src/messages/tool/tool_messages/text_tool.rs:943-954 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/text_tool.rs:873` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 2) node-graph/libraries/rendering/src/renderer.rs:1470 — node-graph/libraries/rendering/src/renderer.rs:1470-1482 | node-graph/libraries/rendering/src/renderer.rs:1734-1745 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12–13 lines × 2) node-graph/nodes/brush/src/basic_brush/convert.rs:68 — node-graph/nodes/brush/src/basic_brush/convert.rs:68-79 | node-graph/nodes/gstd/src/render_pixel_preview.rs:217-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/brush/src/basic_brush/convert.rs:68` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×4
  • Duplicated block (11 lines × 3) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:823 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:823-833 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:707-717 | node-graph/libraries/vector-types/src/vector/algorithms/shapes.rs:152-162 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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 `editor/src/messages/portfolio/document/overlays/utility_types_native.rs:823` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) node-graph/libraries/wgpu-executor/src/vello_render.rs:519 — node-graph/libraries/wgpu-executor/src/vello_render.rs:519-529 | node-graph/libraries/wgpu-executor/src/vello_render.rs:675-685 | node-graph/nodes/gstd/src/render_background.rs:406-416 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/wgpu-executor/src/vello_render.rs:519` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) document/migrations/formats/src/steps/v3_to_v4.rs:379 — document/migrations/formats/src/steps/v3_to_v4.rs:379-389 | document/migrations/formats/src/steps/v3_to_v4.rs:392-402 | document/migrations/formats/src/steps/v3_to_v4.rs:403-413 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `document/migrations/formats/src/steps/v3_to_v4.rs:379` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 3) document/graph-storage/src/schema/value.rs:25 — document/graph-storage/src/schema/value.rs:25-35 | document/migrations/formats/src/v1.rs:399-409 | document/migrations/formats/src/v4.rs:300-310 — before extracting anything, compare `document/graph-storage/src/schema/value.rs` and `document/migrations/formats/src/v4.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `document/graph-storage/src/schema/value.rs:25` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `document/graph-storage/src/schema/value.rs:36` calls `Blob`, `collect_map`, `once` and `document/migrations/formats/src/v1.rs:410` 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 (11 lines × 2 locations) · ×4
  • Duplicated block (11 lines × 2 locations) frontend/src/components/panels/Inspector.svelte:26 — frontend/src/components/panels/Inspector.svelte:26 · frontend/src/components/panels/Inspector.svelte:38 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2 locations) frontend/src/components/panels/Inspector.svelte:81 — frontend/src/components/panels/Inspector.svelte:81 · frontend/src/components/panels/Layers.svelte:745 — 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 (11 lines × 2 locations) frontend/src/components/widgets/inputs/ScrollbarInput.svelte:193 — frontend/src/components/widgets/inputs/ScrollbarInput.svelte:193 · frontend/src/components/widgets/inputs/TransferCurveInput.svelte:268 — 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 (11 lines × 2 locations) frontend/src/components/widgets/inputs/SliderInput.svelte:585 — frontend/src/components/widgets/inputs/SliderInput.svelte:585 · frontend/src/components/widgets/inputs/TransferCurveInput.svelte:250 — 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 (7 lines × 2 locations) · ×4
  • Duplicated block (7 lines × 2 locations) frontend/src/components/panels/Document.svelte:420 — frontend/src/components/panels/Document.svelte:420 · frontend/src/components/panels/Document.svelte:556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2 locations) frontend/src/components/widgets/buttons/ImageButton.svelte:5 — frontend/src/components/widgets/buttons/ImageButton.svelte:5 · frontend/src/components/widgets/labels/ImageLabel.svelte:4 — 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 (7 lines × 2 locations) frontend/src/components/window/Panel.svelte:378 — frontend/src/components/window/Panel.svelte:378 · frontend/src/components/window/Panel.svelte:386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2 locations) frontend/src/utility-functions/persistence.ts:48 — frontend/src/utility-functions/persistence.ts:48 · frontend/src/utility-functions/persistence.ts:115 — 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.
AC1 · Text alternatives · <canvas> without a text alternative · ×3
  • <canvas> without a text alternative frontend/src/components/floating-menus/EyedropperPreview.svelte:60 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative frontend/src/components/panels/Document.svelte:731 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
  • <canvas> without a text alternative frontend/src/components/views/ThumbnailImage.svelte:14 — A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content.
D1 · Cyclomatic Complexity · App · ×3
  • App::handle_desktop_frontend_message (cyclomatic 58) desktop/src/app.rs:235 — App::handle_desktop_frontend_message has cyclomatic complexity 58 (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.
  • App::window_event (cyclomatic 27) desktop/src/app.rs:583 — App::window_event 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.
  • App::user_event (cyclomatic 25) desktop/src/app.rs:467 — App::user_event has cyclomatic complexity 25 (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 · Graphic · ×3
  • Graphic::collect_metadata (cyclomatic 38) node-graph/libraries/rendering/src/renderer.rs:1106 — Graphic::collect_metadata has cyclomatic complexity 38 (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.
  • Graphic::is_guaranteed_fully_transparent (cyclomatic 24) node-graph/libraries/graphic-types/src/graphic.rs:630 — Graphic::is_guaranteed_fully_transparent 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.
  • Graphic::is_guaranteed_fully_opaque (cyclomatic 21) node-graph/libraries/graphic-types/src/graphic.rs:586 — Graphic::is_guaranteed_fully_opaque 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 · text_nodes · ×3
  • text_nodes::json::parse_json_path (cyclomatic 37) node-graph/nodes/text/src/json.rs:295 — text_nodes::json::parse_json_path has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • text_nodes::format_number (cyclomatic 20) node-graph/nodes/text/src/lib.rs:342 — text_nodes::format_number 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.
  • text_nodes::string_capitalization (cyclomatic 19) node-graph/nodes/text/src/lib.rs:817 — text_nodes::string_capitalization 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 · graphite_desktop_ui · ×3
  • graphite_desktop_ui::input::process (cyclomatic 32) desktop/ui/src/input.rs:29 — graphite_desktop_ui::input::process has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • graphite_desktop_ui::resources::load (cyclomatic 27) desktop/ui/src/resources.rs:36 — graphite_desktop_ui::resources::load 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.
  • graphite_desktop_ui::remote::spawn::spawn_host (cyclomatic 16) desktop/ui/src/remote/spawn.rs:80 — graphite_desktop_ui::remote::spawn::spawn_host has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · migration_runner · ×3
  • migration_runner::node::upstream_most (cyclomatic 16) document/migrations/runner/src/node.rs:103 — migration_runner::node::upstream_most has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • migration_runner::node::apply_runs (cyclomatic 16) document/migrations/runner/src/node.rs:153 — migration_runner::node::apply_runs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • migration_runner::node::rewrite_history (cyclomatic 16) document/migrations/runner/src/node.rs:313 — migration_runner::node::rewrite_history has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · NodeGraphMessageHandler · ×3
  • NodeGraphMessageHandler::process_message (cognitive 762) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:144 — NodeGraphMessageHandler::process_message has cognitive complexity 762 (threshold 15). Drivers by points: if/else 248 (575 pts), loops 34 (87 pts), boolean chains 52, match/switch 17 (48 pts) (nesting depth added 411). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeGraphMessageHandler::collate_inspector_sections (cognitive 61) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3526 — NodeGraphMessageHandler::collate_inspector_sections has cognitive complexity 61 (threshold 15). Drivers by points: if/else 20 (47 pts), loops 4 (8 pts), boolean chains 5, match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeGraphMessageHandler::wire_to_insert_on (cognitive 17) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3207 — NodeGraphMessageHandler::wire_to_insert_on has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 2). 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 · LayoutMessageHandler · ×3
  • LayoutMessageHandler::handle_widget_callback (cognitive 125) editor/src/messages/layout/layout_message_handler.rs:205 — LayoutMessageHandler::handle_widget_callback has cognitive complexity 125 (threshold 15). Drivers by points: if/else 26 (76 pts), match/switch 24 (45 pts), loops 1 (4 pts) (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LayoutMessageHandler::get_widget_path (cognitive 38) editor/src/messages/layout/layout_message_handler.rs:145 — LayoutMessageHandler::get_widget_path has cognitive complexity 38 (threshold 15). Drivers by points: if/else 4 (20 pts), loops 5 (16 pts), match/switch 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • LayoutMessageHandler::process_message (cognitive 26) editor/src/messages/layout/layout_message_handler.rs:27 — LayoutMessageHandler::process_message has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · App · ×3
  • App::handle_desktop_frontend_message (cognitive 64) desktop/src/app.rs:235 — App::handle_desktop_frontend_message has cognitive complexity 64 (threshold 15). Drivers by points: if/else 29 (57 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 30). 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.
  • App::window_event (cognitive 31) desktop/src/app.rs:583 — App::window_event has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, match/switch 2 (4 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.
  • App::user_event (cognitive 24) desktop/src/app.rs:467 — App::user_event has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SyncMessageHandler · ×3
  • SyncMessageHandler::process_message (cognitive 58) editor/src/messages/portfolio/sync/sync_message_handler.rs:63 — SyncMessageHandler::process_message has cognitive complexity 58 (threshold 15). Drivers by points: if/else 27 (54 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 28). 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.
  • SyncMessageHandler::apply_dirty (cognitive 30) editor/src/messages/portfolio/sync/sync_message_handler.rs:431 — SyncMessageHandler::apply_dirty has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (4 pts), boolean chains 3 (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.
  • SyncMessageHandler::poll_document (cognitive 19) editor/src/messages/portfolio/sync/sync_message_handler.rs:329 — SyncMessageHandler::poll_document has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (5 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ColorPickerMessageHandler · ×3
  • ColorPickerMessageHandler::apply_gradient_update (cognitive 49) editor/src/messages/color_picker/color_picker_message_handler.rs:385 — ColorPickerMessageHandler::apply_gradient_update has cognitive complexity 49 (threshold 15). Drivers by points: if/else 26 (44 pts), boolean chains 4, 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.
  • ColorPickerMessageHandler::process_message (cognitive 37) editor/src/messages/color_picker/color_picker_message_handler.rs:73 — ColorPickerMessageHandler::process_message has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 5 (9 pts) (nesting depth added 18). 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.
  • ColorPickerMessageHandler::pickers_and_gradient_layout (cognitive 21) editor/src/messages/color_picker/color_picker_message_handler.rs:500 — ColorPickerMessageHandler::pickers_and_gradient_layout has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphite_desktop_ui · ×3
  • graphite_desktop_ui::input::process (cognitive 31) desktop/ui/src/input.rs:29 — graphite_desktop_ui::input::process has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 9 (19 pts), if/else 5 (11 pts), boolean chains 1 (nesting depth added 16). 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.
  • graphite_desktop_ui::remote::spawn::spawn_host (cognitive 22) desktop/ui/src/remote/spawn.rs:80 — graphite_desktop_ui::remote::spawn::spawn_host has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 4 (7 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.
  • graphite_desktop_ui::remote::spawn::event_receiver_loop (cognitive 17) desktop/ui/src/remote/spawn.rs:303 — graphite_desktop_ui::remote::spawn::event_receiver_loop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (5 pts), loops 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 · rawkit · ×3
  • rawkit::postprocessing::gamma_correction::generate_gamma_curve (cognitive 30) libraries/rawkit/src/postprocessing/gamma_correction.rs:28 — rawkit::postprocessing::gamma_correction::generate_gamma_curve has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • rawkit::metadata::camera_data::pseudoinverse (cognitive 29) libraries/rawkit/src/metadata/camera_data.rs:65 — rawkit::metadata::camera_data::pseudoinverse has cognitive complexity 29 (threshold 15). Drivers by points: loops 11 (22 pts), if/else 3 (7 pts) (nesting depth added 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.
  • rawkit::decoder::arw2::sony_arw2_load_raw (cognitive 17) libraries/rawkit/src/decoder/arw2.rs:74 — rawkit::decoder::arw2::sony_arw2_load_raw has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 2 (4 pts), match/switch 1 (4 pts) (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 · PanelLayoutSubdivision · ×3
  • PanelLayoutSubdivision::prune (cognitive 24) editor/src/messages/portfolio/utility_types.rs:502 — PanelLayoutSubdivision::prune has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • PanelLayoutSubdivision::insert_split_adjacent (cognitive 23) editor/src/messages/portfolio/utility_types.rs:663 — PanelLayoutSubdivision::insert_split_adjacent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (23 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.
  • PanelLayoutSubdivision::recalculate_default_sizes (cognitive 18) editor/src/messages/portfolio/utility_types.rs:757 — PanelLayoutSubdivision::recalculate_default_sizes has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graphene_std · ×3
  • graphene_std::render_background::render_background (cognitive 23) node-graph/nodes/gstd/src/render_background.rs:15 — graphene_std::render_background::render_background has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 13). 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.
  • graphene_std::render_cache::split_oversized_region (cognitive 21) node-graph/nodes/gstd/src/render_cache.rs:263 — graphene_std::render_cache::split_oversized_region has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphene_std::render_cache::render_output_cache (cognitive 18) node-graph/nodes/gstd/src/render_cache.rs:321 — graphene_std::render_cache::render_output_cache has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 5 (7 pts), if/else 6, boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SelectedEdges · ×3
  • SelectedEdges::new_size (cognitive 19) editor/src/messages/tool/common_functionality/transformation_cage.rs:99 — SelectedEdges::new_size has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
  • SelectedEdges::skew_transform (cognitive 19) editor/src/messages/tool/common_functionality/transformation_cage.rs:301 — SelectedEdges::skew_transform has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, boolean chains 6. 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.
  • SelectedEdges::snap_stretch (cognitive 17) editor/src/messages/tool/common_functionality/transformation_cage.rs:178 — SelectedEdges::snap_stretch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 5, loops 2, match/switch 2. 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.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×3
  • Edited copy of a member (22 corresponding lines) editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs:29 — editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs:29-50 | editor/src/messages/tool/common_functionality/shapes/rectangle_shape.rs:29-50 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) libraries/math-parser/src/value.rs:504 — libraries/math-parser/src/value.rs:504-525 | libraries/math-parser/src/value.rs:527-548 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:653 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:653-674 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:677-698 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) node-graph/libraries/core-types/src/list.rs:1641 — node-graph/libraries/core-types/src/list.rs:1641-1659 | node-graph/libraries/core-types/src/list.rs:1661-1682 — 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.
  • Edited copy of a member (19 corresponding lines) document/format/src/persist.rs:491 — document/format/src/persist.rs:491-510 | document/format/src/persist.rs:530-548 — 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.
  • Edited copy of a member (19 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1085 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1085-1103 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1007-1025 — 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, 8+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 8+ corresponding lines) document/container/src/backends/opfs.rs:186 — document/container/src/backends/opfs.rs:186-196 | document/container/src/backends/opfs.rs:198-208 | document/container/src/backends/opfs.rs:210-217 — 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.
  • Edited copies of one member (3 members, 8+ corresponding lines) node-graph/nodes/math/src/lib.rs:1827 — node-graph/nodes/math/src/lib.rs:1827-1835 | node-graph/nodes/math/src/lib.rs:1858-1865 | node-graph/nodes/math/src/lib.rs:1887-1894 — 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.
  • Edited copies of one member (3 members, 8+ corresponding lines) node-graph/libraries/rendering/src/renderer.rs:1415 — node-graph/libraries/rendering/src/renderer.rs:1415-1422 | node-graph/libraries/rendering/src/renderer.rs:1424-1431 | node-graph/libraries/rendering/src/renderer.rs:2196-2204 — 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) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1026 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1026-1032 | editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1035-1041 | editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1043-1049 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) document/container/src/backends/opfs.rs:125 — document/container/src/backends/opfs.rs:125-133 | document/container/src/backends/opfs.rs:135-141 | document/container/src/backends/opfs.rs:143-151 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) editor/src/messages/portfolio/utility_types.rs:464 — editor/src/messages/portfolio/utility_types.rs:464-470 | editor/src/messages/portfolio/utility_types.rs:473-479 | editor/src/messages/portfolio/utility_types.rs:482-488 — 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 · Duplicated block (17 lines × 2) · ×3
  • Duplicated block (17 lines × 2) document/migrations/compiled/src/vary_nodes_from_copy_to_points.rs:151 — document/migrations/compiled/src/vary_nodes_from_copy_to_points.rs:151-167 | editor/src/messages/portfolio/document_migration.rs:4191-4207 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (17 lines × 2) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:232 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:232-248 | editor/src/messages/tool/tool_messages/select_tool.rs:944-960 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (17 lines × 2) node-graph/nodes/repeat/src/repeat_nodes.rs:99 — node-graph/nodes/repeat/src/repeat_nodes.rs:99-115 | node-graph/nodes/repeat/src/repeat_nodes.rs:156-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/repeat/src/repeat_nodes.rs:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×3
  • Duplicated block (16 lines × 2) editor/src/messages/layout/utility_types/layout_widget.rs:623 — editor/src/messages/layout/utility_types/layout_widget.rs:623-638 | editor/src/messages/layout/utility_types/layout_widget.rs:639-654 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) node-graph/nodes/transform/src/transform_nodes.rs:43 — node-graph/nodes/transform/src/transform_nodes.rs:43-58 | node-graph/nodes/transform/src/transform_nodes.rs:75-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/transform/src/transform_nodes.rs:43` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) editor/src/messages/portfolio/portfolio_message_handler.rs:100 — editor/src/messages/portfolio/portfolio_message_handler.rs:100-115 | editor/src/messages/portfolio/portfolio_message_handler.rs:230-245 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143-1148 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1158-1163 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1188-1193 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1143` 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) node-graph/libraries/graphic-types/src/graphic.rs:693 — node-graph/libraries/graphic-types/src/graphic.rs:693-698 | node-graph/libraries/graphic-types/src/graphic.rs:712-717 | node-graph/libraries/graphic-types/src/graphic.rs:736-741 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/graphic-types/src/graphic.rs:693` 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 (6 lines × 3) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1136 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1136-1141 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1151-1156 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1166-1171 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
R10 · Code Duplication · Duplicated block (6 lines × 2 locations) · ×3
  • Duplicated block (6 lines × 2 locations) frontend/src/components/widgets/buttons/TextButton.svelte:30 — frontend/src/components/widgets/buttons/TextButton.svelte:30 · frontend/src/components/widgets/inputs/ColorInput.svelte:21 — the 2 copies are spread across 2 files, and the CITED SPAN is a run of MODULE-LEVEL DECLARATIONS — bindings the module declares and exports — rather than statements with a call site. Do not read this as an extract-a-helper row: a call expression cannot stand where a declaration was, and putting one there would delete the names themselves, which are what the rest of the codebase imports. What actually repeats here is the INITIALISER — the same expression shape written once per binding. So give that expression one name (a small helper the initialisers call, or a shared base value they are each derived from) and keep every binding under the name it already has. Where the run is an enumeration — one binding per distinct thing, differing precisely in the thing each one names — the repetition IS the enumeration and collapsing it would delete entries; consider instead whether the set belongs in one exported table the individual names are read out of. Reported because the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2 locations) frontend/src/managers/drag-toggle.ts:23 — frontend/src/managers/drag-toggle.ts:23 · frontend/src/managers/drag-toggle.ts:37 — 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 (6 lines × 2 locations) frontend/src/stores/color-picker.ts:25 — frontend/src/stores/color-picker.ts:25 · frontend/src/stores/fullscreen.ts:12 — 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.
X2 · Cancellation propagation · Async function without AbortSignal · ×3
  • Async function without AbortSignal: fetchJSON website/static/js/page/contributor-guide/bisect-tool.js:13 — `fetchJSON` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: loadDemoArtwork frontend/src/utility-functions/network.ts:50 — `loadDemoArtwork` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: initWasm frontend/src/utility-functions/wasm-loader.ts:6 — `initWasm` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D1 · Cyclomatic Complexity · NodeGraphMessageHandler · ×2
  • NodeGraphMessageHandler::process_message (cyclomatic 442) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:144 — NodeGraphMessageHandler::process_message has cyclomatic complexity 442 (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.
  • NodeGraphMessageHandler::collate_inspector_sections (cyclomatic 30) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3526 — NodeGraphMessageHandler::collate_inspector_sections has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DocumentMessageHandler · ×2
  • DocumentMessageHandler::process_message (cyclomatic 312) editor/src/messages/portfolio/document/document_message_handler.rs:259 — DocumentMessageHandler::process_message has cyclomatic complexity 312 (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.
  • DocumentMessageHandler::selected_layers_reverse (cyclomatic 16) editor/src/messages/portfolio/document/document_message_handler.rs:4126 — DocumentMessageHandler::selected_layers_reverse has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LayoutMessageHandler · ×2
  • LayoutMessageHandler::handle_widget_callback (cyclomatic 80) editor/src/messages/layout/layout_message_handler.rs:205 — LayoutMessageHandler::handle_widget_callback has cyclomatic complexity 80 (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.
  • LayoutMessageHandler::process_message (cyclomatic 23) editor/src/messages/layout/layout_message_handler.rs:27 — LayoutMessageHandler::process_message 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 · Lexer · ×2
  • Lexer::next_token (cyclomatic 52) libraries/math-parser/src/lexer.rs:484 — Lexer::next_token has cyclomatic complexity 52 (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.
  • Lexer::lex_number (cyclomatic 19) libraries/math-parser/src/lexer.rs:402 — Lexer::lex_number has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: Token::fmt (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · cargo_run · ×2
  • cargo_run::requirements::check (cyclomatic 42) tools/cargo-run/src/requirements.rs:103 — cargo_run::requirements::check has cyclomatic complexity 42 (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.
  • cargo_run::run_task (cyclomatic 21) tools/cargo-run/src/main.rs:124 — cargo_run::run_task 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 · ColorPickerMessageHandler · ×2
  • ColorPickerMessageHandler::process_message (cyclomatic 39) editor/src/messages/color_picker/color_picker_message_handler.rs:73 — ColorPickerMessageHandler::process_message has cyclomatic complexity 39 (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.
  • ColorPickerMessageHandler::apply_gradient_update (cyclomatic 33) editor/src/messages/color_picker/color_picker_message_handler.rs:385 — ColorPickerMessageHandler::apply_gradient_update has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SyncMessageHandler · ×2
  • SyncMessageHandler::process_message (cyclomatic 39) editor/src/messages/portfolio/sync/sync_message_handler.rs:63 — SyncMessageHandler::process_message has cyclomatic complexity 39 (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.
  • SyncMessageHandler::poll_document (cyclomatic 24) editor/src/messages/portfolio/sync/sync_message_handler.rs:329 — SyncMessageHandler::poll_document 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 · PathToolData · ×2
  • PathToolData::mouse_down (cyclomatic 35) editor/src/messages/tool/tool_messages/path_tool.rs:756 — PathToolData::mouse_down 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.
  • PathToolData::drag (cyclomatic 23) editor/src/messages/tool/tool_messages/path_tool.rs:1429 — PathToolData::drag 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 · Gdd · ×2
  • Gdd::stream_entries (cyclomatic 32) document/format/src/export.rs:141 — Gdd::stream_entries 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.
  • Gdd::open_stored (cyclomatic 17) document/format/src/lib.rs:286 — Gdd::open_stored 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 · graphene_cli · ×2
  • graphene_cli::dump::print (cyclomatic 32) node-graph/graphene-cli/src/dump.rs:85 — graphene_cli::dump::print 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.
  • graphene_cli::main (cyclomatic 16) node-graph/graphene-cli/src/main.rs:118 — graphene_cli::main has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PointRadiusHandle · ×2
  • PointRadiusHandle::overlays (cyclomatic 27) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:154 — PointRadiusHandle::overlays 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.
  • PointRadiusHandle::handle_actions (cyclomatic 19) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:62 — PointRadiusHandle::handle_actions 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 · document_graph_storage · ×2
  • document_graph_storage::prior::restore (cyclomatic 26) document/graph-storage/src/prior.rs:89 — document_graph_storage::prior::restore 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.
  • document_graph_storage::delta::compute_deltas (cyclomatic 21) document/graph-storage/src/delta.rs:17 — document_graph_storage::delta::compute_deltas has cyclomatic complexity 21 (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 · graphite_proc_macros · ×2
  • graphite_proc_macros::editor_commands::editor_commands_impl (cyclomatic 24) proc-macros/src/editor_commands.rs:7 — graphite_proc_macros::editor_commands::editor_commands_impl has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • graphite_proc_macros::helpers::clean_rust_type_syntax (cyclomatic 18) proc-macros/src/helpers.rs:45 — graphite_proc_macros::helpers::clean_rust_type_syntax has cyclomatic complexity 18 (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 · graph_craft · ×2
  • graph_craft::document::value::deserialize_tagged_value_with_legacy_migration (cyclomatic 21) node-graph/graph-craft/src/document/value.rs:774 — graph_craft::document::value::deserialize_tagged_value_with_legacy_migration 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.
  • graph_craft::application_io::http::send (cyclomatic 16) node-graph/graph-craft/src/application_io/http.rs:42 — graph_craft::application_io::http::send 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 · editor_message_tree · ×2
  • editor_message_tree::write_tree_txt_node (cyclomatic 21) tools/editor-message-tree/src/main.rs:49 — editor_message_tree::write_tree_txt_node 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.
  • editor_message_tree::write_tree_html_node (cyclomatic 18) tools/editor-message-tree/src/main.rs:172 — editor_message_tree::write_tree_html_node has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SelectedEdges · ×2
  • SelectedEdges::snap_stretch (cyclomatic 20) editor/src/messages/tool/common_functionality/transformation_cage.rs:178 — SelectedEdges::snap_stretch 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.
  • SelectedEdges::new_size (cyclomatic 18) editor/src/messages/tool/common_functionality/transformation_cage.rs:99 — SelectedEdges::new_size has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VectorModification · ×2
  • VectorModification::chain_legacy_segments (cyclomatic 20) node-graph/libraries/vector-types/src/vector/vector_modification.rs:898 — VectorModification::chain_legacy_segments 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.
  • VectorModification::modify (cyclomatic 16) node-graph/libraries/vector-types/src/vector/vector_modification.rs:824 — VectorModification::modify has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sorter · ×2
  • Sorter::sort (cyclomatic 19) libraries/math-parser/src/sort.rs:300 — Sorter::sort 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.
  • Sorter::call (cyclomatic 16) libraries/math-parser/src/sort.rs:471 — Sorter::call 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 · Lattice · ×2
  • Lattice::loop_route (cyclomatic 18) node-graph/nodes/vector/src/grid_topology.rs:728 — Lattice::loop_route 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.
  • Lattice::spiral (cyclomatic 17) node-graph/nodes/vector/src/grid_topology.rs:660 — Lattice::spiral has cyclomatic complexity 17 (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.
D17 · Explicit Debt · HackComment · ×2
  • HackComment node-graph/interpreted-executor/src/dynamic_executor.rs:151 — // Hack to undo rank promotion while traversing the graph — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment editor/src/messages/input_mapper/input_mappings.rs:55 — // Hack to prevent Left Click + Accel + Z combo (this effectively blocks you from making a double undo with AbortTransaction) — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · cargo_run · ×2
  • cargo_run::requirements::check (cognitive 90) tools/cargo-run/src/requirements.rs:103 — cargo_run::requirements::check has cognitive complexity 90 (threshold 15). Drivers by points: if/else 22 (45 pts), match/switch 8 (29 pts), loops 6 (10 pts), boolean chains 6 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • cargo_run::cmd::supervise (cognitive 24) tools/cargo-run/src/cmd.rs:194 — cargo_run::cmd::supervise has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 8 (11 pts), match/switch 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 · graphene_cli · ×2
  • graphene_cli::dump::print (cognitive 77) node-graph/graphene-cli/src/dump.rs:85 — graphene_cli::dump::print has cognitive complexity 77 (threshold 15). Drivers by points: if/else 19 (42 pts), loops 9 (21 pts), match/switch 4 (9 pts), boolean chains 5 (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • graphene_cli::main (cognitive 20) node-graph/graphene-cli/src/main.rs:118 — graphene_cli::main has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (2 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointRadiusHandle · ×2
  • PointRadiusHandle::overlays (cognitive 64) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:154 — PointRadiusHandle::overlays has cognitive complexity 64 (threshold 15). Drivers by points: if/else 21 (55 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 39). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • PointRadiusHandle::handle_actions (cognitive 46) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:62 — PointRadiusHandle::handle_actions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (37 pts), loops 2 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 28). 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 · Lexer · ×2
  • Lexer::next_token (cognitive 42) libraries/math-parser/src/lexer.rs:484 — Lexer::next_token has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 7, match/switch 3 (5 pts), loops 1 (3 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.
  • Lexer::lex_number (cognitive 20) libraries/math-parser/src/lexer.rs:402 — Lexer::lex_number has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · editor_message_tree · ×2
  • editor_message_tree::write_tree_txt_node (cognitive 42) tools/editor-message-tree/src/main.rs:49 — editor_message_tree::write_tree_txt_node has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (31 pts), loops 4 (9 pts), boolean chains 2 (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.
  • editor_message_tree::write_tree_html_node (cognitive 24) tools/editor-message-tree/src/main.rs:172 — editor_message_tree::write_tree_html_node has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 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 · document_graph_storage · ×2
  • document_graph_storage::delta::compute_deltas (cognitive 40) document/graph-storage/src/delta.rs:17 — document_graph_storage::delta::compute_deltas has cognitive complexity 40 (threshold 15). Drivers by points: loops 13 (23 pts), if/else 7 (17 pts) (nesting depth added 20). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • document_graph_storage::prior::restore (cognitive 26) document/graph-storage/src/prior.rs:89 — document_graph_storage::prior::restore has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 4 (11 pts), loops 1 (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 · Preprocessor · ×2
  • Preprocessor::new (cognitive 33) node-graph/preprocessor/src/lib.rs:185 — Preprocessor::new has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (9 pts), match/switch 2 (4 pts), boolean chains 3 (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.
  • Preprocessor::replace_inputs_with_producer_nodes (cognitive 16) node-graph/preprocessor/src/lib.rs:84 — Preprocessor::replace_inputs_with_producer_nodes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PointModification · ×2
  • PointModification::apply (cognitive 32) node-graph/libraries/vector-types/src/vector/vector_modification.rs:31 — PointModification::apply has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 4 (6 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.
  • PointModification::move_in_place (cognitive 22) node-graph/libraries/vector-types/src/vector/vector_modification.rs:107 — PointModification::move_in_place has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph_craft · ×2
  • graph_craft::document::value::deserialize_tagged_value_with_legacy_migration (cognitive 30) node-graph/graph-craft/src/document/value.rs:774 — graph_craft::document::value::deserialize_tagged_value_with_legacy_migration has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (24 pts), boolean chains 4, match/switch 1 (2 pts) (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.
  • graph_craft::application_io::http::send (cognitive 16) node-graph/graph-craft/src/application_io/http.rs:42 — graph_craft::application_io::http::send has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (5 pts), boolean chains 3 (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 · SnapSession · ×2
  • SnapSession::snap_features (cognitive 29) editor/src/messages/tool/common_functionality/snap_session.rs:206 — SnapSession::snap_features has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 4, match/switch 2 (3 pts), loops 1 (2 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.
  • SnapSession::draw_overlays (cognitive 16) editor/src/messages/tool/common_functionality/snap_session/presenter.rs:16 — SnapSession::draw_overlays has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), loops 4 (6 pts), match/switch 1 (2 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 · NumberOfPointsDial · ×2
  • NumberOfPointsDial::overlays (cognitive 27) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:101 — NumberOfPointsDial::overlays has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 4, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • NumberOfPointsDial::handle_actions (cognitive 18) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/number_of_points_dial.rs:53 — NumberOfPointsDial::handle_actions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 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 · document_container · ×2
  • document_container::backends::opfs::drain_queue (cognitive 25) document/container/src/backends/opfs.rs:241 — document_container::backends::opfs::drain_queue has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (2 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.
  • document_container::backends::opfs::list_entries (cognitive 17) document/container/src/backends/opfs.rs:446 — document_container::backends::opfs::list_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VectorModification · ×2
  • VectorModification::chain_legacy_segments (cognitive 25) node-graph/libraries/vector-types/src/vector/vector_modification.rs:898 — VectorModification::chain_legacy_segments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 4, match/switch 3 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VectorModification::follow_segments_turned_elsewhere (cognitive 19) node-graph/libraries/vector-types/src/vector/vector_modification.rs:1040 — VectorModification::follow_segments_turned_elsewhere has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SegmentGraph · ×2
  • SegmentGraph::face_orbits (cognitive 23) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:323 — SegmentGraph::face_orbits has cognitive complexity 23 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 3 (10 pts) (nesting depth added 13). 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.
  • SegmentGraph::construct_faces (cognitive 22) node-graph/libraries/vector-types/src/vector/vector_attributes.rs:466 — SegmentGraph::construct_faces has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 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 · graphite_desktop · ×2
  • graphite_desktop::socket::run (cognitive 22) desktop/src/socket.rs:56 — graphite_desktop::socket::run has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (9 pts), loops 1 (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.
  • graphite_desktop::start (cognitive 18) desktop/src/lib.rs:31 — graphite_desktop::start has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (9 pts), if/else 6 (7 pts), boolean chains 1, loops 1 (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 · SweepAngleGizmo · ×2
  • SweepAngleGizmo::overlays (cognitive 22) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/sweep_angle_gizmo.rs:97 — SweepAngleGizmo::overlays has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • SweepAngleGizmo::handle_actions (cognitive 17) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/sweep_angle_gizmo.rs:61 — SweepAngleGizmo::handle_actions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (17 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 · NodeRuntime · ×2
  • NodeRuntime::run (cognitive 20) editor/src/node_graph_executor/runtime.rs:241 — NodeRuntime::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • NodeRuntime::process_monitor_nodes (cognitive 17) editor/src/node_graph_executor/runtime.rs:466 — NodeRuntime::process_monitor_nodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Sorter · ×2
  • Sorter::clause (cognitive 18) libraries/math-parser/src/sort.rs:683 — Sorter::clause has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Sorter::call (cognitive 16) libraries/math-parser/src/sort.rs:471 — Sorter::call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×2
  • Edited copy of a member (65 corresponding lines) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:147 — node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:147-211 | node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:145-223 — These two members are one piece of code written twice and then edited apart: 65 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 (65 corresponding lines) editor/src/messages/dialog/simple_dialogs/failed_to_load_documents_dialog.rs:46 — editor/src/messages/dialog/simple_dialogs/failed_to_load_documents_dialog.rs:46-112 | editor/src/messages/dialog/simple_dialogs/failed_to_open_document_dialog.rs:19-83 — These two members are one piece of code written twice and then edited apart: 65 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) · ×2
  • Edited copy of a member (38 corresponding lines) node-graph/nodes/raster/src/filter.rs:210 — node-graph/nodes/raster/src/filter.rs:210-255 | node-graph/nodes/raster/src/filter.rs:261-298 — 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.
  • Edited copy of a member (38 corresponding lines) editor/src/messages/layout/utility_types/layout_widget.rs:275 — editor/src/messages/layout/utility_types/layout_widget.rs:275-312 | editor/src/messages/layout/utility_types/layout_widget.rs:325-364 — 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 copy of a member (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) editor/src/messages/tool/tool_messages/select_tool.rs:565 — editor/src/messages/tool/tool_messages/select_tool.rs:565-602 | editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:749-776 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:685 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:685-712 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:558-592 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 14+ corresponding lines) document/graph-storage/src/schema/value.rs:24 — document/graph-storage/src/schema/value.rs:24-38 | document/migrations/formats/src/v1.rs:398-411 | document/migrations/formats/src/v4.rs:299-313 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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, 14+ corresponding lines) document/migrations/formats/src/steps/v3_to_v4.rs:45 — document/migrations/formats/src/steps/v3_to_v4.rs:45-66 | document/migrations/formats/src/steps/v3_to_v4.rs:142-163 | document/migrations/formats/src/steps/v3_to_v4.rs:197-210 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 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, 17+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 17+ corresponding lines) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:321 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:321-346 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:349-381 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:649-665 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 17+ corresponding lines) node-graph/libraries/graphic-types/src/graphic.rs:687 — node-graph/libraries/graphic-types/src/graphic.rs:687-703 | node-graph/libraries/graphic-types/src/graphic.rs:706-722 | node-graph/libraries/graphic-types/src/graphic.rs:725-746 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×2
  • Edited copy of a member (18 corresponding lines) libraries/rawkit/src/lib.rs:235 — libraries/rawkit/src/lib.rs:235-252 | libraries/rawkit/src/lib.rs:269-287 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3133 — editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3133-3151 | editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3153-3170 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 11+ corresponding lines) editor/src/messages/tool/tool_messages/brush_tool.rs:581 — editor/src/messages/tool/tool_messages/brush_tool.rs:581-591 | editor/src/messages/tool/tool_messages/eyedropper_tool.rs:177-189 | editor/src/messages/tool/tool_messages/fill_tool.rs:225-235 | editor/src/messages/tool/tool_messages/freehand_tool.rs:388-399 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
  • Edited copies of one member (4 members, 11+ corresponding lines) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:84 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:84-95 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:97-107 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:109-119 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:237-247 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) node-graph/libraries/rendering/src/renderer.rs:963 — node-graph/libraries/rendering/src/renderer.rs:963-974 | node-graph/libraries/rendering/src/renderer.rs:1025-1038 | node-graph/libraries/rendering/src/renderer.rs:1041-1054 — 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) editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:138 — editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:138-149 | editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:152-164 | editor/src/messages/portfolio/document/utility_types/network_interface/layout.rs:928-940 — 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 · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:103 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:103-125 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:90-112 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) editor/src/messages/tool/common_functionality/graph_modification_utils.rs:925 — editor/src/messages/tool/common_functionality/graph_modification_utils.rs:925-947 | editor/src/messages/tool/common_functionality/graph_modification_utils.rs:964-986 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/graph_modification_utils.rs:925` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×2
  • Duplicated block (22–23 lines × 2) editor/src/messages/tool/tool_messages/pen_tool.rs:2215 — editor/src/messages/tool/tool_messages/pen_tool.rs:2215-2237 | editor/src/messages/tool/tool_messages/pen_tool.rs:2254-2275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/pen_tool.rs:2215` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (22–23 lines × 2) node-graph/libraries/graphic-types/src/graphic.rs:223 — node-graph/libraries/graphic-types/src/graphic.rs:223-245 | node-graph/nodes/path-bool/src/lib.rs:251-272 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) editor/src/messages/tool/tool_messages/gradient_tool.rs:714 — editor/src/messages/tool/tool_messages/gradient_tool.rs:714-735 | editor/src/messages/tool/tool_messages/gradient_tool.rs:760-781 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) node-graph/libraries/rendering/src/renderer.rs:1863 — node-graph/libraries/rendering/src/renderer.rs:1863-1884 | node-graph/libraries/rendering/src/renderer.rs:1953-1974 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/rendering/src/renderer.rs:1863` 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 (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:135 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:135-155 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:139-159 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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 `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:135` 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 (21 lines × 2) editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:537 — editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:537-557 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:566-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:537` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:1054 — editor/src/messages/portfolio/document/document_message_handler.rs:1054-1072 | editor/src/messages/portfolio/document/document_message_handler.rs:1115-1132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18–19 lines × 2) editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:1025 — editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:1025-1043 | editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:1054-1071 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:1025` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:636 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:636-653 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:772-789 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) node-graph/node-macro/src/validation.rs:164 — node-graph/node-macro/src/validation.rs:164-181 | node-graph/node-macro/src/validation.rs:210-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/node-macro/src/validation.rs:164` 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 (13 lines × 3) · ×2
  • Duplicated block (13 lines × 3) editor/src/messages/tool/common_functionality/shapes/arc_shape.rs:166 — editor/src/messages/tool/common_functionality/shapes/arc_shape.rs:166-178 | editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:142-154 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:146-158 — before extracting anything, compare `editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs` and `editor/src/messages/tool/common_functionality/shapes/star_shape.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 84 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.
  • Duplicated block (13 lines × 3) frontend/wrapper/src/editor_commands.rs:353 — frontend/wrapper/src/editor_commands.rs:353-365 | frontend/wrapper/src/editor_commands.rs:391-403 | frontend/wrapper/src/editor_commands.rs:421-433 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) editor/src/messages/menu_bar/menu_bar_message_handler.rs:749 — editor/src/messages/menu_bar/menu_bar_message_handler.rs:749-758 | editor/src/messages/menu_bar/menu_bar_message_handler.rs:763-772 | editor/src/messages/menu_bar/menu_bar_message_handler.rs:777-786 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/menu_bar/menu_bar_message_handler.rs:749` 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 (10 lines × 3) editor/src/messages/portfolio/document/document_message_handler.rs:1848 — editor/src/messages/portfolio/document/document_message_handler.rs:1848-1857 | editor/src/messages/portfolio/document/document_message_handler.rs:1877-1886 | editor/src/messages/portfolio/document/document_message_handler.rs:1891-1900 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) editor/src/messages/portfolio/document_migration.rs:2343 — editor/src/messages/portfolio/document_migration.rs:2343-2351 | editor/src/messages/portfolio/document_migration.rs:2364-2373 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:2343` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) node-graph/libraries/rendering/src/render_ext.rs:90 — node-graph/libraries/rendering/src/render_ext.rs:90-98 | node-graph/libraries/rendering/src/renderer.rs:649-658 — 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 `node-graph/libraries/rendering/src/render_ext.rs:90` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `node-graph/libraries/rendering/src/renderer.rs:660` calls `is_empty`, `push` and `node-graph/libraries/rendering/src/render_ext.rs:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 3) · ×2
  • Duplicated block (8–9 lines × 3) editor/src/messages/portfolio/document_migration.rs:1549 — editor/src/messages/portfolio/document_migration.rs:1549-1556 | editor/src/messages/portfolio/document_migration.rs:1610-1617 | editor/src/messages/portfolio/document_migration.rs:1668-1676 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8–9 lines × 3) node-graph/libraries/rendering/src/render_ext.rs:284 — node-graph/libraries/rendering/src/render_ext.rs:284-292 | node-graph/libraries/rendering/src/renderer.rs:1875-1882 | node-graph/libraries/rendering/src/renderer.rs:1965-1972 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `node-graph/libraries/rendering/src/render_ext.rs:293` calls `GradientList` and `node-graph/libraries/rendering/src/renderer.rs:1883` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×2
  • Duplicated block (10 lines × 4) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:780 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:780-789 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:803-812 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:831-840 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:844-853 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 4) desktop/ui/src/internal/display_handler.rs:132 — desktop/ui/src/internal/display_handler.rs:132-141 | desktop/ui/src/internal/load_handler.rs:37-46 | desktop/ui/src/internal/request_handler.rs:74-83 | desktop/ui/src/internal/scheme_handler_factory.rs:51-60 — 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) · ×2
  • Duplicated block (8 lines × 3) editor/src/messages/tool/tool_messages/freehand_tool.rs:110 — editor/src/messages/tool/tool_messages/freehand_tool.rs:110-117 | editor/src/messages/tool/tool_messages/pen_tool.rs:174-181 | editor/src/messages/tool/tool_messages/spline_tool.rs:117-124 — 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 `editor/src/messages/tool/tool_messages/freehand_tool.rs:110` 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 (8 lines × 3) node-graph/nodes/gstd/src/render_background.rs:216 — node-graph/nodes/gstd/src/render_background.rs:216-223 | node-graph/nodes/gstd/src/render_background.rs:245-252 | node-graph/nodes/gstd/src/render_background.rs:287-294 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/gstd/src/render_background.rs:216` 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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1124 — editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1124-1130 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1141-1147 | editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1156-1162 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs:1124` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 3) editor/src/messages/tool/common_functionality/utility_functions.rs:294 — editor/src/messages/tool/common_functionality/utility_functions.rs:294-300 | editor/src/messages/tool/common_functionality/utility_functions.rs:341-350 | editor/src/messages/tool/common_functionality/utility_functions.rs:380-386 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/utility_functions.rs:294` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) editor/src/messages/portfolio/document_migration.rs:2772 — editor/src/messages/portfolio/document_migration.rs:2772-2776 | editor/src/messages/portfolio/document_migration.rs:3129-3133 | editor/src/messages/portfolio/document_migration.rs:3142-3146 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document_migration.rs:2770` calls `replace_implementation` and `editor/src/messages/portfolio/document_migration.rs:3126` 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 (5 lines × 3) libraries/math-parser/src/executer.rs:389 — libraries/math-parser/src/executer.rs:389-393 | libraries/math-parser/src/executer.rs:493-497 | libraries/math-parser/src/executer.rs:545-549 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `libraries/math-parser/src/executer.rs:389` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
R7 · Dead Code · Dead file (~102 LoC) · ×2
  • Dead file (~102 LoC) frontend/src/managers/input.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~102 LoC) frontend/src/subscriptions-router.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark frontend/index.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D1 · Cyclomatic Complexity · PathToolFsmState · ×1
  • PathToolFsmState::transition (cyclomatic 273) editor/src/messages/tool/tool_messages/path_tool.rs:1576 — PathToolFsmState::transition has cyclomatic complexity 273 (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 · SelectToolFsmState · ×1
  • SelectToolFsmState::transition (cyclomatic 189) editor/src/messages/tool/tool_messages/select_tool.rs:901 — SelectToolFsmState::transition has cyclomatic complexity 189 (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 · PortfolioMessageHandler · ×1
  • PortfolioMessageHandler::process_message (cyclomatic 171) editor/src/messages/portfolio/portfolio_message_handler.rs:79 — PortfolioMessageHandler::process_message has cyclomatic complexity 171 (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 · GradientToolFsmState · ×1
  • GradientToolFsmState::transition (cyclomatic 136) editor/src/messages/tool/tool_messages/gradient_tool.rs:926 — GradientToolFsmState::transition has cyclomatic complexity 136 (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 · PenToolFsmState · ×1
  • PenToolFsmState::transition (cyclomatic 134) editor/src/messages/tool/tool_messages/pen_tool.rs:1602 — PenToolFsmState::transition has cyclomatic complexity 134 (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 · ShapeToolFsmState · ×1
  • ShapeToolFsmState::transition (cyclomatic 103) editor/src/messages/tool/tool_messages/shape_tool.rs:874 — ShapeToolFsmState::transition has cyclomatic complexity 103 (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 · TransformLayerMessageHandler · ×1
  • TransformLayerMessageHandler::process_message (cyclomatic 100) editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:112 — TransformLayerMessageHandler::process_message has cyclomatic complexity 100 (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 · ClipboardMessageHandler · ×1
  • ClipboardMessageHandler::process_message (cyclomatic 93) editor/src/messages/clipboard/clipboard_message_handler.rs:57 — ClipboardMessageHandler::process_message has cyclomatic complexity 93 (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 · GraphOperationMessageHandler · ×1
  • GraphOperationMessageHandler::process_message (cyclomatic 81) editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:34 — GraphOperationMessageHandler::process_message has cyclomatic complexity 81 (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 · NavigationMessageHandler · ×1
  • NavigationMessageHandler::process_message (cyclomatic 80) editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:41 — NavigationMessageHandler::process_message has cyclomatic complexity 80 (threshold 15). Of this number, 77 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 · WorkspaceMessageHandler · ×1
  • WorkspaceMessageHandler::process_message (cyclomatic 78) editor/src/messages/portfolio/workspace/workspace_message_handler.rs:21 — WorkspaceMessageHandler::process_message has cyclomatic complexity 78 (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 · TextToolFsmState · ×1
  • TextToolFsmState::transition (cyclomatic 65) editor/src/messages/tool/tool_messages/text_tool.rs:645 — TextToolFsmState::transition has cyclomatic complexity 65 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToolMessageHandler · ×1
  • ToolMessageHandler::handle_message (cyclomatic 52) editor/src/messages/tool/tool_message_handler.rs:44 — ToolMessageHandler::handle_message has cyclomatic complexity 52 (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 · Replica · ×1
  • Replica::handle_packet (cyclomatic 49) document/peer-transport/src/replica.rs:595 — Replica::handle_packet 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 · Key · ×1
  • Key::fmt (cyclomatic 49) editor/src/messages/input_mapper/utility_types/keyboard.rs:248 — Key::fmt 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 · InputState · ×1
  • InputState::process (cyclomatic 46) desktop/src/input.rs:95 — InputState::process 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 · ArtboardToolFsmState · ×1
  • ArtboardToolFsmState::transition (cyclomatic 45) editor/src/messages/tool/tool_messages/artboard_tool.rs:323 — ArtboardToolFsmState::transition has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeGraphExecutor · ×1
  • NodeGraphExecutor::poll_node_graph_evaluation (cyclomatic 43) editor/src/node_graph_executor.rs:452 — NodeGraphExecutor::poll_node_graph_evaluation has cyclomatic complexity 43 (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 · Dispatcher · ×1
  • Dispatcher::handle_message (cyclomatic 42) editor/src/dispatcher.rs:159 — Dispatcher::handle_message has cyclomatic complexity 42 (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 · Document · ×1
  • Document::apply_op_with (cyclomatic 40) document/graph-storage/src/document.rs:222 — Document::apply_op_with has cyclomatic complexity 40 (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 · SegmentModification · ×1
  • SegmentModification::apply (cyclomatic 39) node-graph/libraries/vector-types/src/vector/vector_modification.rs:234 — SegmentModification::apply has cyclomatic complexity 39 (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 · SplineToolFsmState · ×1
  • SplineToolFsmState::transition (cyclomatic 36) editor/src/messages/tool/tool_messages/spline_tool.rs:330 — SplineToolFsmState::transition 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 · WorkingVector · ×1
  • WorkingVector::reweave (cyclomatic 35) node-graph/libraries/vector-types/src/vector/flatten.rs:98 — WorkingVector::reweave 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 · input.shouldRedirectKeyboardEventToBackend (cyclomatic 33) · ×1
  • input.shouldRedirectKeyboardEventToBackend (cyclomatic 33) frontend/src/utility-functions/input.ts:29 — input.shouldRedirectKeyboardEventToBackend has cyclomatic complexity 33 (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 · ShapeTool · ×1
  • ShapeTool::process_message (cyclomatic 32) editor/src/messages/tool/tool_messages/shape_tool.rs:542 — ShapeTool::process_message 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 · ValueNode · ×1
  • ValueNode::eval_in (cyclomatic 31) libraries/math-parser/src/executer.rs:334 — ValueNode::eval_in 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 · membership.window.addEventListener("DOMContentLoaded") · ×1
  • membership.window.addEventListener("DOMContentLoaded")::update (cyclomatic 31) REDACTED:422 — membership.window.addEventListener("DOMContentLoaded")::update has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (membership.window.addEventListener("DOMContentLoaded")) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · GradientTool · ×1
  • GradientTool::process_message (cyclomatic 29) editor/src/messages/tool/tool_messages/gradient_tool.rs:90 — GradientTool::process_message 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 · path_bool_nodes · ×1
  • path_bool_nodes::flatten_vector (cyclomatic 29) node-graph/nodes/path-bool/src/lib.rs:196 — path_bool_nodes::flatten_vector has cyclomatic complexity 29 (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 · ResourceMessageHandler · ×1
  • ResourceMessageHandler::process_message (cyclomatic 28) editor/src/messages/portfolio/document/resource/resource_message_handler.rs:28 — ResourceMessageHandler::process_message has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IngestMessageHandler · ×1
  • IngestMessageHandler::process_message (cyclomatic 28) editor/src/messages/portfolio/ingest/ingest_message_handler.rs:20 — IngestMessageHandler::process_message has cyclomatic complexity 28 (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 · SelectedGradient · ×1
  • SelectedGradient::update_gradient (cyclomatic 28) editor/src/messages/tool/tool_messages/gradient_tool.rs:628 — SelectedGradient::update_gradient has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeFnAttributes · ×1
  • NodeFnAttributes::parse (cyclomatic 28) node-graph/node-macro/src/parsing.rs:436 — NodeFnAttributes::parse has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DiffUpdate · ×1
  • DiffUpdate::apply_keyboard_shortcut (cyclomatic 27) editor/src/messages/layout/utility_types/layout_widget.rs:1057 — DiffUpdate::apply_keyboard_shortcut has cyclomatic complexity 27 (threshold 15). Of this number, 21 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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 · HistoryMessageHandler · ×1
  • HistoryMessageHandler::process_message (cyclomatic 26) editor/src/messages/portfolio/history/history_message_handler.rs:35 — HistoryMessageHandler::process_message 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 · NodeNetwork · ×1
  • NodeNetwork::flatten_with_fns (cyclomatic 26) node-graph/graph-craft/src/compiler/flatten.rs:169 — NodeNetwork::flatten_with_fns 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 · EditorSession · ×1
  • EditorSession::dispatch (cyclomatic 26) tools/web-editor-driver/src/session.rs:160 — EditorSession::dispatch 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 · DialogMessageHandler · ×1
  • DialogMessageHandler::process_message (cyclomatic 25) editor/src/messages/dialog/dialog_message_handler.rs:26 — DialogMessageHandler::process_message 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 · graphic_types · ×1
  • graphic_types::graphic::flatten_graphic_list::flatten_recursive (cyclomatic 25) node-graph/libraries/graphic-types/src/graphic.rs:191 — graphic_types::graphic::flatten_graphic_list::flatten_recursive has cyclomatic complexity 25 (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 · InputPreprocessorMessageHandler · ×1
  • InputPreprocessorMessageHandler::process_message (cyclomatic 24) editor/src/messages/input_preprocessor/input_preprocessor_message_handler.rs:40 — InputPreprocessorMessageHandler::process_message 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 · BoundingBoxManager · ×1
  • BoundingBoxManager::check_selected_edges (cyclomatic 24) editor/src/messages/tool/common_functionality/transformation_cage.rs:669 — BoundingBoxManager::check_selected_edges has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextTool · ×1
  • TextTool::process_message (cyclomatic 24) editor/src/messages/tool/tool_messages/text_tool.rs:285 — TextTool::process_message has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graphene_std · ×1
  • graphene_std::render_cache::render_output_cache (cyclomatic 24) node-graph/nodes/gstd/src/render_cache.rs:321 — graphene_std::render_cache::render_output_cache 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 · EditorDelta · ×1
  • EditorDelta::construct (cyclomatic 23) editor/src/messages/portfolio/document/utility_types/network_interface/editor_delta.rs:159 — EditorDelta::construct 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 · MatrixNode · ×1
  • MatrixNode::eval_in (cyclomatic 23) libraries/math-parser/src/executer.rs:517 — MatrixNode::eval_in 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 · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 23) · ×1
  • membership.window.addEventListener("DOMContentLoaded") (cyclomatic 23) REDACTED:24 — membership.window.addEventListener("DOMContentLoaded") has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 87, commit, a function literal at line 136, …). 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 · Curve · ×1
  • Curve::subdivision_intersections (cyclomatic 22) libraries/snapping/src/curve.rs:396 — Curve::subdivision_intersections has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SelectTool · ×1
  • SelectTool::process_message (cyclomatic 21) editor/src/messages/tool/tool_messages/select_tool.rs:351 — SelectTool::process_message 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 · TypingContext · ×1
  • TypingContext::infer (cyclomatic 21) node-graph/graph-craft/src/proto.rs:848 — TypingContext::infer has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lut · ×1
  • Lut::apply (cyclomatic 21) node-graph/nodes/raster/src/color_lookup_table.rs:278 — Lut::apply has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · markdown.parseMarkdown (cyclomatic 21) · ×1
  • markdown.parseMarkdown (cyclomatic 21) REDACTED:10 — markdown.parseMarkdown 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 · graphite_desktop · ×1
  • graphite_desktop::start (cyclomatic 20) desktop/src/lib.rs:31 — graphite_desktop::start 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 · Session · ×1
  • Session::follow (cyclomatic 20) document/graph-storage/src/session.rs:705 — Session::follow 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 · SnapSession · ×1
  • SnapSession::snap_features (cyclomatic 20) editor/src/messages/tool/common_functionality/snap_session.rs:206 — SnapSession::snap_features 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 · PenToolData · ×1
  • PenToolData::drag_handle (cyclomatic 20) editor/src/messages/tool/tool_messages/pen_tool.rs:1123 — PenToolData::drag_handle 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 · input.tabBetweenTextFields (cyclomatic 20) · ×1
  • input.tabBetweenTextFields (cyclomatic 20) frontend/src/utility-functions/input.ts:395 — input.tabBetweenTextFields has cyclomatic complexity 20 (threshold 15). Of this number, 17 points are the body's own statements and 3 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 · keyboard-entry.getLocalizedScanCode (cyclomatic 20) · ×1
  • keyboard-entry.getLocalizedScanCode (cyclomatic 20) frontend/src/utility-functions/keyboard-entry.ts:41 — keyboard-entry.getLocalizedScanCode 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 · navbar.setRipples (cyclomatic 19) · ×1
  • navbar.setRipples (cyclomatic 19) website/static/js/navbar.js:180 — navbar.setRipples has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 19) · ×1
  • membership.window.addEventListener("DOMContentLoaded") (cyclomatic 19) REDACTED:568 — membership.window.addEventListener("DOMContentLoaded") has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body: 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 · RenderState · ×1
  • RenderState::render (cyclomatic 18) desktop/src/render/state.rs:254 — RenderState::render has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · WorkspacePanelLayout · ×1
  • WorkspacePanelLayout::restore_panel_to_default_position (cyclomatic 18) editor/src/messages/portfolio/utility_types.rs:309 — WorkspacePanelLayout::restore_panel_to_default_position has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Gradient · ×1
  • Gradient::interpolated_samples (cyclomatic 18) node-graph/libraries/vector-types/src/gradient.rs:1424 — Gradient::interpolated_samples 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 2 function items inside it that branch (linear_samples, subdivide). 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 · Preprocessor · ×1
  • Preprocessor::new (cyclomatic 18) node-graph/preprocessor/src/lib.rs:185 — Preprocessor::new 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 · clipboard.readAtCaret (cyclomatic 18) · ×1
  • clipboard.readAtCaret (cyclomatic 18) frontend/src/utility-functions/clipboard.ts:1 — clipboard.readAtCaret 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 · AnimationMessageHandler · ×1
  • AnimationMessageHandler::process_message (cyclomatic 17) editor/src/messages/animation/animation_message_handler.rs:62 — AnimationMessageHandler::process_message 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 · PreferencesMessageHandler · ×1
  • PreferencesMessageHandler::process_message (cyclomatic 17) editor/src/messages/preferences/preferences_message_handler.rs:80 — PreferencesMessageHandler::process_message 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 · BrushToolFsmState · ×1
  • BrushToolFsmState::transition (cyclomatic 17) editor/src/messages/tool/tool_messages/brush_tool.rs:431 — BrushToolFsmState::transition 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 · FillToolFsmState · ×1
  • FillToolFsmState::transition (cyclomatic 17) editor/src/messages/tool/tool_messages/fill_tool.rs:134 — FillToolFsmState::transition 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 · FreehandToolFsmState · ×1
  • FreehandToolFsmState::transition (cyclomatic 17) editor/src/messages/tool/tool_messages/freehand_tool.rs:249 — FreehandToolFsmState::transition 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 · PointModification · ×1
  • PointModification::apply (cyclomatic 17) node-graph/libraries/vector-types/src/vector/vector_modification.rs:31 — PointModification::apply 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 · input.onPotentialDoubleClick (cyclomatic 17) · ×1
  • input.onPotentialDoubleClick (cyclomatic 17) frontend/src/utility-functions/input.ts:188 — input.onPotentialDoubleClick has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · navbar.initializeRipples (cyclomatic 17) · ×1
  • navbar.initializeRipples (cyclomatic 17) website/static/js/navbar.js:45 — navbar.initializeRipples has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 69, 87, 83). 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 · bisect-tool.document.addEventListener("DOMContentLoaded") · ×1
  • bisect-tool.document.addEventListener("DOMContentLoaded")::presentCommit (cyclomatic 17) website/static/js/page/contributor-guide/bisect-tool.js:308 — bisect-tool.document.addEventListener("DOMContentLoaded")::presentCommit 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 · membership.window.addEventListener("DOMContentLoaded") (cyclomatic 17) · ×1
  • membership.window.addEventListener("DOMContentLoaded") (cyclomatic 17) REDACTED:185 — membership.window.addEventListener("DOMContentLoaded") has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (membership.window.addEventListener("DOMContentLoaded")::update) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · KeyboardHandlerImpl · ×1
  • KeyboardHandlerImpl::on_key_event (cyclomatic 16) desktop/ui/src/internal/keyboard_handler.rs:38 — KeyboardHandlerImpl::on_key_event 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 · TransformOperation · ×1
  • TransformOperation::hints (cyclomatic 16) editor/src/messages/portfolio/document/utility_types/transformation.rs:427 — TransformOperation::hints has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BrushTool · ×1
  • BrushTool::process_message (cyclomatic 16) editor/src/messages/tool/tool_messages/brush_tool.rs:202 — BrushTool::process_message has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · brush_nodes · ×1
  • brush_nodes::basic_brush::render::render (cyclomatic 16) node-graph/nodes/brush/src/basic_brush/render.rs:136 — brush_nodes::basic_brush::render::render has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · persistence.migrateToNewFormat (cyclomatic 16) · ×1
  • persistence.migrateToNewFormat (cyclomatic 16) frontend/src/utility-functions/persistence.ts:162 — persistence.migrateToNewFormat 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 one function literal inside it that branches (line 174). 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 · membership.colorPopover (cyclomatic 16) · ×1
  • membership.colorPopover (cyclomatic 16) REDACTED:807 — membership.colorPopover has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 946, 900, 913, …). 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 · book.trackScrollHeadingInTOC · ×1
  • book.trackScrollHeadingInTOC::updateVisibleHeading (cyclomatic 16) website/static/js/template/book.js:8 — book.trackScrollHeadingInTOC::updateVisibleHeading has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D17 · Explicit Debt · TodoComment repeated across 26 files · ×1
  • TodoComment repeated across 26 files node-graph/nodes/text/src/font.rs:67 — The identical TodoComment appears in 26 files (103 occurrences) — almost certainly one boilerplate line from a single migration or decision, not 103 independent debts. Fix the systemic cause once rather than file-by-file. Text: "// TODO: Eventually remove this document upgrade code". Source code is not a task system: track the cleanup where tasks live. (Every occurrence still counts toward the score and metrics.)
D2 · Cognitive Complexity · PathToolFsmState · ×1
  • PathToolFsmState::transition (cognitive 608) editor/src/messages/tool/tool_messages/path_tool.rs:1576 — PathToolFsmState::transition has cognitive complexity 608 (threshold 15). Drivers by points: if/else 148 (416 pts), loops 32 (110 pts), boolean chains 43, match/switch 17 (39 pts) (nesting depth added 368). 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 · SelectToolFsmState · ×1
  • SelectToolFsmState::transition (cognitive 369) editor/src/messages/tool/tool_messages/select_tool.rs:901 — SelectToolFsmState::transition has cognitive complexity 369 (threshold 15). Drivers by points: if/else 116 (278 pts), match/switch 17 (42 pts), boolean chains 36, loops 4 (13 pts) (nesting depth added 196). 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 · GradientToolFsmState · ×1
  • GradientToolFsmState::transition (cognitive 304) editor/src/messages/tool/tool_messages/gradient_tool.rs:926 — GradientToolFsmState::transition has cognitive complexity 304 (threshold 15). Drivers by points: if/else 80 (218 pts), match/switch 12 (36 pts), loops 9 (28 pts), boolean chains 22 (nesting depth added 181). To reduce it, split the body into named stages: move each independent 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 · PortfolioMessageHandler · ×1
  • PortfolioMessageHandler::process_message (cognitive 249) editor/src/messages/portfolio/portfolio_message_handler.rs:79 — PortfolioMessageHandler::process_message has cognitive complexity 249 (threshold 15). Drivers by points: if/else 83 (185 pts), loops 13 (32 pts), boolean chains 20, match/switch 7 (12 pts) (nesting depth added 126). 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 · PenToolFsmState · ×1
  • PenToolFsmState::transition (cognitive 219) editor/src/messages/tool/tool_messages/pen_tool.rs:1602 — PenToolFsmState::transition has cognitive complexity 219 (threshold 15). Drivers by points: if/else 82 (179 pts), boolean chains 18, loops 4 (11 pts), match/switch 6 (11 pts) (nesting depth added 109). 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 · ClipboardMessageHandler · ×1
  • ClipboardMessageHandler::process_message (cognitive 197) editor/src/messages/clipboard/clipboard_message_handler.rs:57 — ClipboardMessageHandler::process_message has cognitive complexity 197 (threshold 15). Drivers by points: if/else 41 (111 pts), loops 19 (58 pts), match/switch 6 (20 pts), boolean chains 8 (nesting depth added 123). 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 · TransformLayerMessageHandler · ×1
  • TransformLayerMessageHandler::process_message (cognitive 190) editor/src/messages/tool/transform_layer/transform_layer_message_handler.rs:112 — TransformLayerMessageHandler::process_message has cognitive complexity 190 (threshold 15). Drivers by points: if/else 66 (157 pts), boolean chains 16, match/switch 6 (12 pts), loops 2 (5 pts) (nesting depth added 100). 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 · WorkspaceMessageHandler · ×1
  • WorkspaceMessageHandler::process_message (cognitive 135) editor/src/messages/portfolio/workspace/workspace_message_handler.rs:21 — WorkspaceMessageHandler::process_message has cognitive complexity 135 (threshold 15). Drivers by points: if/else 48 (106 pts), loops 10 (21 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 70). 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 · NavigationMessageHandler · ×1
  • NavigationMessageHandler::process_message (cognitive 119) editor/src/messages/portfolio/document/navigation/navigation_message_handler.rs:41 — NavigationMessageHandler::process_message has cognitive complexity 119 (threshold 15). Drivers by points: if/else 59 (105 pts), boolean chains 8, match/switch 3 (6 pts) (nesting depth added 49). Of this number, 113 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 · ShapeToolFsmState · ×1
  • ShapeToolFsmState::transition (cognitive 118) editor/src/messages/tool/tool_messages/shape_tool.rs:874 — ShapeToolFsmState::transition has cognitive complexity 118 (threshold 15). Drivers by points: if/else 43 (94 pts), boolean chains 15, match/switch 5 (9 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 · GraphOperationMessageHandler · ×1
  • GraphOperationMessageHandler::process_message (cognitive 100) editor/src/messages/portfolio/document/graph_operation/graph_operation_message_handler.rs:34 — GraphOperationMessageHandler::process_message has cognitive complexity 100 (threshold 15). Drivers by points: if/else 40 (78 pts), loops 5 (13 pts), match/switch 4 (9 pts) (nesting depth added 51). 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 · TextToolFsmState · ×1
  • TextToolFsmState::transition (cognitive 99) editor/src/messages/tool/tool_messages/text_tool.rs:645 — TextToolFsmState::transition has cognitive complexity 99 (threshold 15). Drivers by points: if/else 40 (87 pts), boolean chains 8, loops 1 (3 pts), match/switch 1 (nesting depth added 49). 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 · NodeGraphExecutor · ×1
  • NodeGraphExecutor::poll_node_graph_evaluation (cognitive 89) editor/src/node_graph_executor.rs:452 — NodeGraphExecutor::poll_node_graph_evaluation has cognitive complexity 89 (threshold 15). Drivers by points: if/else 19 (53 pts), match/switch 8 (24 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 54). To reduce it, split the body into named stages: move each independent 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 · graphic_types · ×1
  • graphic_types::graphic::flatten_graphic_list::flatten_recursive (cognitive 77) node-graph/libraries/graphic-types/src/graphic.rs:191 — graphic_types::graphic::flatten_graphic_list::flatten_recursive has cognitive complexity 77 (threshold 15). Drivers by points: if/else 12 (48 pts), loops 6 (21 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent 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 · Replica · ×1
  • Replica::handle_packet (cognitive 72) document/peer-transport/src/replica.rs:595 — Replica::handle_packet has cognitive complexity 72 (threshold 15). Drivers by points: if/else 26 (50 pts), match/switch 6 (11 pts), boolean chains 7, loops 2 (4 pts) (nesting depth added 31). 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 · ArtboardToolFsmState · ×1
  • ArtboardToolFsmState::transition (cognitive 67) editor/src/messages/tool/tool_messages/artboard_tool.rs:323 — ArtboardToolFsmState::transition has cognitive complexity 67 (threshold 15). Drivers by points: if/else 26 (49 pts), match/switch 4 (11 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent 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 · ToolMessageHandler · ×1
  • ToolMessageHandler::handle_message (cognitive 58) editor/src/messages/tool/tool_message_handler.rs:44 — ToolMessageHandler::handle_message has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (51 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 29). 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 · InputState · ×1
  • InputState::process (cognitive 57) desktop/src/input.rs:95 — InputState::process has cognitive complexity 57 (threshold 15). Drivers by points: match/switch 16 (35 pts), if/else 8 (18 pts), boolean chains 4 (nesting depth added 29). 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 · WorkingVector · ×1
  • WorkingVector::reweave (cognitive 57) node-graph/libraries/vector-types/src/vector/flatten.rs:98 — WorkingVector::reweave has cognitive complexity 57 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 7 (11 pts), boolean chains 9, match/switch 2 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SegmentModification · ×1
  • SegmentModification::apply (cognitive 54) node-graph/libraries/vector-types/src/vector/vector_modification.rs:234 — SegmentModification::apply has cognitive complexity 54 (threshold 15). Drivers by points: if/else 17 (32 pts), match/switch 6 (14 pts), loops 4 (5 pts), boolean chains 3 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResourceMessageHandler · ×1
  • ResourceMessageHandler::process_message (cognitive 53) editor/src/messages/portfolio/document/resource/resource_message_handler.rs:28 — ResourceMessageHandler::process_message has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (35 pts), match/switch 7 (13 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 30). Of this number, 51 points are the body's own statements and 2 belong to one function item inside it that branches. 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 · SplineToolFsmState · ×1
  • SplineToolFsmState::transition (cognitive 52) editor/src/messages/tool/tool_messages/spline_tool.rs:330 — SplineToolFsmState::transition has cognitive complexity 52 (threshold 15). Drivers by points: if/else 25 (47 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Gdd · ×1
  • Gdd::stream_entries (cognitive 47) document/format/src/export.rs:141 — Gdd::stream_entries has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (27 pts), loops 8 (12 pts), match/switch 3 (5 pts), boolean chains 3 (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 · SelectedGradient · ×1
  • SelectedGradient::update_gradient (cognitive 44) editor/src/messages/tool/tool_messages/gradient_tool.rs:628 — SelectedGradient::update_gradient has cognitive complexity 44 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 4, 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 · Document · ×1
  • Document::apply_op_with (cognitive 43) document/graph-storage/src/document.rs:222 — Document::apply_op_with has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (32 pts), match/switch 4 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 21). 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 · ValueNode · ×1
  • ValueNode::eval_in (cognitive 42) libraries/math-parser/src/executer.rs:334 — ValueNode::eval_in has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 6 (11 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). 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 · Dispatcher · ×1
  • Dispatcher::handle_message (cognitive 40) editor/src/dispatcher.rs:159 — Dispatcher::handle_message has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BoundingBoxManager · ×1
  • BoundingBoxManager::check_selected_edges (cognitive 40) editor/src/messages/tool/common_functionality/transformation_cage.rs:669 — BoundingBoxManager::check_selected_edges has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 11 (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 · GradientTool · ×1
  • GradientTool::process_message (cognitive 39) editor/src/messages/tool/tool_messages/gradient_tool.rs:90 — GradientTool::process_message has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 19). 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 · Curve · ×1
  • Curve::subdivision_intersections (cognitive 39) libraries/snapping/src/curve.rs:396 — Curve::subdivision_intersections has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (26 pts), boolean chains 8, loops 4 (5 pts) (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 · path_bool_nodes · ×1
  • path_bool_nodes::flatten_vector (cognitive 38) node-graph/nodes/path-bool/src/lib.rs:196 — path_bool_nodes::flatten_vector has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 4 (12 pts), boolean chains 4, match/switch 2 (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 · TypingContext · ×1
  • TypingContext::infer (cognitive 37) node-graph/graph-craft/src/proto.rs:848 — TypingContext::infer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (7 pts), boolean chains 2, match/switch 2 (nesting depth added 18). Of this number, 33 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · markdown.parseMarkdown (cognitive 37) · ×1
  • markdown.parseMarkdown (cognitive 37) REDACTED:10 — markdown.parseMarkdown has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 6, ternaries 1 (3 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeFnAttributes · ×1
  • NodeFnAttributes::parse (cognitive 34) node-graph/node-macro/src/parsing.rs:436 — NodeFnAttributes::parse has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (31 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · keyboard-entry.getLocalizedScanCode (cognitive 33) · ×1
  • keyboard-entry.getLocalizedScanCode (cognitive 33) frontend/src/utility-functions/keyboard-entry.ts:41 — keyboard-entry.getLocalizedScanCode has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), match/switch 1 (3 pts), ternaries 1 (3 pts), boolean chains 2 (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 · input.shouldRedirectKeyboardEventToBackend (cognitive 31) · ×1
  • input.shouldRedirectKeyboardEventToBackend (cognitive 31) frontend/src/utility-functions/input.ts:29 — input.shouldRedirectKeyboardEventToBackend has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 13, ternaries 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 · OriginalTransforms · ×1
  • OriginalTransforms::update (cognitive 30) editor/src/messages/portfolio/document/utility_types/transformation.rs:63 — OriginalTransforms::update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 18). 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 · membership.window.addEventListener("DOMContentLoaded") · ×1
  • membership.window.addEventListener("DOMContentLoaded")::update (cognitive 30) REDACTED:422 — membership.window.addEventListener("DOMContentLoaded")::update has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10, ternaries 8 (10 pts), boolean chains 9, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · Session · ×1
  • Session::follow (cognitive 28) document/graph-storage/src/session.rs:705 — Session::follow has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 4, loops 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 · HistoryMessageHandler · ×1
  • HistoryMessageHandler::process_message (cognitive 28) editor/src/messages/portfolio/history/history_message_handler.rs:35 — HistoryMessageHandler::process_message has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 4 (8 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 · IngestMessageHandler · ×1
  • IngestMessageHandler::process_message (cognitive 28) editor/src/messages/portfolio/ingest/ingest_message_handler.rs:20 — IngestMessageHandler::process_message has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 5 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 15). 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 · TextTool · ×1
  • TextTool::process_message (cognitive 28) editor/src/messages/tool/tool_messages/text_tool.rs:285 — TextTool::process_message has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Lut · ×1
  • Lut::apply (cognitive 26) node-graph/nodes/raster/src/color_lookup_table.rs:278 — Lut::apply has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (6 pts), boolean chains 5, match/switch 4 (5 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 · migration_snapshot · ×1
  • migration_snapshot::api::api_problems (cognitive 25) document/migrations/snapshot/src/api.rs:57 — migration_snapshot::api::api_problems has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2 (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 · NetworkView · ×1
  • NetworkView::connected_to_output (cognitive 25) editor/src/messages/portfolio/document/utility_types/network_interface/view.rs:353 — NetworkView::connected_to_output has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), 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 · FillToolFsmState · ×1
  • FillToolFsmState::transition (cognitive 25) editor/src/messages/tool/tool_messages/fill_tool.rs:134 — FillToolFsmState::transition has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ShapeTool · ×1
  • ShapeTool::process_message (cognitive 25) editor/src/messages/tool/tool_messages/shape_tool.rs:542 — ShapeTool::process_message has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Graphic · ×1
  • Graphic::collect_metadata (cognitive 25) node-graph/libraries/rendering/src/renderer.rs:1106 — Graphic::collect_metadata has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 2 (3 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 · bisect-tool.document.addEventListener("DOMContentLoaded") · ×1
  • bisect-tool.document.addEventListener("DOMContentLoaded")::presentCommit (cognitive 25) website/static/js/page/contributor-guide/bisect-tool.js:308 — bisect-tool.document.addEventListener("DOMContentLoaded")::presentCommit has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (24 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 · MmapResourceStorage · ×1
  • MmapResourceStorage::garbage_collect (cognitive 24) node-graph/graph-craft/src/application_io/resource/mmap.rs:116 — MmapResourceStorage::garbage_collect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TargetPath · ×1
  • TargetPath::from_contours_and_faces (cognitive 24) node-graph/libraries/vector-types/src/vector/click_target.rs:137 — TargetPath::from_contours_and_faces has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (6 pts), match/switch 1 (3 pts), boolean chains 2 (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 · brush_nodes · ×1
  • brush_nodes::basic_brush::render::render (cognitive 24) node-graph/nodes/brush/src/basic_brush/render.rs:136 — brush_nodes::basic_brush::render::render has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2 (3 pts), boolean chains 2, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · cargo_run_internal_watch · ×1
  • cargo_run_internal_watch::watch (cognitive 24) tools/cargo-run/internal/watch/src/main.rs:43 — cargo_run_internal_watch::watch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (7 pts), match/switch 1 (nesting depth added 15). 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 · core_types · ×1
  • core_types::types::rewrite_ranked_type_wrappers (cognitive 23) node-graph/libraries/core-types/src/types.rs:444 — core_types::types::rewrite_ranked_type_wrappers has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Gradient · ×1
  • Gradient::interpolated_samples (cognitive 23) node-graph/libraries/vector-types/src/gradient.rs:1424 — Gradient::interpolated_samples has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (linear_samples, subdivide). 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 · Selected · ×1
  • Selected::revert_operation (cognitive 22) editor/src/messages/portfolio/document/utility_types/transformation.rs:679 — Selected::revert_operation has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 2 (8 pts), match/switch 1 (2 pts) (nesting depth added 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.
D2 · Cognitive Complexity · FreehandToolFsmState · ×1
  • FreehandToolFsmState::transition (cognitive 22) editor/src/messages/tool/tool_messages/freehand_tool.rs:249 — FreehandToolFsmState::transition has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · carousel.initializeCarousel (cognitive 22) · ×1
  • carousel.initializeCarousel (cognitive 22) website/static/js/component/carousel.js:27 — carousel.initializeCarousel has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 2, ternaries 1 (nesting depth added 8). None of this is in the body itself: all 22 points belong to 8 function literals inside it that branch (lines 94, 36, 88, …). 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 · navbar.setRipples (cognitive 22) · ×1
  • navbar.setRipples (cognitive 22) website/static/js/navbar.js:180 — navbar.setRipples has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (5 pts), boolean chains 4, ternaries 1 (nesting depth added 6). 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 into named stages: move each independent 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 · InputPreprocessorMessageHandler · ×1
  • InputPreprocessorMessageHandler::process_message (cognitive 21) editor/src/messages/input_preprocessor/input_preprocessor_message_handler.rs:40 — InputPreprocessorMessageHandler::process_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). 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 · Resize · ×1
  • Resize::snap_box (cognitive 21) editor/src/messages/tool/common_functionality/resize.rs:75 — Resize::snap_box has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · crate_hierarchy_viz · ×1
  • crate_hierarchy_viz::main (cognitive 21) tools/crate-hierarchy-viz/src/main.rs:87 — crate_hierarchy_viz::main has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (5 pts), 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 · persistence.migrateToNewFormat (cognitive 21) · ×1
  • persistence.migrateToNewFormat (cognitive 21) frontend/src/utility-functions/persistence.ts:162 — persistence.migrateToNewFormat 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: 2 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 174). 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 · BrushToolFsmState · ×1
  • BrushToolFsmState::transition (cognitive 20) editor/src/messages/tool/tool_messages/brush_tool.rs:431 — BrushToolFsmState::transition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (5 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 · HintData · ×1
  • HintData::to_layout (cognitive 20) editor/src/messages/tool/utility_types.rs:545 — HintData::to_layout has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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 · MatrixNode · ×1
  • MatrixNode::eval_in (cognitive 20) libraries/math-parser/src/executer.rs:517 — MatrixNode::eval_in has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 pts), match/switch 3 (5 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 · EditorSession · ×1
  • EditorSession::dispatch (cognitive 20) tools/web-editor-driver/src/session.rs:160 — EditorSession::dispatch has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 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 · clipboard.readAtCaret (cognitive 20) · ×1
  • clipboard.readAtCaret (cognitive 20) frontend/src/utility-functions/clipboard.ts:1 — clipboard.readAtCaret has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · membership.window.addEventListener("DOMContentLoaded") (cognitive 20) · ×1
  • membership.window.addEventListener("DOMContentLoaded") (cognitive 20) REDACTED:24 — membership.window.addEventListener("DOMContentLoaded") has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 3 (nesting depth added 2). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 87, commit, a function literal at line 136, …). 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 · book.trackScrollHeadingInTOC · ×1
  • book.trackScrollHeadingInTOC::updateVisibleHeading (cognitive 20) website/static/js/template/book.js:8 — book.trackScrollHeadingInTOC::updateVisibleHeading has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, 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 · TransformOperation · ×1
  • TransformOperation::hints (cognitive 19) editor/src/messages/portfolio/document/utility_types/transformation.rs:427 — TransformOperation::hints has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2, 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 · Mesh · ×1
  • Mesh::locate (cognitive 19) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:538 — Mesh::locate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ObstacleGrid · ×1
  • ObstacleGrid::nearest (cognitive 19) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:908 — ObstacleGrid::nearest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · input.tabBetweenTextFields (cognitive 19) · ×1
  • input.tabBetweenTextFields (cognitive 19) frontend/src/utility-functions/input.ts:395 — input.tabBetweenTextFields has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, ternaries 5 (6 pts) (nesting depth added 1). Of this number, 16 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DiffUpdate · ×1
  • DiffUpdate::apply_keyboard_shortcut (cognitive 18) editor/src/messages/layout/utility_types/layout_widget.rs:1057 — DiffUpdate::apply_keyboard_shortcut has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), match/switch 4 (nesting depth added 6). 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 into named stages: move each independent 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 · OverlaysMessageHandler · ×1
  • OverlaysMessageHandler::process_message (cognitive 18) editor/src/messages/portfolio/document/overlays/overlays_message_handler.rs:22 — OverlaysMessageHandler::process_message has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (6 pts), match/switch 2 (3 pts) (nesting depth added 10). 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 · WorkspacePanelLayout · ×1
  • WorkspacePanelLayout::restore_panel_to_default_position (cognitive 18) editor/src/messages/portfolio/utility_types.rs:309 — WorkspacePanelLayout::restore_panel_to_default_position has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2, boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · carousel.updateVideoSyncForTransitions (cognitive 18) · ×1
  • carousel.updateVideoSyncForTransitions (cognitive 18) website/static/js/component/carousel.js:288 — carousel.updateVideoSyncForTransitions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function items inside it that branch (syncTornVideos, a function literal at line 297). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · PlaneReceiver · ×1
  • PlaneReceiver::recv (cognitive 17) desktop/ui/src/frames/plane/linux.rs:171 — PlaneReceiver::recv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), loops 3 (5 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameStreamer · ×1
  • FrameStreamer::publish (cognitive 17) desktop/ui/src/frames/streamer.rs:105 — FrameStreamer::publish has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModifyInputsContext · ×1
  • ModifyInputsContext::gradient_stops_set (cognitive 17) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:591 — ModifyInputsContext::gradient_stops_set has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 1, match/switch 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 · graphite_wasm_wrapper · ×1
  • graphite_wasm_wrapper::helpers::render_image_data_to_canvases (cognitive 17) frontend/wrapper/src/helpers.rs:135 — graphite_wasm_wrapper::helpers::render_image_data_to_canvases has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Connectivity · ×1
  • Connectivity::build (cognitive 17) node-graph/libraries/vector-types/src/vector/connectivity.rs:35 — Connectivity::build has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (7 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 · BlobStore · ×1
  • BlobStore::absorb (cognitive 16) document/format/src/blob_store.rs:90 — BlobStore::absorb has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (4 pts), boolean chains 1, 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 · LayoutGroup · ×1
  • LayoutGroup::diff (cognitive 16) editor/src/messages/layout/utility_types/layout_widget.rs:593 — LayoutGroup::diff has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 7). 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 · FlowIter · ×1
  • FlowIter::next (cognitive 16) editor/src/messages/portfolio/document/utility_types/network_interface/types.rs:107 — FlowIter::next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 1 (3 pts), boolean chains 2, 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 · FontsMessageHandler · ×1
  • FontsMessageHandler::process_message (cognitive 16) editor/src/messages/portfolio/fonts/fonts_message_handler.rs:34 — FontsMessageHandler::process_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). 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 · NavigateToolFsmState · ×1
  • NavigateToolFsmState::transition (cognitive 16) editor/src/messages/tool/tool_messages/navigate_tool.rs:98 — NavigateToolFsmState::transition has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 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 · cargo_run_internal_download · ×1
  • cargo_run_internal_download::extract_tar_gz (cognitive 16) tools/cargo-run/internal/download/src/main.rs:80 — cargo_run_internal_download::extract_tar_gz has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, 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 · membership.window.addEventListener("DOMContentLoaded") (cognitive 16) · ×1
  • membership.window.addEventListener("DOMContentLoaded") (cognitive 16) REDACTED:568 — membership.window.addEventListener("DOMContentLoaded") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, boolean chains 6, ternaries 1. 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, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D32 · Data Compliance (PII/GDPR) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (4 members, 29 shared lines) · ×1
  • Near-duplicate member family (4 members, 29 shared lines) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:244 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:244-300 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:307-352 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:369-426 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:439-490 — These 4 members are variants of one another: a block of 29 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them 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 · Near-duplicate member pair (37 shared lines) · ×1
  • Near-duplicate member pair (37 shared lines) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:635 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:635-769 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:771-877 — These two members are variants of one another: 37 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) node-graph/nodes/transform/src/transform_nodes.rs:38 — node-graph/nodes/transform/src/transform_nodes.rs:38-58 | node-graph/nodes/transform/src/transform_nodes.rs:70-90 — 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 · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) node-graph/libraries/rendering/src/renderer.rs:799 — node-graph/libraries/rendering/src/renderer.rs:799-871 | node-graph/libraries/rendering/src/renderer.rs:1462-1664 | node-graph/libraries/rendering/src/renderer.rs:2364-2443 | node-graph/libraries/rendering/src/renderer.rs:2657-2683 | node-graph/libraries/rendering/src/renderer.rs:2789-2869 — 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) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:779 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:779-789 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:802-812 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:830-840 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:843-853 — 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 (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) document/graph-storage/src/schema/value.rs:44 — document/graph-storage/src/schema/value.rs:44-112 | document/migrations/formats/src/v4.rs:317-384 — These two members are one piece of code written twice and then edited apart: 68 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 (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) node-graph/libraries/rendering/src/renderer.rs:2446 — node-graph/libraries/rendering/src/renderer.rs:2446-2494 | node-graph/libraries/rendering/src/renderer.rs:2578-2629 — These two members are one piece of code written twice and then edited apart: 49 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 (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:127 — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:127-168 | editor/src/messages/tool/common_functionality/shapes/star_shape.rs:131-177 — These two members are one piece of code written twice and then edited apart: 42 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, 47+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 47+ corresponding lines) editor/src/messages/tool/tool_messages/freehand_tool.rs:157 — editor/src/messages/tool/tool_messages/freehand_tool.rs:157-203 | editor/src/messages/tool/tool_messages/pen_tool.rs:251-305 | editor/src/messages/tool/tool_messages/spline_tool.rs:164-217 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 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 (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) editor/src/messages/portfolio/document/overlays/utility_functions.rs:91 — editor/src/messages/portfolio/document/overlays/utility_functions.rs:91-133 | editor/src/messages/portfolio/document/overlays/utility_functions.rs:143-191 — These two members are one piece of code written twice and then edited apart: 43 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 (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) editor/src/messages/tool/tool_messages/freehand_tool.rs:97 — editor/src/messages/tool/tool_messages/freehand_tool.rs:97-152 | editor/src/messages/tool/tool_messages/spline_tool.rs:104-159 — These two members are one piece of code written twice and then edited apart: 56 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 (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:76 — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:76-106 | editor/src/messages/tool/common_functionality/shapes/line_shape.rs:88-122 — These two members are one piece of code written twice and then edited apart: 31 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 (35 corresponding lines) · ×1
  • Edited copy of a member (35 corresponding lines) libraries/rawkit/src/decoder/arw2.rs:24 — libraries/rawkit/src/decoder/arw2.rs:24-58 | libraries/rawkit/src/decoder/uncompressed.rs:25-67 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) node-graph/libraries/rendering/src/renderer.rs:1057 — node-graph/libraries/rendering/src/renderer.rs:1057-1076 | node-graph/libraries/rendering/src/renderer.rs:1078-1104 | node-graph/libraries/rendering/src/renderer.rs:1209-1228 | node-graph/libraries/rendering/src/renderer.rs:1230-1249 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:35 — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:35-74 | editor/src/messages/tool/common_functionality/shapes/line_shape.rs:53-86 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) node-graph/nodes/brush/src/basic_brush/pipeline.rs:271 — node-graph/nodes/brush/src/basic_brush/pipeline.rs:271-315 | node-graph/nodes/gstd/src/render_pixel_preview.rs:107-173 — These two members are one piece of code written twice and then edited apart: 45 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 (32 corresponding lines) · ×1
  • Edited copy of a member (32 corresponding lines) editor/src/messages/tool/common_functionality/compass_rose.rs:13 — editor/src/messages/tool/common_functionality/compass_rose.rs:13-44 | editor/src/messages/tool/common_functionality/pivot.rs:229-262 — These two members are one piece of code written twice and then edited apart: 32 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 (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) editor/src/messages/layout/utility_types/layout_widget.rs:728 — editor/src/messages/layout/utility_types/layout_widget.rs:728-756 | editor/src/messages/layout/utility_types/layout_widget.rs:758-786 — These two members are one piece of code written twice and then edited apart: 29 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 (23 corresponding lines) · ×1
  • Edited copy of a member (23 corresponding lines) editor/src/messages/tool/common_functionality/shape_editor.rs:769 — editor/src/messages/tool/common_functionality/shape_editor.rs:769-791 | editor/src/messages/tool/common_functionality/shape_editor.rs:795-817 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×1
  • Edited copy of a member (26 corresponding lines) node-graph/libraries/wgpu-executor/src/vello_render.rs:654 — node-graph/libraries/wgpu-executor/src/vello_render.rs:654-689 | node-graph/nodes/brush/src/basic_brush/convert.rs:54-79 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) editor/src/messages/dialog/simple_dialogs/close_document_dialog.rs:15 — editor/src/messages/dialog/simple_dialogs/close_document_dialog.rs:15-39 | editor/src/messages/dialog/simple_dialogs/failed_to_load_documents_dialog.rs:14-42 — These two members are one piece of code written twice and then edited apart: 25 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, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) editor/src/messages/portfolio/document/node_graph/node_inspector.rs:464 — editor/src/messages/portfolio/document/node_graph/node_inspector.rs:464-481 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:534-551 | editor/src/messages/portfolio/document/node_graph/node_inspector.rs:969-986 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 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, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) frontend/wrapper/src/editor_commands.rs:352 — frontend/wrapper/src/editor_commands.rs:352-367 | frontend/wrapper/src/editor_commands.rs:390-405 | frontend/wrapper/src/editor_commands.rs:420-435 — 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 copies of one member (3 members, 11+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 11+ corresponding lines) editor/src/messages/tool/common_functionality/stroke_options.rs:100 — editor/src/messages/tool/common_functionality/stroke_options.rs:100-112 | editor/src/messages/tool/common_functionality/stroke_options.rs:117-127 | editor/src/messages/tool/common_functionality/stroke_options.rs:171-181 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 9+ corresponding lines) document/container/src/lib.rs:364 — document/container/src/lib.rs:364-372 | document/container/src/lib.rs:374-382 | document/container/src/lib.rs:384-392 | document/container/src/lib.rs:394-402 | document/container/src/lib.rs:404-412 | document/container/src/lib.rs:414-422 | document/container/src/lib.rs:424-432 | document/container/src/lib.rs:434-442 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) editor/src/messages/tool/tool_messages/shape_tool.rs:141 — editor/src/messages/tool/tool_messages/shape_tool.rs:141-156 | editor/src/messages/tool/tool_messages/shape_tool.rs:158-171 | editor/src/messages/tool/tool_messages/shape_tool.rs:237-251 | editor/src/messages/tool/tool_messages/shape_tool.rs:253-267 | editor/src/messages/tool/tool_messages/shape_tool.rs:269-283 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 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 (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) document/container/src/lib.rs:444 — document/container/src/lib.rs:444-452 | document/container/src/lib.rs:454-462 | document/container/src/lib.rs:464-472 | document/container/src/lib.rs:474-482 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 8+ corresponding lines) editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:77 — editor/src/messages/dialog/export_dialog/export_dialog_message_handler.rs:77-92 | editor/src/messages/dialog/new_document_dialog/new_document_dialog_message_handler.rs:66-81 | editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:431-438 | editor/src/messages/dialog/simple_dialogs/close_all_documents_dialog.rs:17-32 | editor/src/messages/dialog/simple_dialogs/confirm_restart_dialog.rs:13-28 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:202 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:202-213 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:215-226 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:228-239 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/grid_rows_columns_gizmo.rs:241-252 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) document/graph-storage/src/prior.rs:151 — document/graph-storage/src/prior.rs:151-159 | document/graph-storage/src/prior.rs:161-169 | document/graph-storage/src/prior.rs:171-179 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 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) editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs:17 — editor/src/messages/tool/common_functionality/shapes/ellipse_shape.rs:17-20 | editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:110-118 | editor/src/messages/tool/common_functionality/shapes/rectangle_shape.rs:17-20 — 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, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) node-graph/nodes/math/src/lib.rs:1013 — node-graph/nodes/math/src/lib.rs:1013-1019 | node-graph/nodes/math/src/lib.rs:1032-1038 | node-graph/nodes/math/src/lib.rs:1051-1057 | node-graph/nodes/math/src/lib.rs:2135-2146 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 4+ corresponding lines) editor/src/messages/dialog/simple_dialogs/about_graphite_dialog.rs:15 — editor/src/messages/dialog/simple_dialogs/about_graphite_dialog.rs:15-19 | editor/src/messages/dialog/simple_dialogs/demo_artwork_dialog.rs:22-26 | editor/src/messages/dialog/simple_dialogs/documents_open_elsewhere_dialog.rs:14-18 | editor/src/messages/dialog/simple_dialogs/error_dialog.rs:14-18 | editor/src/messages/dialog/simple_dialogs/failed_to_open_document_dialog.rs:12-15 | editor/src/messages/dialog/simple_dialogs/licenses_dialog.rs:12-16 | editor/src/messages/dialog/simple_dialogs/licenses_third_party_dialog.rs:12-16 — These 7 members are one piece of code written 7 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 7 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) node-graph/graph-craft/src/compiler/flatten.rs:10 — node-graph/graph-craft/src/compiler/flatten.rs:10-15 | node-graph/graph-craft/src/compiler/scope.rs:231-237 | node-graph/preprocessor/src/lib.rs:20-26 — 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, 7+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 7+ corresponding lines) desktop/ui/src/internal/keyboard_handler.rs:90 — desktop/ui/src/internal/keyboard_handler.rs:90-96 | desktop/ui/src/internal/life_span_handler.rs:44-50 | desktop/ui/src/internal/render_process_handler.rs:107-113 | desktop/ui/src/internal/render_process_v8_handler.rs:66-72 | desktop/ui/src/internal/resource_request_handler.rs:40-46 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (59–60 lines × 3) · ×1
  • Duplicated block (59–60 lines × 3) document/graph-storage/src/schema/value.rs:45 — document/graph-storage/src/schema/value.rs:45-104 | document/migrations/formats/src/v1.rs:416-474 | document/migrations/formats/src/v4.rs:318-376 — before extracting anything, compare `document/graph-storage/src/schema/value.rs` and `document/migrations/formats/src/v4.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `document/graph-storage/src/schema/value.rs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35–38 lines × 3) · ×1
  • Duplicated block (35–38 lines × 3) document/graph-storage/src/schema/resources.rs:47 — document/graph-storage/src/schema/resources.rs:47-84 | document/migrations/formats/src/v1.rs:245-279 | document/migrations/formats/src/v4.rs:205-239 — before extracting anything, compare `document/migrations/formats/src/v1.rs` and `document/migrations/formats/src/v4.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 109 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) editor/src/messages/portfolio/document/utility_types/wires.rs:496 — editor/src/messages/portfolio/document/utility_types/wires.rs:496-526 | editor/src/messages/portfolio/document/utility_types/wires.rs:535-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/utility_types/wires.rs:496` 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.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2361 — editor/src/messages/tool/tool_messages/path_tool.rs:2361-2389 | editor/src/messages/tool/tool_messages/path_tool.rs:2466-2493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:2361` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/tool/tool_messages/path_tool.rs:2494` calls `add` and `editor/src/messages/tool/tool_messages/path_tool.rs:2391` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (26–28 lines × 2) · ×1
  • Duplicated block (26–28 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:583 — editor/src/messages/portfolio/document/document_message_handler.rs:583-608 | editor/src/messages/portfolio/document/document_message_handler.rs:3503-3530 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:583` 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 (4–25 lines × 3) · ×1
  • Duplicated block (4–25 lines × 3) editor/src/messages/tool/common_functionality/compass_rose.rs:16 — editor/src/messages/tool/common_functionality/compass_rose.rs:16-40 | editor/src/messages/tool/common_functionality/pivot.rs:232-256 | editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:226-229 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/shapes/shape_utility.rs:226` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) editor/src/messages/tool/tool_messages/path_tool.rs:2087 — editor/src/messages/tool/tool_messages/path_tool.rs:2087-2110 | editor/src/messages/tool/tool_messages/path_tool.rs:2212-2235 | editor/src/messages/tool/tool_messages/path_tool.rs:2311-2334 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (2–24 lines × 16) · ×1
  • Duplicated block (2–24 lines × 16) editor/src/messages/portfolio/document_migration.rs:2157 — editor/src/messages/portfolio/document_migration.rs:2157-2161 | editor/src/messages/portfolio/document_migration.rs:2595-2599 | editor/src/messages/portfolio/document_migration.rs:2608-2610 | editor/src/messages/portfolio/document_migration.rs:2624-2626 | editor/src/messages/portfolio/document_migration.rs:2636-2638 | editor/src/messages/portfolio/document_migration.rs:2848-2850 | editor/src/messages/portfolio/document_migration.rs:2909-2913 | editor/src/messages/portfolio/document_migration.rs:2924-2926 | editor/src/messages/portfolio/document_migration.rs:2937-2939 | editor/src/messages/portfolio/document_migration.rs:2967-2969 | editor/src/messages/portfolio/document_migration.rs:3240-3241 | editor/src/messages/portfolio/document_migration.rs:3315-3338 | editor/src/messages/portfolio/document_migration.rs:3380-3403 | editor/src/messages/portfolio/document_migration.rs:3440-3441 | editor/src/messages/portfolio/document_migration.rs:3453-3454 | editor/src/messages/portfolio/document_migration.rs:3492-3493 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/portfolio/document_migration.rs:2610` calls `set_input`, `node_at_index`, `clone` and `editor/src/messages/portfolio/document_migration.rs:2161` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) node-graph/libraries/graphic-types/src/graphic.rs:255 — node-graph/libraries/graphic-types/src/graphic.rs:255-274 | node-graph/nodes/path-bool/src/lib.rs:214-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:252 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:252-268 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:311-327 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:375-391 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:450-466 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:247 — editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:247-273 | editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:277-303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/common_functionality/gizmos/shape_gizmos/point_radius_handle.rs:247` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:158 — node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:158-171 | node-graph/libraries/vector-types/src/vector/algorithms/convex_hull.rs:158-173 — 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 `node-graph/libraries/vector-types/src/vector/algorithms/concave_hull.rs:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:4083 — editor/src/messages/portfolio/document/document_message_handler.rs:4083-4095 | editor/src/messages/portfolio/document/node_graph/node_graph_message_handler.rs:3397-3411 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:4083` 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 (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) editor/src/messages/tool/tool_messages/select_tool.rs:1907 — editor/src/messages/tool/tool_messages/select_tool.rs:1907-1920 | editor/src/messages/tool/tool_messages/select_tool.rs:2207-2220 | editor/src/messages/tool/tool_messages/select_tool.rs:2267-2280 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/select_tool.rs:1907` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 2) · ×1
  • Duplicated block (11–14 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2950 — editor/src/messages/tool/tool_messages/path_tool.rs:2950-2963 | editor/src/messages/tool/tool_messages/path_tool.rs:3066-3076 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:2950` 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 (10–13 lines × 2) · ×1
  • Duplicated block (10–13 lines × 2) editor/src/messages/portfolio/document/document_message_handler.rs:724 — editor/src/messages/portfolio/document/document_message_handler.rs:724-733 | editor/src/messages/portfolio/document/document_message_handler.rs:745-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/document_message_handler.rs:724` 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.
D4 · Code Duplication · Duplicated block (19–21 lines × 2) · ×1
  • Duplicated block (19–21 lines × 2) editor/src/messages/portfolio/document_migration.rs:2202 — editor/src/messages/portfolio/document_migration.rs:2202-2222 | editor/src/messages/portfolio/document_migration.rs:2254-2272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:2202` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) editor/src/messages/portfolio/document/overlays/utility_types_web.rs:289 — editor/src/messages/portfolio/document/overlays/utility_types_web.rs:289-300 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:341-352 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:415-426 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:479-490 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/overlays/utility_types_web.rs:289` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document/overlays/utility_types_web.rs:284` calls `unwrap_or`, `set_stroke_style_str` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs:411` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) node-graph/libraries/rendering/src/renderer.rs:1850 — node-graph/libraries/rendering/src/renderer.rs:1850-1861 | node-graph/libraries/rendering/src/renderer.rs:1939-1949 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/rendering/src/renderer.rs:1850` 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 (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) node-graph/nodes/brush/src/basic_brush/pipeline.rs:303 — node-graph/nodes/brush/src/basic_brush/pipeline.rs:303-313 | node-graph/nodes/gstd/src/render_background.rs:233-243 | node-graph/nodes/gstd/src/render_background.rs:262-272 | node-graph/nodes/gstd/src/render_background.rs:304-314 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/brush/src/basic_brush/pipeline.rs:303` 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 (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:93 — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:93-102 | editor/src/messages/tool/common_functionality/shapes/line_shape.rs:110-120 — 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 `editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:3279 — editor/src/messages/tool/tool_messages/path_tool.rs:3279-3286 | editor/src/messages/tool/tool_messages/select_tool.rs:1982-1992 — 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 `editor/src/messages/tool/tool_messages/path_tool.rs:3279` 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 (4–11 lines × 3) · ×1
  • Duplicated block (4–11 lines × 3) node-graph/libraries/rendering/src/renderer.rs:979 — node-graph/libraries/rendering/src/renderer.rs:979-987 | node-graph/libraries/rendering/src/renderer.rs:1027-1037 | node-graph/libraries/rendering/src/renderer.rs:1042-1045 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `node-graph/libraries/rendering/src/renderer.rs:987` calls `extend` and `node-graph/libraries/rendering/src/renderer.rs:1045` does not — after which the two agree again for 5 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.
D4 · Code Duplication · Duplicated block (3–9 lines × 4) · ×1
  • Duplicated block (3–9 lines × 4) editor/src/messages/portfolio/document_migration.rs:2062 — editor/src/messages/portfolio/document_migration.rs:2062-2064 | editor/src/messages/portfolio/document_migration.rs:2686-2690 | editor/src/messages/portfolio/document_migration.rs:3152-3160 | editor/src/messages/portfolio/document_migration.rs:3166-3174 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) editor/src/messages/tool/common_functionality/utility_functions.rs:124 — editor/src/messages/tool/common_functionality/utility_functions.rs:124-132 | editor/src/messages/tool/common_functionality/utility_functions.rs:167-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) editor/src/messages/tool/tool_messages/path_tool.rs:2913 — editor/src/messages/tool/tool_messages/path_tool.rs:2913-2926 | editor/src/messages/tool/tool_messages/path_tool.rs:3028-3039 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/tool/tool_messages/path_tool.rs:2913` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–8 lines × 6) · ×1
  • Duplicated block (7–8 lines × 6) node-graph/libraries/rendering/src/renderer.rs:848 — node-graph/libraries/rendering/src/renderer.rs:848-855 | node-graph/libraries/rendering/src/renderer.rs:1641-1648 | node-graph/libraries/rendering/src/renderer.rs:2404-2411 | node-graph/libraries/rendering/src/renderer.rs:2434-2440 | node-graph/libraries/rendering/src/renderer.rs:2674-2681 | node-graph/libraries/rendering/src/renderer.rs:2860-2867 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/libraries/rendering/src/renderer.rs:2401` calls `push`, `to_string` and `node-graph/libraries/rendering/src/renderer.rs:2432` 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.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:161 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:161-166 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:213-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) editor/src/messages/portfolio/document_migration.rs:3714 — editor/src/messages/portfolio/document_migration.rs:3714-3730 | editor/src/messages/portfolio/document_storage_io.rs:433-451 — 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 `editor/src/messages/portfolio/document_migration.rs:3714` 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–8 lines × 3) · ×1
  • Duplicated block (5–8 lines × 3) node-graph/libraries/core-types/src/types.rs:453 — node-graph/libraries/core-types/src/types.rs:453-460 | node-graph/libraries/core-types/src/types.rs:463-470 | node-graph/libraries/core-types/src/types.rs:472-476 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/libraries/core-types/src/types.rs:453` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/libraries/core-types/src/types.rs:453` calls `Some`, `find_matching_angle_bracket` and `node-graph/libraries/core-types/src/types.rs:472` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–8 lines × 3) · ×1
  • Duplicated block (3–8 lines × 3) node-graph/libraries/rendering/src/renderer.rs:803 — node-graph/libraries/rendering/src/renderer.rs:803-810 | node-graph/libraries/rendering/src/renderer.rs:888-895 | node-graph/libraries/rendering/src/renderer.rs:1465-1467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `item` to `ItemRef<'_, Graphic>` in one and `ItemRef<'_, Vector>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `node-graph/libraries/rendering/src/renderer.rs:803` calls `attribute_cloned_or` and `node-graph/libraries/rendering/src/renderer.rs:1465` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5–7 lines × 6) · ×1
  • Duplicated block (5–7 lines × 6) node-graph/nodes/raster/src/adjustments.rs:1251 — node-graph/nodes/raster/src/adjustments.rs:1251-1257 | node-graph/nodes/raster/src/adjustments.rs:1258-1264 | node-graph/nodes/raster/src/adjustments.rs:1265-1271 | node-graph/nodes/raster/src/adjustments.rs:1272-1278 | node-graph/nodes/raster/src/adjustments.rs:1279-1285 | node-graph/nodes/raster/src/adjustments.rs:1286-1290 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `node-graph/nodes/raster/src/adjustments.rs:1251` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 3) · ×1
  • Duplicated block (6–7 lines × 3) editor/src/messages/portfolio/document/graph_operation/utility_types.rs:163 — editor/src/messages/portfolio/document/graph_operation/utility_types.rs:163-169 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:172-179 | editor/src/messages/portfolio/document/graph_operation/utility_types.rs:181-186 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document/graph_operation/utility_types.rs:163` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document/graph_operation/utility_types.rs:163` calls `default_node_template` and `editor/src/messages/portfolio/document/graph_operation/utility_types.rs:181` 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.
D4 · Code Duplication · Duplicated block (2–7 lines × 8) · ×1
  • Duplicated block (2–7 lines × 8) editor/src/messages/portfolio/document_migration.rs:2745 — editor/src/messages/portfolio/document_migration.rs:2745-2748 | editor/src/messages/portfolio/document_migration.rs:2758-2760 | editor/src/messages/portfolio/document_migration.rs:2764-2770 | editor/src/messages/portfolio/document_migration.rs:2778-2784 | editor/src/messages/portfolio/document_migration.rs:2819-2821 | editor/src/messages/portfolio/document_migration.rs:3785-3786 | editor/src/messages/portfolio/document_migration.rs:3801-3802 | editor/src/messages/portfolio/document_migration.rs:3815-3816 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:2764` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `editor/src/messages/portfolio/document_migration.rs:2784` calls `replace_implementation` and `editor/src/messages/portfolio/document_migration.rs:2760` does not — after which the two agree again for 5 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.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) node-graph/node-macro/src/parsing.rs:202 — node-graph/node-macro/src/parsing.rs:202-208 | proc-macros/src/editor_commands.rs:82-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (1–6 lines × 3) · ×1
  • Duplicated block (1–6 lines × 3) node-graph/nodes/raster/src/adjustments.rs:1735 — node-graph/nodes/raster/src/adjustments.rs:1735-1740 | node-graph/nodes/raster/src/adjustments.rs:1742-1747 | node-graph/nodes/raster/src/adjustments.rs:2015-2015 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–11 lines × 2) · ×1
  • Duplicated block (6–11 lines × 2) tools/node-docs/src/page_category.rs:92 — tools/node-docs/src/page_category.rs:92-97 | tools/node-docs/src/page_node.rs:234-244 — 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 (2–5 lines × 6) · ×1
  • Duplicated block (2–5 lines × 6) editor/src/messages/portfolio/document_migration.rs:2761 — editor/src/messages/portfolio/document_migration.rs:2761-2765 | editor/src/messages/portfolio/document_migration.rs:2786-2790 | editor/src/messages/portfolio/document_migration.rs:2822-2826 | editor/src/messages/portfolio/document_migration.rs:3786-3787 | editor/src/messages/portfolio/document_migration.rs:3802-3803 | editor/src/messages/portfolio/document_migration.rs:3816-3817 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/portfolio/document_migration.rs:2761` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `editor/src/messages/portfolio/document_migration.rs:2761` calls `iter`, `take`, `enumerate` and `editor/src/messages/portfolio/document_migration.rs:3786` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) node-graph/libraries/rendering/src/renderer.rs:3055 — node-graph/libraries/rendering/src/renderer.rs:3055-3063 | node-graph/libraries/rendering/src/renderer.rs:3176-3184 | node-graph/libraries/rendering/src/renderer.rs:3257-3265 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `node-graph/libraries/rendering/src/renderer.rs:3266` calls `attribute_cloned_or` and `node-graph/libraries/rendering/src/renderer.rs:3064` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×1
  • Duplicated block (28 lines × 2) editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1248 — editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1248-1275 | editor/src/messages/portfolio/document/overlays/utility_types_web.rs:1119-1146 — before extracting anything, compare `editor/src/messages/portfolio/document/overlays/utility_types_native.rs` and `editor/src/messages/portfolio/document/overlays/utility_types_web.rs` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 153 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) desktop/ui/src/internal/browser_process_handler.rs:9 — desktop/ui/src/internal/browser_process_handler.rs:9-44 | desktop/ui/src/internal/context_menu_handler.rs:9-65 — 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 `desktop/ui/src/internal/browser_process_handler.rs:9` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) editor/src/messages/layout/layout_message_handler.rs:460 — editor/src/messages/layout/layout_message_handler.rs:460-471 | editor/src/messages/layout/layout_message_handler.rs:490-501 | editor/src/messages/layout/layout_message_handler.rs:540-551 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `editor/src/messages/layout/layout_message_handler.rs:460` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D5 · Coupling · Unstable project document-live · ×1
  • Unstable project document-live — document-live has instability 0.83 with 1 dependents.
D5 · Coupling · Unstable project graphic-nodes · ×1
  • Unstable project graphic-nodes — graphic-nodes has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project graphite-editor · ×1
  • Unstable project graphite-editor — graphite-editor has instability 0.85 with 3 dependents.
D5 · Coupling · Unstable project math-nodes · ×1
  • Unstable project math-nodes — math-nodes has instability 0.88 with 1 dependents.
D5 · Coupling · Unstable project path-bool-nodes · ×1
  • Unstable project path-bool-nodes — path-bool-nodes has instability 0.83 with 1 dependents.
D5 · Coupling · Unstable project vectorize-nodes · ×1
  • Unstable project vectorize-nodes — vectorize-nodes has instability 0.88 with 1 dependents.
R10 · Code Duplication · Duplicated block with local edits (45 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (45 matched lines × 2 locations) frontend/src/stores/app-window.ts:26 — frontend/src/stores/app-window.ts:26 · frontend/src/stores/document.ts:38 — the two spans are one implementation copied and then locally edited — 276 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) frontend/src/components/widgets/inputs/TextAreaInput.svelte:4 — frontend/src/components/widgets/inputs/TextAreaInput.svelte:4 · frontend/src/components/widgets/inputs/TextInput.svelte:4 — the two spans are one implementation copied and then locally edited — 147 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 (20 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (20 matched lines × 2 locations) frontend/src/utility-functions/clipboard.ts:1 — frontend/src/utility-functions/clipboard.ts:1 · frontend/src/utility-functions/clipboard.ts:52 — the two spans are one implementation copied and then locally edited — 176 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 (19 lines × 2 locations) · ×1
  • Duplicated block (19 lines × 2 locations) frontend/src/components/layout/LayoutCol.svelte:4 — frontend/src/components/layout/LayoutCol.svelte:4 · frontend/src/components/layout/LayoutRow.svelte:4 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) frontend/src/components/widgets/WidgetSpan.svelte:269 — frontend/src/components/widgets/WidgetSpan.svelte:269 · frontend/src/components/widgets/WidgetSpan.svelte:287 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases.
R10 · Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (11 matched lines × 2 locations) frontend/vite.config.ts:40 — frontend/vite.config.ts:40 · frontend/vite.config.ts:60 — 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 (9 lines × 3 locations) · ×1
  • Duplicated block (9 lines × 3 locations) frontend/src/components/panels/Layers.svelte:175 — frontend/src/components/panels/Layers.svelte:175 · frontend/src/components/panels/Layers.svelte:193 · frontend/src/components/widgets/inputs/NumberInput.svelte:150 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (9 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (9 matched lines × 2 locations) frontend/src/components/widgets/inputs/CheckboxInput.svelte:6 — frontend/src/components/widgets/inputs/CheckboxInput.svelte:6 · frontend/src/components/widgets/inputs/TextInput.svelte:4 — the two spans are one implementation copied and then locally edited — 55 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 (8 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (8 matched lines × 2 locations) frontend/src/components/widgets/inputs/DropdownInput.svelte:144 — frontend/src/components/widgets/inputs/DropdownInput.svelte:144 · frontend/src/utility-functions/input.ts:297 — the two spans are one implementation copied and then locally edited — 54 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 (8 lines × 3 locations) · ×1
  • Duplicated block (8 lines × 3 locations) frontend/src/components/widgets/inputs/SliderInput.svelte:623 — frontend/src/components/widgets/inputs/SliderInput.svelte:623 · frontend/src/components/widgets/inputs/SliderInput.svelte:633 · frontend/src/components/widgets/inputs/VisualColorPickersInput.svelte:146 — 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 (7 lines × 4 locations) · ×1
  • Duplicated block (7 lines × 4 locations) frontend/src/stores/app-window.ts:26 — frontend/src/stores/app-window.ts:26 · frontend/src/stores/document.ts:38 · frontend/src/stores/fullscreen.ts:19 · frontend/src/stores/tooltip.ts:43 — the 4 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are.
R10 · Code Duplication · Duplicated block (6 lines × 3 locations) · ×1
  • Duplicated block (6 lines × 3 locations) frontend/src/components/layout/FloatingMenu.svelte:91 — frontend/src/components/layout/FloatingMenu.svelte:91 · frontend/src/components/layout/LayoutCol.svelte:17 · frontend/src/components/layout/LayoutRow.svelte:18 — the 3 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. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete.
R10 · Code Duplication · Duplicated block with local edits (6 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (6 matched lines × 2 locations) frontend/src/utility-functions/rasterization.ts:4 — frontend/src/utility-functions/rasterization.ts:4 · frontend/src/utility-functions/rasterization.ts:65 — 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 (5 lines × 5 locations) · ×1
  • Duplicated block (5 lines × 5 locations) frontend/src/components/layout/FloatingMenu.svelte:29 — frontend/src/components/layout/FloatingMenu.svelte:29 · frontend/src/components/layout/LayoutCol.svelte:4 · frontend/src/components/layout/LayoutRow.svelte:4 · frontend/src/components/widgets/inputs/FieldInput.svelte:14 · +1 more site(s) not listed — the 5 copies are spread across 5 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 (5 lines × 6 locations) · ×1
  • Duplicated block (5 lines × 6 locations) frontend/src/stores/app-window.ts:20 — frontend/src/stores/app-window.ts:20 · frontend/src/stores/color-picker.ts:26 · frontend/src/stores/dialog.ts:28 · frontend/src/stores/document.ts:28 · +2 more site(s) not listed — the 6 copies are spread across 6 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function positionAndStyleFloatingMenu (cyclomatic 58, cognitive 79) · ×1
  • Complex function positionAndStyleFloatingMenu (cyclomatic 58, cognitive 79) frontend/src/components/layout/FloatingMenu.svelte:213 — positionAndStyleFloatingMenu has cyclomatic complexity 58 and cognitive complexity 79; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleKey (cyclomatic 42, cognitive 51) · ×1
  • Complex function handleKey (cyclomatic 42, cognitive 51) frontend/src/components/floating-menus/MenuList.svelte:490 — handleKey has cyclomatic complexity 42 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 onKeyDown (cyclomatic 37, cognitive 46) · ×1
  • Complex function onKeyDown (cyclomatic 37, cognitive 46) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:910 — onKeyDown has cyclomatic complexity 37 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function shouldRedirectKeyboardEventToBackend (cyclomatic 33, cognitive 30) · ×1
  • Complex function shouldRedirectKeyboardEventToBackend (cyclomatic 33, cognitive 30) frontend/src/utility-functions/input.ts:29 — shouldRedirectKeyboardEventToBackend has cyclomatic complexity 33 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 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 32, cognitive 54) · ×1
  • Complex function render (cyclomatic 32, cognitive 54) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:145 — render has cyclomatic complexity 32 and cognitive complexity 54; 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 onBeforeInput (cyclomatic 30, cognitive 29) · ×1
  • Complex function onBeforeInput (cyclomatic 30, cognitive 29) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:828 — onBeforeInput has cyclomatic complexity 30 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 parseMarkdown (cyclomatic 21, cognitive 37) · ×1
  • Complex function parseMarkdown (cyclomatic 21, cognitive 37) REDACTED:10 — parseMarkdown has cyclomatic complexity 21 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 stepThroughBrackets (cyclomatic 21, cognitive 30) · ×1
  • Complex function stepThroughBrackets (cyclomatic 21, cognitive 30) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:535 — stepThroughBrackets has cyclomatic complexity 21 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 dragPointerUp (cyclomatic 21, cognitive 25) · ×1
  • Complex function dragPointerUp (cyclomatic 21, cognitive 25) frontend/src/components/window/Panel.svelte:215 — dragPointerUp 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 getLocalizedScanCode (cyclomatic 20, cognitive 33) · ×1
  • Complex function getLocalizedScanCode (cyclomatic 20, cognitive 33) frontend/src/utility-functions/keyboard-entry.ts:41 — getLocalizedScanCode has cyclomatic complexity 20 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 dragPointerMove (cyclomatic 20, cognitive 22) · ×1
  • Complex function dragPointerMove (cyclomatic 20, cognitive 22) frontend/src/components/window/Panel.svelte:139 — dragPointerMove has cyclomatic complexity 20 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 pointerOver (cyclomatic 19, cognitive 17) · ×1
  • Complex function pointerOver (cyclomatic 19, cognitive 17) frontend/src/components/floating-menus/MenuList.svelte:329 — pointerOver has cyclomatic complexity 19 and cognitive complexity 17; 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 readAtCaret (cyclomatic 18, cognitive 21) · ×1
  • Complex function readAtCaret (cyclomatic 18, cognitive 21) frontend/src/utility-functions/clipboard.ts:1 — readAtCaret has cyclomatic complexity 18 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 tabBetweenTextFields (cyclomatic 17, cognitive 16) · ×1
  • Complex function tabBetweenTextFields (cyclomatic 17, cognitive 16) frontend/src/utility-functions/input.ts:395 — tabBetweenTextFields has cyclomatic complexity 17 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 onPotentialDoubleClick (cyclomatic 17, cognitive 15) · ×1
  • Complex function onPotentialDoubleClick (cyclomatic 17, cognitive 15) frontend/src/utility-functions/input.ts:188 — onPotentialDoubleClick has cyclomatic complexity 17 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 keyboardHintIcon (cyclomatic 17, cognitive 9) · ×1
  • Complex function keyboardHintIcon (cyclomatic 17, cognitive 9) frontend/src/components/widgets/labels/ShortcutLabel.svelte:59 — keyboardHintIcon has cyclomatic complexity 17 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resizePanel (cyclomatic 16, cognitive 16) · ×1
  • Complex function resizePanel (cyclomatic 16, cognitive 16) frontend/src/components/window/PanelSubdivision.svelte:47 — resizePanel has cyclomatic complexity 16 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 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 updateConstant (cyclomatic 16, cognitive 14) · ×1
  • Complex function updateConstant (cyclomatic 16, cognitive 14) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:346 — updateConstant has cyclomatic complexity 16 and cognitive complexity 14; 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 draggingPointerMove (cyclomatic 15, cognitive 19) · ×1
  • Complex function draggingPointerMove (cyclomatic 15, cognitive 19) frontend/src/components/panels/Layers.svelte:898 — draggingPointerMove has cyclomatic complexity 15 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.
R2 · Cyclomatic Complexity · Complex function onPointerDown (cyclomatic 15, cognitive 16) · ×1
  • Complex function onPointerDown (cyclomatic 15, cognitive 16) frontend/src/utility-functions/input.ts:139 — onPointerDown has cyclomatic complexity 15 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 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 chainDraggingPointerUp (cyclomatic 15, cognitive 10) · ×1
  • Complex function chainDraggingPointerUp (cyclomatic 15, cognitive 10) frontend/src/components/panels/Layers.svelte:855 — chainDraggingPointerUp has cyclomatic complexity 15 and cognitive complexity 10; 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 14, cognitive 18) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 18) frontend/src/components/panels/Layers.svelte:617 — (anonymous) has cyclomatic complexity 14 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 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 moveActiveMidpoint (cyclomatic 14, cognitive 14) · ×1
  • Complex function moveActiveMidpoint (cyclomatic 14, cognitive 14) frontend/src/components/widgets/inputs/SliderInput.svelte:495 — moveActiveMidpoint has cyclomatic complexity 14 and cognitive complexity 14; 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 14, cognitive 14) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 14) frontend/src/utility-functions/persistence.ts:174 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 14; 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 14, cognitive 12) · ×1
  • Complex function (anonymous) (cyclomatic 14, cognitive 12) frontend/src/components/widgets/labels/ShortcutLabel.svelte:37 — (anonymous) has cyclomatic complexity 14 and cognitive complexity 12; 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 watchOpen (cyclomatic 14, cognitive 10) · ×1
  • Complex function watchOpen (cyclomatic 14, cognitive 10) frontend/src/components/floating-menus/MenuList.svelte:113 — watchOpen has cyclomatic complexity 14 and cognitive complexity 10; 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 insertAtCaret (cyclomatic 13, cognitive 15) · ×1
  • Complex function insertAtCaret (cyclomatic 13, cognitive 15) frontend/src/utility-functions/clipboard.ts:52 — insertAtCaret has cyclomatic complexity 13 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 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 browserVersion (cyclomatic 13, cognitive 14) · ×1
  • Complex function browserVersion (cyclomatic 13, cognitive 14) frontend/src/utility-functions/platform.ts:1 — browserVersion has cyclomatic complexity 13 and cognitive complexity 14; 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 onPointerMove (cyclomatic 13, cognitive 13) · ×1
  • Complex function onPointerMove (cyclomatic 13, cognitive 13) frontend/src/managers/drag-toggle.ts:84 — onPointerMove has cyclomatic complexity 13 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 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 chainDraggingPointerMove (cyclomatic 12, cognitive 14) · ×1
  • Complex function chainDraggingPointerMove (cyclomatic 12, cognitive 14) frontend/src/components/panels/Layers.svelte:748 — chainDraggingPointerMove has cyclomatic complexity 12 and cognitive complexity 14; 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 typeIntoSearch (cyclomatic 12, cognitive 12) · ×1
  • Complex function typeIntoSearch (cyclomatic 12, cognitive 12) frontend/src/components/floating-menus/MenuList.svelte:596 — typeIntoSearch has cyclomatic complexity 12 and cognitive complexity 12; 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 detectDockingEdge (cyclomatic 12, cognitive 12) · ×1
  • Complex function detectDockingEdge (cyclomatic 12, cognitive 12) frontend/src/components/window/Panel.svelte:290 — detectDockingEdge has cyclomatic complexity 12 and cognitive complexity 12; 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 clippingHover (cyclomatic 12, cognitive 11) · ×1
  • Complex function clippingHover (cyclomatic 12, cognitive 11) frontend/src/components/panels/Layers.svelte:455 — clippingHover has cyclomatic complexity 12 and cognitive complexity 11; 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 updateExact (cyclomatic 12, cognitive 11) · ×1
  • Complex function updateExact (cyclomatic 12, cognitive 11) frontend/src/components/widgets/inputs/NumberInput.svelte:237 — updateExact has cyclomatic complexity 12 and cognitive complexity 11; 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 hoverTransfer (cyclomatic 11, cognitive 15) · ×1
  • Complex function hoverTransfer (cyclomatic 11, cognitive 15) frontend/src/components/layout/FloatingMenu.svelte:405 — hoverTransfer has cyclomatic complexity 11 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 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 updateEyedropperSamplingState (cyclomatic 11, cognitive 13) · ×1
  • Complex function updateEyedropperSamplingState (cyclomatic 11, cognitive 13) frontend/src/components/panels/Document.svelte:231 — updateEyedropperSamplingState has cyclomatic complexity 11 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 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 updateValue (cyclomatic 11, cognitive 13) · ×1
  • Complex function updateValue (cyclomatic 11, cognitive 13) frontend/src/components/widgets/inputs/NumberInput.svelte:212 — updateValue has cyclomatic complexity 11 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 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 11, cognitive 11) · ×1
  • Complex function (anonymous) (cyclomatic 11, cognitive 11) frontend/src/components/floating-menus/NodeCatalog.svelte:44 — (anonymous) has cyclomatic complexity 11 and cognitive complexity 11; 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 adjustConstant (cyclomatic 11, cognitive 11) · ×1
  • Complex function adjustConstant (cyclomatic 11, cognitive 11) frontend/src/components/widgets/inputs/MathExpressionInput.svelte:418 — adjustConstant has cyclomatic complexity 11 and cognitive complexity 11; 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 onKeyDown (cyclomatic 11, cognitive 11) · ×1
  • Complex function onKeyDown (cyclomatic 11, cognitive 11) frontend/src/utility-functions/input.ts:74 — onKeyDown has cyclomatic complexity 11 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · frontend/src/components/views/Graph.svelte · ×1
  • frontend/src/components/views/Graph.svelte: 1722 lines of code frontend/src/components/views/Graph.svelte:1 — frontend/src/components/views/Graph.svelte has 1722 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/panels/Layers.svelte · ×1
  • frontend/src/components/panels/Layers.svelte: 1717 lines of code frontend/src/components/panels/Layers.svelte:1 — frontend/src/components/panels/Layers.svelte has 1717 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/widgets/inputs/NumberInput.svelte · ×1
  • frontend/src/components/widgets/inputs/NumberInput.svelte: 1143 lines of code frontend/src/components/widgets/inputs/NumberInput.svelte:1 — frontend/src/components/widgets/inputs/NumberInput.svelte has 1143 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/widgets/inputs/MathExpressionInput.svelte · ×1
  • frontend/src/components/widgets/inputs/MathExpressionInput.svelte: 1140 lines of code frontend/src/components/widgets/inputs/MathExpressionInput.svelte:1 — frontend/src/components/widgets/inputs/MathExpressionInput.svelte has 1140 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/icons.ts · ×1
  • frontend/src/icons.ts: 1045 lines of code frontend/src/icons.ts:1 — frontend/src/icons.ts has 1045 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/panels/Document.svelte · ×1
  • frontend/src/components/panels/Document.svelte: 938 lines of code frontend/src/components/panels/Document.svelte:1 — frontend/src/components/panels/Document.svelte has 938 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/widgets/inputs/SliderInput.svelte · ×1
  • frontend/src/components/widgets/inputs/SliderInput.svelte: 858 lines of code frontend/src/components/widgets/inputs/SliderInput.svelte:1 — frontend/src/components/widgets/inputs/SliderInput.svelte has 858 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/floating-menus/MenuList.svelte · ×1
  • frontend/src/components/floating-menus/MenuList.svelte: 764 lines of code frontend/src/components/floating-menus/MenuList.svelte:1 — frontend/src/components/floating-menus/MenuList.svelte has 764 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/utility-functions/keyboard-entry.ts · ×1
  • frontend/src/utility-functions/keyboard-entry.ts: 681 lines of code frontend/src/utility-functions/keyboard-entry.ts:1 — frontend/src/utility-functions/keyboard-entry.ts has 681 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/layout/FloatingMenu.svelte · ×1
  • frontend/src/components/layout/FloatingMenu.svelte: 662 lines of code frontend/src/components/layout/FloatingMenu.svelte:1 — frontend/src/components/layout/FloatingMenu.svelte has 662 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/window/Panel.svelte · ×1
  • frontend/src/components/window/Panel.svelte: 651 lines of code frontend/src/components/window/Panel.svelte:1 — frontend/src/components/window/Panel.svelte has 651 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · frontend/src/components/widgets/NodeSection.svelte · ×1
  • frontend/src/components/widgets/NodeSection.svelte: 499 lines of code frontend/src/components/widgets/NodeSection.svelte:1 — frontend/src/components/widgets/NodeSection.svelte has 499 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~1146 LoC) · ×1
  • Dead file (~1146 LoC) frontend/src/components/panels/Layers.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1059 LoC) · ×1
  • Dead file (~1059 LoC) frontend/src/icons.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~1056 LoC) · ×1
  • Dead file (~1056 LoC) frontend/src/components/widgets/inputs/MathExpressionInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~963 LoC) · ×1
  • Dead file (~963 LoC) frontend/src/components/widgets/inputs/NumberInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~739 LoC) · ×1
  • Dead file (~739 LoC) frontend/src/utility-functions/keyboard-entry.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~679 LoC) · ×1
  • Dead file (~679 LoC) frontend/src/components/floating-menus/MenuList.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~668 LoC) · ×1
  • Dead file (~668 LoC) frontend/src/components/widgets/inputs/SliderInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~602 LoC) · ×1
  • Dead file (~602 LoC) frontend/src/components/panels/Document.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~533 LoC) · ×1
  • Dead file (~533 LoC) frontend/src/components/layout/FloatingMenu.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~465 LoC) · ×1
  • Dead file (~465 LoC) frontend/src/utility-functions/input.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~392 LoC) · ×1
  • Dead file (~392 LoC) frontend/src/components/window/Panel.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~370 LoC) · ×1
  • Dead file (~370 LoC) frontend/src/stores/node-graph.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~360 LoC) · ×1
  • Dead file (~360 LoC) frontend/src/components/widgets/WidgetSpan.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~336 LoC) · ×1
  • Dead file (~336 LoC) frontend/src/components/views/Graph.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~299 LoC) · ×1
  • Dead file (~299 LoC) frontend/src/components/widgets/inputs/TransferCurveInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~281 LoC) · ×1
  • Dead file (~281 LoC) frontend/src/utility-functions/persistence.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~227 LoC) · ×1
  • Dead file (~227 LoC) frontend/src/utility-functions/colors.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~223 LoC) · ×1
  • Dead file (~223 LoC) frontend/src/stores/portfolio.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~206 LoC) · ×1
  • Dead file (~206 LoC) frontend/src/components/widgets/inputs/ScrollbarInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~202 LoC) · ×1
  • Dead file (~202 LoC) frontend/src/components/panels/Inspector.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~201 LoC) · ×1
  • Dead file (~201 LoC) frontend/src/components/widgets/inputs/RulerInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~189 LoC) · ×1
  • Dead file (~189 LoC) frontend/src/components/widgets/inputs/VisualColorPickersInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~187 LoC) · ×1
  • Dead file (~187 LoC) frontend/src/components/window/PanelSubdivision.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~173 LoC) · ×1
  • Dead file (~173 LoC) frontend/src/components/widgets/inputs/DropdownInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~165 LoC) · ×1
  • Dead file (~165 LoC) frontend/src/utility-functions/decimal.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~147 LoC) · ×1
  • Dead file (~147 LoC) frontend/src/stores/tooltip.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~134 LoC) · ×1
  • Dead file (~134 LoC) frontend/src/managers/drag-toggle.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~132 LoC) · ×1
  • Dead file (~132 LoC) frontend/src/stores/dialog.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~126 LoC) · ×1
  • Dead file (~126 LoC) frontend/src/utility-functions/auto-scroll.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~124 LoC) · ×1
  • Dead file (~124 LoC) frontend/src/utility-functions/widgets.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~121 LoC) · ×1
  • Dead file (~121 LoC) frontend/src/components/widgets/WidgetTable.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~120 LoC) · ×1
  • Dead file (~120 LoC) frontend/src/stores/color-picker.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~117 LoC) · ×1
  • Dead file (~117 LoC) REDACTED — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~111 LoC) · ×1
  • Dead file (~111 LoC) frontend/src/stores/document.ts — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~107 LoC) · ×1
  • Dead file (~107 LoC) frontend/src/components/widgets/inputs/FieldInput.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~105 LoC) · ×1
  • Dead file (~105 LoC) frontend/src/components/widgets/labels/ShortcutLabel.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~94 LoC) · ×1
  • Dead file (~94 LoC) frontend/src/components/floating-menus/NodeCatalog.svelte — no import path from any entry point (6 application, 7 tooling, 2 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@fontsource/stix-two-math' · ×1
  • Unused dependency '@fontsource/stix-two-math' — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'license-checker-rseidelsohn' · ×1
  • Unused dependency 'license-checker-rseidelsohn' — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency 'source-code-pro' · ×1
  • Unused dependency 'source-code-pro' — Declared in frontend/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
Minor — 103 finding(s)
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging desktop/ui/src/delegate.rs:32 — `debug!` at line 32 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/dirs.rs:13 — `error!` at line 13 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/dirs.rs:41 — `error!` at line 41 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/ipc.rs:73 — `error!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote.rs:29 — `error!` at line 29 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/resources.rs:38 — `error!` at line 38 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/host.rs:73 — `error!` at line 73 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/host.rs:105 — `warn!` at line 105 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:41 — `debug!` at line 41 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:105 — `error!` at line 105 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:122 — `error!` at line 122 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:148 — `error!` at line 148 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:206 — `info!` at line 206 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:279 — `debug!` at line 279 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:299 — `error!` at line 299 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/remote/spawn.rs:345 — `error!` at line 345 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/platform/mac.rs:61 — `error!` at line 61 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/display_handler.rs:117 — `error!` at line 117 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/display_handler.rs:118 — `warn!` at line 118 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `warn!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/display_handler.rs:119 — `info!` at line 119 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `info!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/display_handler.rs:120 — `debug!` at line 120 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `debug!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/display_handler.rs:121 — `trace!` at line 121 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `trace!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/life_span_handler.rs:32 — `error!` at line 32 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/render_process_handler.rs:78 — `error!` at line 78 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • Interpolated log message defeats structured logging desktop/ui/src/internal/render_process_v8_handler.rs:54 — `error!` at line 54 is handed a format string with `{…}` values in it, so tracing records one finished `message` field — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: `error!(order_id = %order_id, status = ?status, "order status updated")` (`%` records a value by its `Display`, `?` by its `Debug`, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: `error = %err`.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×23
  • Duplicated predicate libraries/rawkit/src/decoder/arw2.rs:37 — `cfa_pattern_width == 2 && cfa_pattern_height == 2` appears character-identically in 2 files — libraries/rawkit/src/decoder/arw2.rs, libraries/rawkit/src/decoder/uncompressed.rs. 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 desktop/ui/src/frames/plane/linux.rs:64 — `coded_size.width <= 0 || coded_size.height <= 0` appears character-identically in 3 files — desktop/ui/src/frames/plane/linux.rs, desktop/ui/src/frames/plane/mac.rs, desktop/ui/src/frames/plane/win.rs. 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 editor/src/messages/tool/tool_messages/artboard_tool.rs:68 — `in_gesture && self.fsm_state != previous_state` appears character-identically in 3 files — editor/src/messages/tool/tool_messages/artboard_tool.rs, editor/src/messages/tool/tool_messages/shape_tool.rs, editor/src/messages/tool/tool_messages/text_tool.rs. 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 editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs:93 — `is_dragged || (pos - mouse_position).length_squared() < BOUNDS_SELECT_THRESHOLD.powi(2)` appears character-identically in 2 files — editor/src/messages/tool/common_functionality/shapes/arrow_shape.rs, editor/src/messages/tool/common_functionality/shapes/line_shape.rs. 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 editor/src/messages/tool/tool_messages/select_tool.rs:2618 — `min.distance(expected[0]) < 1e-6 && max.distance(expected[1]) < 1e-6` appears character-identically in 2 files — editor/src/messages/tool/tool_messages/select_tool.rs, editor/src/messages/tool/tool_messages/shape_tool.rs. 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 editor/src/messages/portfolio/document/document_message_handler.rs:5094 — `min.distance(expected_min) < 1e-6 && max.distance(expected_max) < 1e-6` appears character-identically in 5 files — editor/src/messages/portfolio/document/document_message_handler.rs, editor/src/messages/tool/common_functionality/resize.rs, editor/src/messages/tool/tool_messages/artboard_tool.rs, editor/src/messages/tool/tool_messages/select_tool.rs. 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 node-graph/libraries/graphic-types/src/graphic.rs:263 — `parent_has_fill || item.attribute::<f64>(ATTR_OPACITY_FILL).is_some()` appears character-identically in 2 files — node-graph/libraries/graphic-types/src/graphic.rs, node-graph/nodes/path-bool/src/lib.rs. 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 node-graph/libraries/graphic-types/src/graphic.rs:259 — `parent_has_opacity || item.attribute::<f64>(ATTR_OPACITY).is_some()` appears character-identically in 2 files — node-graph/libraries/graphic-types/src/graphic.rs, node-graph/nodes/path-bool/src/lib.rs. 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 node-graph/libraries/graphic-types/src/graphic.rs:255 — `parent_has_transform || item.attribute::<DAffine2>(ATTR_TRANSFORM).is_some()` appears character-identically in 2 files — node-graph/libraries/graphic-types/src/graphic.rs, node-graph/nodes/path-bool/src/lib.rs. 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 node-graph/nodes/vector/src/vector_nodes.rs:4244 — `point.x >= -1e-6 && point.x <= 10. + 1e-6` appears character-identically in 2 files — node-graph/nodes/vector/src/vector_nodes.rs, node-graph/nodes/vector/src/voronoi.rs. 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 node-graph/nodes/vector/src/vector_nodes.rs:4245 — `point.y >= -1e-6 && point.y <= 10. + 1e-6` appears character-identically in 2 files — node-graph/nodes/vector/src/vector_nodes.rs, node-graph/nodes/vector/src/voronoi.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:203 — `self.all && self.anchors && self.curvature_comb` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:183 — `self.all && self.anchors && self.handles` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:199 — `self.all && self.anchors && self.path_direction` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:191 — `self.all && self.anchors && self.path_ends` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:195 — `self.all && self.anchors && self.path_index` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:187 — `self.all && self.anchors && self.point_index` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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 editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:89 — `self.number_of_points_dial.is_dragging() || self.number_of_points_dial.is_hovering()` appears character-identically in 2 files — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs, editor/src/messages/tool/common_functionality/shapes/star_shape.rs. 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 editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:27 — `self.number_of_points_dial.is_hovering() || self.point_radius_handle.hovered()` appears character-identically in 2 files — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs, editor/src/messages/tool/common_functionality/shapes/star_shape.rs. 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 editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs:93 — `self.point_radius_handle.is_dragging_or_snapped() || self.point_radius_handle.hovered()` appears character-identically in 2 files — editor/src/messages/tool/common_functionality/shapes/polygon_shape.rs, editor/src/messages/tool/common_functionality/shapes/star_shape.rs. 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 editor/src/messages/tool/tool_messages/path_tool.rs:661 — `self.selection_mode.is_none() && above_threshold` appears character-identically in 2 files — editor/src/messages/tool/tool_messages/path_tool.rs, editor/src/messages/tool/tool_messages/select_tool.rs. 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 node-graph/nodes/vector/src/generator_nodes.rs:457 — `staggered && topology.supports_staggered()` appears character-identically in 2 files — node-graph/nodes/vector/src/generator_nodes.rs, node-graph/nodes/vector/src/grid_topology.rs. 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 editor/src/messages/portfolio/document/overlays/utility_types_native.rs:1271 — `translation.x.abs() > 1e-3 && translation.y.abs() > 1e-3` appears character-identically in 2 files — editor/src/messages/portfolio/document/overlays/utility_types_native.rs, editor/src/messages/portfolio/document/overlays/utility_types_web.rs. 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.
D34 · Knowledge Freshness · Orphaned file · ×17
  • Orphaned file libraries/rawkit/src/tiff/types.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file node-graph/libraries/core-types/src/color/discrete_srgb.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/lib.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/tiff/tags.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file proc-macros/src/helper_structs.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file proc-macros/src/hierarchical_tree.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/decoder/arw2.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/tiff/mod.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/tiff/file.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file proc-macros/src/helpers.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file node-graph/libraries/core-types/src/math/bbox.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/decoder/arw1.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file editor/src/messages/tool/common_functionality/auto_panning.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/rawkit-proc-macros/src/build_camera_data.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/metadata/camera_data.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/tiff/values.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file libraries/rawkit/src/postprocessing/gamma_correction.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 43 significant file(s) lose their only recent owner: libraries/math-parser/src/lib.rs, editor/src/messages/tool/common_functionality/snap_session.rs, frontend/src/icons.ts, libraries/snapping/src/solve.rs, libraries/math-parser/src/constants.rs, editor/src/messages/color_picker/color_picker_message_handler.rs, libraries/math-parser/src/sort.rs, editor/src/messages/layout/utility_types/widgets/input_widgets.rs (+35 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 30 significant file(s) lose their only recent owner: desktop/src/window/win/native_handle.rs, desktop/ui/src/context.rs, desktop/bundle/src/mac.rs, desktop/ui/src/input.rs, node-graph/nodes/gstd/src/render_pixel_preview.rs, desktop/ui/src/frames/import.rs, desktop/ui/src/lib.rs, node-graph/libraries/brush-types/src/cache.rs (+22 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: document/graph-storage/src/session.rs, document/graph-storage/src/document.rs, document/format/src/persist.rs, document/graph-storage/src/history.rs, editor/src/messages/portfolio/document/utility_types/network_interface/store/accessors.rs, document/graph-storage/src/crdt.rs, document/graph-storage/src/registry.rs, document/container/src/archive.rs (+3 more). Pair on, review, or document these before any departure.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×3
  • REDACTED
  • REDACTED
  • REDACTED
P10 · Library API & versioning · Implementation type on the public API · ×2
  • Implementation type on the public API node-graph/libraries/canvas-utils/src/wasm.rs:166 — 1 public type in `graphene_canvas_utils.wasm` is marked as implementation by its own namespace, folder or name: `CanvasImpl` (node-graph/libraries/canvas-utils/src/wasm.rs:166, name ends in `Impl`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API node-graph/libraries/core-types/src/context.rs:587 — 2 public types in `core_types.context` are marked as implementation by their own namespace, folder or name: `OwnedContextImpl` (node-graph/libraries/core-types/src/context.rs:587, name ends in `Impl`), `ContextImpl` (node-graph/libraries/core-types/src/context.rs:829, name ends in `Impl`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
X7 · Silent fallback defaults · Silent fallback default on Err · ×2
  • Silent fallback default on Err desktop/src/preferences.rs:41 — `read` turns every `Err` into `Preferences::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err editor/src/messages/portfolio/document/utility_types/network_interface/queries.rs:839 — `output_description` turns every `Err` into `String::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (85 single-owned of 556 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 556 of the 870 production source files in this repository met that bar). They are anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: node-graph/libraries/animation/src/lib.rs.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no build, run or usage example README.md:1 — the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
D24 · Comment Value · redundant comment · ×1
  • redundant comment website/static/js/page/contributor-guide/bisect-tool.js:575 — "Test build button" repeats the code it sits on: 3 of its 3 words (test, build, button) are already in `elements.testBuildButton?.addEventListener("click", () =>`. 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 — 2 of 75 project(s) overshoot their size bounds, lowering Project Cohesion to 9.5/10. The most over is `editor` (105742 LoC, 718 module-visible types across 61 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.
D30 · Dependency Vulnerabilities · Low CVE · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 17 of 556 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 556 of the 870 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: libraries/rawkit/src/tiff/types.rs, node-graph/libraries/core-types/src/color/discrete_srgb.rs, libraries/rawkit/src/lib.rs, libraries/rawkit/src/tiff/tags.rs, proc-macros/src/helper_structs.rs, libraries/rawkit/src/decoder/arw2.rs, proc-macros/src/hierarchical_tree.rs, libraries/rawkit/src/tiff/mod.rs (and 9 more). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No architecture diagram/doc · ×1
  • No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 24/29 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `desktop/bundle`, `desktop/platform/linux`, `desktop/platform/mac`, `desktop/platform/win`, `document/migrations/snapshot`.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation frontend/package.json:13 — `frontend/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.)
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/3 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
Minor — 18 finding(s)
D12 · Dependency Hygiene · Outdated · ×18
  • Outdated: cef — `cef` is locked at 156.3.0+156.0.15 but 156.4.0+156.0.26 is the current stable release on crates.io, and it already satisfies the `"156"` requirement declared in desktop/ui/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cef` and commit the updated REDACTED.
  • Outdated: cef-dll-sys — `cef-dll-sys` is locked at 156.3.0+156.0.15 but 156.4.0+156.0.26 is the current stable release on crates.io, and it already satisfies the `"156"` requirement declared in desktop/bundle/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cef-dll-sys` and commit the updated REDACTED.
  • Outdated: ctor — `ctor` is locked at 1.0.13 but 1.0.14 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in document/migrations/core/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ctor` and commit the updated REDACTED.
  • Outdated: fancy-regex — `fancy-regex` is locked at 0.20.0 but 0.20.2 is the current stable release on crates.io, and it already satisfies the `"0.20.0"` requirement declared in node-graph/nodes/text/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fancy-regex` and commit the updated REDACTED.
  • Outdated: fixedbitset — `fixedbitset` is locked at 0.5.7 but 0.5.9 is the current stable release on crates.io, and it already satisfies the `"0.5.7"` requirement declared in node-graph/libraries/vector-types/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fixedbitset` and commit the updated REDACTED.
  • Outdated: flate2 — `flate2` is locked at 1.1.10 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in tools/cargo-run/internal/download/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
  • Outdated: glam — `glam` is locked at 0.34.2 but 0.34.3 is the current stable release on crates.io, and it already satisfies the `"0.34"` requirement declared in desktop/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p glam` and commit the updated REDACTED.
  • Outdated: interprocess — `interprocess` is locked at 2.4.7 but 2.4.8 is the current stable release on crates.io, and it already satisfies the `"2.4.2"` requirement declared in desktop/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p interprocess` and commit the updated REDACTED.
  • Outdated: mmap-io — `mmap-io` is locked at 1.1.0 but 1.2.0 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in document/container/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p mmap-io` and commit the updated REDACTED.
  • Outdated: notify — `notify` is locked at 8.2.1 but 8.2.2 is the current stable release on crates.io, and it already satisfies the `"8.2.0"` requirement declared in tools/cargo-run/internal/watch/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p notify` and commit the updated REDACTED.
  • Outdated: smallvec — `smallvec` is locked at 1.16.4 but 1.16.5 is the current stable release on crates.io, and it already satisfies the `"1.13.2"` requirement declared in node-graph/nodes/path-bool/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
  • Outdated: syn — `syn` is locked at 3.0.9 but 3.0.10 is the current stable release on crates.io, and it already satisfies the `"3.0"` requirement declared in proc-macros/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.2.0+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in tools/crate-hierarchy-viz/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: ureq — `ureq` is locked at 3.5.1 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in tools/cargo-run/internal/download/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.29.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in document/peer-transport/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
  • Outdated: wasm-bindgen-futures — `wasm-bindgen-futures` is locked at 0.4.79 but 0.4.80 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in editor/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen-futures` and commit the updated REDACTED.
  • Outdated: wgpu — `wgpu` is locked at 30.0.1 but 30.0.2 is the current stable release on crates.io, and it already satisfies the `"30.0"` requirement declared in desktop/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wgpu` and commit the updated REDACTED.
  • Outdated: zip — `zip` is locked at 9.4.0 but 9.5.1 is the current stable release on crates.io, and it already satisfies the `"9"` requirement declared in editor/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p zip` and commit the updated REDACTED.

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-5f2b2521d8a4487f9354903dd2bd5dd2/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-5f2b2521d8a4487f9354903dd2bd5dd2/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 --exclude demo-artwork .75artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .34artifacts/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 --config /opt/semgrep-rules/gdpr.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 --exclude demo-artwork .1artifacts/raw/semgrep-gdpr.json
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 01a1d8bb-38ae-7cf4-ac9e-88858de2b23b · 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