{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D11","name":"Test Reliability","shortDescription":{"text":"Test Reliability"},"helpUri":"https://codehealth.canine.dev/dimensions/D11"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"DM2","name":"Strongly-typed ids","shortDescription":{"text":"Strongly-typed ids"},"helpUri":"https://codehealth.canine.dev/dimensions/DM2"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"DM6","name":"Domain \u2194 infrastructure boundary","shortDescription":{"text":"Domain \u2194 infrastructure boundary"},"helpUri":"https://codehealth.canine.dev/dimensions/DM6"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF2","name":"Allocation hygiene","shortDescription":{"text":"Allocation hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF2"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawCore.userContentController (cyclomatic 49): ExcalidrawCore.userContentController 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c137ff75f16091f676a28edfa1ca3cd847e6b8a7b5dcc0f0b0142026b48766"}},{"ruleId":"D1","level":"warning","message":{"text":"AdjustElementsMiddleware.patchElement (cyclomatic 48): AdjustElementsMiddleware.patchElement has cyclomatic complexity 48 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"587a9c86ac3bd0d6a8336baca8987b3fdd7ec33e4adb75cc294a638bd65d2bea"}},{"ruleId":"D1","level":"warning","message":{"text":"FileState.performActiveFileChange (cyclomatic 45): FileState.performActiveFileChange 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e4e895b72169296424f2eb228df8ec07af762df28eafedb017dd541cef4545"}},{"ruleId":"D1","level":"warning","message":{"text":"ViewerLocalConnection.update (cyclomatic 40): ViewerLocalConnection.update 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"b45da0b06cf0300f941eca671298b713a5fc2c505f6700f2511f1d13d3e13f8c"}},{"ruleId":"D1","level":"warning","message":{"text":"DrawingSettingsPanel.body (cyclomatic 37): DrawingSettingsPanel.body has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsPanel.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a0ccf5b3b71ead7a754d2ef5c80f7ba1a43ada40129a87ccb068ea9de1b75f"}},{"ruleId":"D1","level":"warning","message":{"text":"FileHomeItemContentView.content (cyclomatic 35): FileHomeItemContentView.content 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4802c89a7b31548fde9308a314041838997b683e3c45a2eee454b7f035daad"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawRenderer.canvasView (cyclomatic 34): ExcalidrawRenderer.canvasView 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"c31c0231f85e88a7881ee9e7290771b9550f27a280298c6e3a845b896f696b83"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawArrowElement.== (cyclomatic 33): ExcalidrawArrowElement.== 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab55d20334bd2573235af0dcb18f8999f659c0d0355cf68de939fb0826f006b"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawTextElement.== (cyclomatic 32): ExcalidrawTextElement.== has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f9e3453a8679005093254b7022b99a8c6d09c59e1e746884115f1fd10140ed"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawHomeView.homeLayer (cyclomatic 32): ExcalidrawHomeView.homeLayer 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"815286dc8bbe6315f9c7461a6e27172b31c013c9ed4c7fa78c68403519a766ef"}},{"ruleId":"D1","level":"warning","message":{"text":"FileRowDragDropModifier.sortFiles (cyclomatic 31): FileRowDragDropModifier.sortFiles 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"89ddf90249ae67aba726cf5d93615b9d81ea70a6018fc40b6ba3bf73fdc5a139"}},{"ruleId":"D1","level":"warning","message":{"text":"FileCoverCacheCoordinator.generate (cyclomatic 30): FileCoverCacheCoordinator.generate 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"81087331f6d60ffcca8ef4bd88d3cae78233d47618d31e40160cac188225d4c8"}},{"ruleId":"D1","level":"warning","message":{"text":"CursorStyle.asPointerStyle (cyclomatic 30): CursorStyle.asPointerStyle has cyclomatic complexity 30 (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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/CursorHoverView/CursorStyle.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f38178765c361e8617cc6b7e6e9776e1616dd6e3a1d26f663b2b56b960cfd4"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawHomeView.handleActiveGroupChanged (cyclomatic 30): ExcalidrawHomeView.handleActiveGroupChanged 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d6d040d667187b173a8179d542be826ded0fc16b64cb4f9bc921f1e73b39cf"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawLinearElement.== (cyclomatic 29): ExcalidrawLinearElement.== has cyclomatic complexity 29 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f8716af419b2dbb518f220e9875563c8511a8fab56da0a0135f914e9e28cce"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawFreeDrawElement.== (cyclomatic 27): ExcalidrawFreeDrawElement.== has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"e868b08379647f818caa69e62c1de867274df81e9974cc8d6142aeda1786fa6a"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawPdfElement.== (cyclomatic 27): ExcalidrawPdfElement.== has cyclomatic complexity 27 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76bbc07a624936e31e56c2af7c88bb522e706ef75e22c108cf66aeaf6585652"}},{"ruleId":"D1","level":"warning","message":{"text":"FileHomeItemTransitionModifier.body (cyclomatic 27): FileHomeItemTransitionModifier.body has cyclomatic complexity 27 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 9 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f06a7e3a042d6e791f9d9cb66635075b576aa945cc56d2507dd996c87d77256"}},{"ruleId":"D1","level":"warning","message":{"text":"FileRowDragDropModifier.body (cyclomatic 26): FileRowDragDropModifier.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0c0063e997755c6bce953fa871357251d01f9784d1b2b4fcb9e1b33ae189fe"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationView.body (cyclomatic 26): ScreenAnnotationView.body has cyclomatic complexity 26 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"baacbf059b98d04f7d77b671b5565acfd4a624aa6898bc5a1e73177bac8f4632"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawImageElement.== (cyclomatic 26): ExcalidrawImageElement.== has cyclomatic complexity 26 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4668ecb56ba84f04149122c41b27eb483d4e9f58637acbd413b456edecaa52"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudStorageDocumentStore.replayPendingMetadataOperations (cyclomatic 26): CloudStorageDocumentStore.replayPendingMetadataOperations 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2303}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c19472a9f659732682deab6c435ca26110c22518293885d2e2ffd73633d1e26"}},{"ruleId":"D1","level":"warning","message":{"text":"FileEnumerator.enumerateExpectedFiles (cyclomatic 26): FileEnumerator.enumerateExpectedFiles 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"261dc8e9a65f8a2e691e2d002654a25b5d74ac9e270553faae2aba213234ebd0"}},{"ruleId":"D1","level":"warning","message":{"text":"CollaborationEditor.body (cyclomatic 24): CollaborationEditor.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f1bf383757d90f77933ac88e424ce8b1238eaf53540a6a40dea0c136b2a87c1"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawGenericElement.== (cyclomatic 24): ExcalidrawGenericElement.== has cyclomatic complexity 24 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"8684ddfc5764ad1fbbe9051fef05ddc21ddcdd03cd3bc0fe3fbc3684632c0400"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudStorageDocumentStore.refreshedDeltaState (cyclomatic 24): CloudStorageDocumentStore.refreshedDeltaState 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2099}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d8a3eef5ed3e2252d149d989aaac4a0caf804ec0ec6fb2bbfb3c48603273c88"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawPresentationModel.load (cyclomatic 24): ExcalidrawPresentationModel.load 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationModel.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"e86b3afbdef5d01016ce032616254068a70c8e7ad3711dca18d7594b67a34335"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplePencilToolbarModifier.onDragging (cyclomatic 24): ApplePencilToolbarModifier.onDragging 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/ApplePencilToolbar.swift"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"65354f69d1026f50ca820087e2ce3248b9bdee2b5ee97338677660a8324399f1"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawDrawElement.== (cyclomatic 23): ExcalidrawDrawElement.== has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ed14cb9008b40a59f06a5d9d93675f0b60847b5f265710658a3598f107f941"}},{"ruleId":"D1","level":"warning","message":{"text":"MediaCleanupCoordinator.scan (cyclomatic 23): MediaCleanupCoordinator.scan has cyclomatic complexity 23 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f506215c6b36253914e94b1ebde1aee4cc8dacde4a43b323e357db2e36e1d5"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalFileRowView.body (cyclomatic 22): LocalFileRowView.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileRowView.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"92689b727c46c92040e65abb9b404e88bcbb13364d3a018d3664882a78353f65"}},{"ruleId":"D1","level":"warning","message":{"text":"SidebarRowDropable.handleDrop (cyclomatic 22): SidebarRowDropable.handleDrop 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/SidebarRowDropModifier.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1d34f9432e9054c0dc394e0fe31eb2af8dffe85e494440377da36082593284"}},{"ruleId":"D1","level":"warning","message":{"text":"ElementPropertiesPanel.options (cyclomatic 22): ElementPropertiesPanel.options 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ElementPropertiesPanel/ElementPropertiesPanel.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78737e210e37437aeda355ef1e72eaf5c1038b6d5bb7727e854bf8ff3448227"}},{"ruleId":"D1","level":"warning","message":{"text":"SyncCoordinator.performDiffScan (cyclomatic 22): SyncCoordinator.performDiffScan 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd5a6da5ea67d11461da6c6ecc0b143c2d14ce1d46657f7c17d499937197b33"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationWebRuntime.userContentController (cyclomatic 21): ScreenAnnotationWebRuntime.userContentController 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWebRuntime.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5fe4d9ea747d850e4576fa67493056234c2113cefaab7242e1af1fbdfce99d9"}},{"ruleId":"D1","level":"warning","message":{"text":"TemporaryFileMenuItems.moveFile (cyclomatic 21): TemporaryFileMenuItems.moveFile 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fb1d62175496f7946807123c88b4c000bdc83d48577fec13b9bbe2e99d97a2"}},{"ruleId":"D1","level":"warning","message":{"text":"DividerOverlayModifier.detectDivider (cyclomatic 21): DividerOverlayModifier.detectDivider 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitView.swift"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcc5513427ad904c4c088bd9784603ea3c7342379fd3f74d719d9fbc91265a6"}},{"ruleId":"D1","level":"warning","message":{"text":"FileICloudStatusIndicator.iCloudStatusContent (cyclomatic 21): FileICloudStatusIndicator.iCloudStatusContent 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileICloudStatusIndicator.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"624366611cfe1c446f2c3700bb4e776cb9c81542b61f97ceb68ea8a87093e9e3"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeFolderItemView.body (cyclomatic 21): HomeFolderItemView.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3c6620957e5fe03901bdb206369c4226cfa557fbf56e5e931726e635cd4509"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplePencilToolbarModifier.body (cyclomatic 21): ApplePencilToolbarModifier.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/ApplePencilToolbar.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4c3cf479fc4fe94bd78eb2b9503217c8598ab8c7396f86377e4d7bcf7fe433"}},{"ruleId":"D1","level":"warning","message":{"text":"ReadFileTool.baseInfo (cyclomatic 21): ReadFileTool.baseInfo 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c6a29cf56770392512d8a821a70b6c287992e9bb6681c2d9b6ef8f2df58e7fa"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenURLSheetView.body (cyclomatic 20): OpenURLSheetView.body 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BOpenFromURL.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f36869d312fbd88202c8d3067f24a69589bfdf38435c5257099d51b70c2e83"}},{"ruleId":"D1","level":"warning","message":{"text":"CursorStyle.asNSCursor (cyclomatic 20): CursorStyle.asNSCursor 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/CursorHoverView/CursorStyle.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dcd339bbc56ef279b7dfbe8659c11c942da2e6ec37ca8af6afc50b0bd6265c5"}},{"ruleId":"D1","level":"warning","message":{"text":"AdjustElementsTool.execute (cyclomatic 20): AdjustElementsTool.execute 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c71d2b273ab0d311eabfeb75de3d123f53d0a8c48808b6f690adbad16fe2f66"}},{"ruleId":"D1","level":"warning","message":{"text":"Utils.swift.backupFiles (cyclomatic 20): Utils.swift.backupFiles 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"17fb2c3626e84005f77912e6ac4661392346c42f0321f180fa41e9d2c451bd25"}},{"ruleId":"D1","level":"warning","message":{"text":"JoinRoomSheetView.parseLink (cyclomatic 19): JoinRoomSheetView.parseLink 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39a978e0c4ea2e6a764564fdc1015ff480cc5ab34d8e3a07fa2e8bafb4b768a"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawEditor.persistCanvasUpdate (cyclomatic 19): ExcalidrawEditor.persistCanvasUpdate 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b794eb55bb88db69aa32af9ac801a736a7dd807b7964de6bcb21e85644570cdc"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawDocumentSyncController.load (cyclomatic 19): ExcalidrawDocumentSyncController.load 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21d2fa7c393c93c9f61d6d7a8de7395930adfe79d2e4f157bf50c51251ae85d"}},{"ruleId":"D1","level":"warning","message":{"text":"FileMenuItems.body (cyclomatic 19): FileMenuItems.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/FileContextMenu.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f1f8591aa48c86fe41a9d92a9525eb2cf34e66bf2ef4c204ff230ee72c9cfe5"}},{"ruleId":"D1","level":"warning","message":{"text":"SyncCoordinator.processQueue (cyclomatic 19): SyncCoordinator.processQueue 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"224af5d9c4d3ad542e10482eb63614ac80381506750187aaae9ac26f4384eed4"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptInputView.startSend (cyclomatic 19): PromptInputView.startSend 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1c2c1faf732cc1b4e3853352ebc90b016e82f60ef1c26c9db83d2645b13169"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawEditor.loadExcalidrawFile (cyclomatic 18): ExcalidrawEditor.loadExcalidrawFile 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"0813b94919115d3d3205247abd0dfc524975ac3e8c9d38ef5b6df925344bb0e6"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationSaveConfiguration.init (cyclomatic 18): ScreenAnnotationSaveConfiguration.init 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa0f3d1c7f959e75a12da06c12a1756198b67d26a854cae2dc514d555974b87"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationSession.prepareCanvas (cyclomatic 18): ScreenAnnotationSession.prepareCanvas has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db84dc37ce07e5f1f764f20374e310f2fbec2014ba1e3a71f29a6a35c5ef39a"}},{"ruleId":"D1","level":"warning","message":{"text":"CloudStorageDocumentStore.loadContent (cyclomatic 18): CloudStorageDocumentStore.loadContent 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d76855b04da56b1671aba4fb773b1879062f6a935c1e0744e314934fe890a8"}},{"ruleId":"D1","level":"warning","message":{"text":"MigrationProgressSheet.body (cyclomatic 18): MigrationProgressSheet.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationSheetView.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"936c69bc276e2375b6bb088d5b1ade5a8bc311093c8162368056222d58f99ee4"}},{"ruleId":"D1","level":"warning","message":{"text":"LocalFileRowMenuItems.body (cyclomatic 18): LocalFileRowMenuItems.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"d10b7ea110fbf61e17fb029ef7423235319484897c188a403aafd938e7c408aa"}},{"ruleId":"D1","level":"warning","message":{"text":"AIChatView.messageList (cyclomatic 18): AIChatView.messageList 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessages.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d675e1697b1c23ed031d2aaf1d2979b7c27c5c79bc2746d13a23b67efae28f"}},{"ruleId":"D1","level":"warning","message":{"text":"overwrite_console.summarizeConsoleArg (cyclomatic 18): overwrite_console.summarizeConsoleArg 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Resources/overwrite_console.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"681465ac0b9ab77c4b47a67839617c7eb18d701f96d9a78a1a241feab0f7d3af"}},{"ruleId":"D1","level":"warning","message":{"text":"AppDelegate.scheduleTerminationSheetIfNeeded (cyclomatic 17): AppDelegate.scheduleTerminationSheetIfNeeded has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/AppDelegate.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f9def7b7159d0b93ac84e7c0eb77bb7327563aaf6282bc3b8785c04f85e869f"}},{"ruleId":"D1","level":"warning","message":{"text":"ShareToolbarButton.performShareFile (cyclomatic 17): ShareToolbarButton.performShareFile 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ShareToolbarButton.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"663ee2209366089237329cde1d255773a833b3195798d3807c4300b3b4cc839e"}},{"ruleId":"D1","level":"warning","message":{"text":"GroupsView.canDrop (cyclomatic 17): GroupsView.canDrop has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupsView.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd5e50587e06bbaf1c7c7fea1106aad68dcaf613c88e933dd565627299e3d177"}},{"ruleId":"D1","level":"warning","message":{"text":"GroupsView.diclsureGroupView (cyclomatic 17): GroupsView.diclsureGroupView 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupsView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4850127f219ac654bbd2a9e8ced698542350d2da7815594f788391088b78c95"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationSession.syncSelectedElements (cyclomatic 17): ScreenAnnotationSession.syncSelectedElements 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 is NOT this file\u0027s highest cyclomatic complexity: ScreenAnnotationSession.syncSelectedTool (cyclomatic 18) is higher and carries no row of its own \u2014 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 method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d70475b8de8ec2e415fe76a14c461fa4da1d2c03ac327c92d05851d1efca15"}},{"ruleId":"D1","level":"warning","message":{"text":"BackupsSettingsView.body (cyclomatic 17): BackupsSettingsView.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/BackupsSettings/BackupsSettingsView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86f5ed2bdd042c86554c0f946ab91c84d4966bbb43af2507e30adff91d8a98b"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiFontPickerView.body (cyclomatic 16): MultiFontPickerView.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/FontsSettingsView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2353fd996122a43cae31abb996df3756c0f033dd8a1b7187083307dbffff8c"}},{"ruleId":"D1","level":"warning","message":{"text":"FileState.applyCloudStorageIdentityChange (cyclomatic 16): FileState.applyCloudStorageIdentityChange 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"914b4af61a4c52fe0de1c00dcfeff05abef7374723638a6e3aa5cfeab52108d2"}},{"ruleId":"D1","level":"warning","message":{"text":"FileState.importFiles (cyclomatic 16): FileState.importFiles 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8f1260a87c68c326e724bf9856e09bba9d2e04f099fa0d11ba570f7193dc9b8"}},{"ruleId":"D1","level":"warning","message":{"text":"FileStatusObserverModifier.handleICloudStatus (cyclomatic 16): FileStatusObserverModifier.handleICloudStatus 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2b2e8475da71bd5e35437f0c654829c96424a579a7b5b957b6dfe3a0f55b91"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawCanvasView.listenToLoadingState (cyclomatic 16): ExcalidrawCanvasView.listenToLoadingState 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCanvasView.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3df88c31f949f71bb2839b6f58e494f4dede4742aacf46a0b864c586a08a4c"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawDocumentSyncController.applyCanvasFileData (cyclomatic 16): ExcalidrawDocumentSyncController.applyCanvasFileData 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"221ff63470bbd22033b0c02f07f28cdae5623f7d4414072c0289dc7dc33b9dfc"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenAnnotationSession.clearCanvas (cyclomatic 16): ScreenAnnotationSession.clearCanvas 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. This is NOT this file\u0027s highest cyclomatic complexity: ScreenAnnotationSession.syncSelectedTool (cyclomatic 18) is higher and carries no row of its own \u2014 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 method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e0cd72e16e51e756ed060ea1a12ecddebe9dc0ddca7eee13d52ee60982a7ea"}},{"ruleId":"D1","level":"warning","message":{"text":"AISettingsView.activityBody (cyclomatic 16): AISettingsView.activityBody 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BActivity.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"450f692cc1d242844878fa033704561dfd3f8e9535ea97e5fbc778b95141e458"}},{"ruleId":"D1","level":"warning","message":{"text":"TemporaryFileMenuItems.moveLocalFile (cyclomatic 16): TemporaryFileMenuItems.moveLocalFile 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a9df9ed7364bcc574558db400e1a5634bfd3a9103891570cf3e1ae79d76c1a"}},{"ruleId":"D1","level":"warning","message":{"text":"AIProposalArtifact.findArtifact (cyclomatic 16): AIProposalArtifact.findArtifact 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/AIProposalArtifact.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"157e2ea863dbc514a7ee77592b8cb39b0fd3b142639515b9cc5d78144d8246e3"}},{"ruleId":"D1","level":"warning","message":{"text":"UserDrawingSettings.from (cyclomatic 16): UserDrawingSettings.from 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/UserDrawingSettings.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"810a09d11a34d507dcfe3ce8bb4bb7c64e613f8fdb5e53d044ed0f4507d7b8b2"}},{"ruleId":"D1","level":"warning","message":{"text":"UserDrawingSettings.filling (cyclomatic 16): UserDrawingSettings.filling has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (UserDrawingSettings.merging) has the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/UserDrawingSettings.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f77122b0785163cb2af34c9b6520eb737b3a5a0720c7ea9b5ac6e9321b8d99"}},{"ruleId":"D1","level":"warning","message":{"text":"UserDrawingSettings.merging (cyclomatic 16): UserDrawingSettings.merging has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (UserDrawingSettings.filling) has the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/UserDrawingSettings.swift"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"277068055259c7ede2a19603950a6ec86a03616583c6b83c7bf97628f0b41512"}},{"ruleId":"D1","level":"warning","message":{"text":"ElementProperties.changes (cyclomatic 16): ElementProperties.changes 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ElementPropertiesPanel/ElementProperties.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"e492b665eae3625d46e5edef277c223e81d545944fc91d255cf7ef092d3b8416"}},{"ruleId":"D1","level":"warning","message":{"text":"ExcalidrawMCPOptimizedToolHandler.canvasPreferencesUpdate (cyclomatic 16): ExcalidrawMCPOptimizedToolHandler.canvasPreferencesUpdate 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c2b56c0ed4a5b9a4f80f2b14daaaff5c8e3c084602a8f89052058ab8c1d235"}},{"ruleId":"D1","level":"warning","message":{"text":"CollaborationHomeBackground.body (cyclomatic 16): CollaborationHomeBackground.body 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CollaborationHome/CollaborationHome.swift"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78d64fb3e6797638c4166aa820d4b49ed0fd3e63f7b55d0fbf1325f515cfb1e"}},{"ruleId":"D1","level":"warning","message":{"text":"AdjustElementsMiddleware.apply (cyclomatic 16): AdjustElementsMiddleware.apply 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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"328692ff607105992a69e72dac28e8429003fdf432b7f65c634059c4203c0a8c"}},{"ruleId":"D2","level":"warning","message":{"text":"AdjustElementsMiddleware.patchElement (cognitive 89): AdjustElementsMiddleware.patchElement has cognitive complexity 89 (threshold 15). Drivers by points: if/else 33 (77 pts), boolean chains 9, ternaries 1 (2 pts), match/switch 1 (nesting depth added 45). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b5463fa0287ad414a291739f071e0d0ca73e96232dbd4e6b75dc078462b985"}},{"ruleId":"D2","level":"warning","message":{"text":"FileRowDragDropModifier.sortFiles (cognitive 87): FileRowDragDropModifier.sortFiles has cognitive complexity 87 (threshold 15). Drivers by points: if/else 23 (63 pts), loops 4 (17 pts), boolean chains 4, match/switch 1 (2 pts), error handling 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9cea19539ea48ae0e1e7e3c4efcf691883d546677f58f4f5a282ac2addfdd8"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawHomeView.handleActiveGroupChanged (cognitive 69): ExcalidrawHomeView.handleActiveGroupChanged has cognitive complexity 69 (threshold 15). Drivers by points: if/else 34 (65 pts), boolean chains 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c3af3bdab82d016b022818e8e90c2ab0469fd92ca8b6699d3699206b92f080"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.performActiveFileChange (cognitive 68): FileState.performActiveFileChange has cognitive complexity 68 (threshold 15). Drivers by points: if/else 31 (51 pts), boolean chains 11, error handling 2 (5 pts), match/switch 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d75066d1dce6a3b47e40d6f1ed46280f2e4b8dee9367f109cd998368f039c1"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawRenderer.canvasView (cognitive 66): ExcalidrawRenderer.canvasView has cognitive complexity 66 (threshold 15). Drivers by points: if/else 11 (32 pts), ternaries 5 (18 pts), loops 4 (10 pts), match/switch 2 (5 pts), boolean chains 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4b3245ded32267aae4b4181910939d90d29056ccec58a22e63df9210d87b94"}},{"ruleId":"D2","level":"warning","message":{"text":"FileCoverCacheCoordinator.generate (cognitive 53): FileCoverCacheCoordinator.generate has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (41 pts), match/switch 2 (5 pts), boolean chains 4, error handling 2 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6fee2c1ac8d99167c2b0d9aae8d711e758cc2090a783b518007d88539eb9143"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.replayPendingMetadataOperations (cognitive 51): CloudStorageDocumentStore.replayPendingMetadataOperations has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (28 pts), error handling 3 (8 pts), ternaries 3 (7 pts), boolean chains 4, match/switch 1 (3 pts), loops 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2303}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47a9f622e215119601a26a87d1995f82a26d0d9a137c497cf14d287effd1117"}},{"ruleId":"D2","level":"warning","message":{"text":"ViewerLocalConnection.update (cognitive 50): ViewerLocalConnection.update has cognitive complexity 50 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 17, ternaries 2, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"865597cd8517599d25805a67b711f3ec8b0cdd089ffbafd3bca2896fb789383b"}},{"ruleId":"D2","level":"warning","message":{"text":"TemporaryFileMenuItems.moveFile (cognitive 47): TemporaryFileMenuItems.moveFile has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (37 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c25efb8adf0ab75d402ceefab6fb1dacc87487b61d5267142dd99093f7c150d"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemContentView.content (cognitive 46): FileHomeItemContentView.content has cognitive complexity 46 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 9 (14 pts), boolean chains 8, match/switch 3 (8 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3eabefbae06cebaf7c697f20bbda94811536ab215a798fed566ec7852afb68"}},{"ruleId":"D2","level":"warning","message":{"text":"FileEnumerator.enumerateExpectedFiles (cognitive 45): FileEnumerator.enumerateExpectedFiles has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 6 (13 pts), boolean chains 8, error handling 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f228e023efa43c8e4d69aeef4e9bee7b0d9d1c7fad2802e77b00631bbcde681"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawHomeView.homeLayer (cognitive 43): ExcalidrawHomeView.homeLayer has cognitive complexity 43 (threshold 15). Drivers by points: ternaries 9 (18 pts), boolean chains 12, if/else 8 (12 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce638f68a8e9622244e3605ca650f6948cfdb44efc0ae39bb038cc086272389b"}},{"ruleId":"D2","level":"warning","message":{"text":"FileRowDragDropModifier.body (cognitive 40): FileRowDragDropModifier.body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (35 pts), match/switch 2 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"38701af3ee22a5c267d5a45b44f7a3091651ea5aa7b8558026ef9af857b1345b"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawPresentationModel.load (cognitive 40): ExcalidrawPresentationModel.load has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, loops 2 (4 pts), ternaries 2 (4 pts), error handling 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationModel.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"74f0cb6e2dd06b295de731c39793feff9b5d09045381b955aef793fdfdc3e98f"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemTransitionModifier.body (cognitive 40): FileHomeItemTransitionModifier.body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (31 pts), boolean chains 8, match/switch 1 (nesting depth added 13). Of this number, 29 points are the body\u0027s own statements and 11 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e1c4850f6293361e525b5d35c66add4e3c59b42fc10f7b97010fe4ab03e9d2"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplePencilToolbarModifier.body (cognitive 38): ApplePencilToolbarModifier.body has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (15 pts), ternaries 6 (13 pts), boolean chains 5, error handling 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/ApplePencilToolbar.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0c56f6bf8458aa854b1c0691262da1ce85861d1fe6edfc5280c44a5d98c32e"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeFolderItemView.body (cognitive 37): HomeFolderItemView.body has cognitive complexity 37 (threshold 15). Drivers by points: ternaries 11 (21 pts), if/else 13 (15 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"a312c401e0e9b0ff4186a63cc66a0396c7d12e164976a27051bffe2540fae367"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptInputView.startSend (cognitive 37): PromptInputView.startSend has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (29 pts), error handling 2 (5 pts), ternaries 1 (2 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"76964e46385a184c1d1181ef618e1741d7fb6e960431dea63551a8bc455437db"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchiveFilesModifier.swift.backupAllCloudFiles (cognitive 36): ArchiveFilesModifier.swift.backupAllCloudFiles has cognitive complexity 36 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 4 (9 pts), error handling 2 (6 pts), boolean chains 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7a5a2979127bcec09cefddfd88e230a790d682a5f9bd3c0149dae5c3ea6b23"}},{"ruleId":"D2","level":"warning","message":{"text":"CollaborationEditor.body (cognitive 35): CollaborationEditor.body has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 7, error handling 3 (6 pts), ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f1f5fb751629f459e1b3dfdde41198b66d5279b928cfae0af9b2516deb4053"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncCoordinator.processQueue (cognitive 35): SyncCoordinator.processQueue has cognitive complexity 35 (threshold 15). Drivers by points: if/else 14 (29 pts), error handling 1 (2 pts), match/switch 1 (2 pts), boolean chains 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b7958482e6fc2addb5035f9e3ee82e740cfb70b60482239b6f819338d080c8"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncCoordinator.performDiffScan (cognitive 35): SyncCoordinator.performDiffScan has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 2, loops 2, match/switch 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5338fc85bf80af737c50c7ef74a472afb9d051870f8b8f96a7e9caa23f85a6"}},{"ruleId":"D2","level":"warning","message":{"text":"JoinRoomSheetView.parseLink (cognitive 34): JoinRoomSheetView.parseLink has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 8 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4ac06a511694c2d2f86a2262a2e5dcc919ebf369ffb05d543a03a68e0eea258"}},{"ruleId":"D2","level":"warning","message":{"text":"Migration_ExtractMediaItems.migrate (cognitive 34): Migration_ExtractMediaItems.migrate has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 4 (8 pts), error handling 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb55d0abc6ff7864f0ed5d9cd0e1f6f7e370a74c017dcea533c06fe053cea71"}},{"ruleId":"D2","level":"warning","message":{"text":"DrawingSettingsPanel.body (cognitive 34): DrawingSettingsPanel.body has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 9 (10 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsPanel.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"b515b09c699567bd28850bcb83ba1146973568d4bceeeec64881671ad6f0d62b"}},{"ruleId":"D2","level":"warning","message":{"text":"FileMenuItems.body (cognitive 33): FileMenuItems.body has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 7, error handling 1 (3 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/FileContextMenu.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"837e38e55b381143eda000a2793b51a0dfa3150e40bf3cd9e720c52a8414bdd9"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCore.userContentController (cognitive 33): ExcalidrawCore.userContentController has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (5 pts), error handling 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a21ac079cb6c7eea9ac8dac68baf374ef035858cf90b5fbcf32636f296ef7af"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchiveFilesModifier.archiveAllCloudFilesWithErrorCollection (cognitive 32): ArchiveFilesModifier.archiveAllCloudFilesWithErrorCollection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 3 (16 pts), loops 3 (10 pts), error handling 2 (5 pts), boolean chains 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"3278ccec963f17ffed987649664c7d2248a1ed0765d1f987a8ca067a6f62e274"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawArrowElement.== (cognitive 32): ExcalidrawArrowElement.== has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 32. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"753db812051f07c711849f15f89e91486374ba34c7baaae146447cec61e9db14"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFileRowView.body (cognitive 32): LocalFileRowView.body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6, ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileRowView.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8422bf6175f4b04b2ef0501a54748ec569f269c914af1a3dc3567da4ca0ad975"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawTextElement.== (cognitive 31): ExcalidrawTextElement.== has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 31. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada26e1172b6fe40e652c67bad5d67c9be552af26e70453c83a77774f8b894f7"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.refreshedDeltaState (cognitive 31): CloudStorageDocumentStore.refreshedDeltaState has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 7, loops 4 (5 pts), match/switch 2 (4 pts), ternaries 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2099}}}],"partialFingerprints":{"codehealthFindingId/v1":"9951c070659aae19d7673120fe4a76145ecdc0dc1b7d14f402c981e0e4ced9aa"}},{"ruleId":"D2","level":"warning","message":{"text":"MigrationProgressSheet.body (cognitive 31): MigrationProgressSheet.body has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationSheetView.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d99a6bd6a6e6005e176eb7b9c4f52ebf87a0633d8d5ae041303cdfc3bcd7e2"}},{"ruleId":"D2","level":"warning","message":{"text":"MediaCleanupCoordinator.scan (cognitive 31): MediaCleanupCoordinator.scan has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 5 (7 pts), boolean chains 5, error handling 2 (4 pts), match/switch 1 (2 pts), ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7ec5824d55129e03f38577e4790f203fd8e881d772c41239f4d84fb876f2d87"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.importFiles (cognitive 30): FileState.importFiles has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (23 pts), loops 3 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1912}}}],"partialFingerprints":{"codehealthFindingId/v1":"895ec774a557aa783d3defcaf1a65cae6ee49293034896370d5a7d1f6d13b4b2"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawDocumentSyncController.load (cognitive 30): ExcalidrawDocumentSyncController.load has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 5, error handling 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13d4f1c7fbc0eb7ef5fea49b322b0657911faa46f227e2f6216b4a874611769"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationView.body (cognitive 30): ScreenAnnotationView.body has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), error handling 3 (5 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ea9a2fd66a774adbc7f17cbb0ad659da91ef21846fe0e7a1de0f69bb242ee64"}},{"ruleId":"D2","level":"warning","message":{"text":"ShareToolbarButton.performShareFile (cognitive 29): ShareToolbarButton.performShareFile has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 1 (3 pts), boolean chains 1, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ShareToolbarButton.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f909326525158767d4f86866f593436ef46defeae5198d6558da651eb4e01d7"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.performRefresh (cognitive 29): CloudStorageDocumentStore.performRefresh has cognitive complexity 29 (threshold 15). Drivers by points: error handling 6 (14 pts), if/else 8 (14 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b18e107b6220c02d76b76c12a53718d80037b9e434fee72ae27c4525d42f4c7"}},{"ruleId":"D2","level":"warning","message":{"text":"FileRepository.delete (cognitive 29): FileRepository.delete has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (4 pts), boolean chains 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository.swift"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"f310067b3fee083c8ad9ef89ebbf7b0331463eb78748995f8a5e0db6eae9fb06"}},{"ruleId":"D2","level":"warning","message":{"text":"ExportButtonStyle.makeBody (cognitive 29): ExportButtonStyle.makeBody has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 8 (20 pts), if/else 6 (9 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 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\u0027s 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/components/ExportButtonStyle.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"023cab783fcdfdec34934a9bdf72c26d4d4b87f56b1e4b673c767e76ed15b605"}},{"ruleId":"D2","level":"warning","message":{"text":"SidebarRowDropable.handleDrop (cognitive 29): SidebarRowDropable.handleDrop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 11, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/SidebarRowDropModifier.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ea04a779739ea5d153dc97a175a4a869dc37b0490e44f0c1dcecd52ea20640"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawLibraryImportSheetView.body (cognitive 29): ExcalidrawLibraryImportSheetView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 6 (14 pts), ternaries 1 (nesting depth added 9). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryImportSheetView.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d5690547756ce72229a45a0e75d2d4c1ea52d0793b01a82a32fea00fd2b31c1"}},{"ruleId":"D2","level":"warning","message":{"text":"PlanCard.body (cognitive 29): PlanCard.body has cognitive complexity 29 (threshold 15). Drivers by points: ternaries 9 (20 pts), if/else 7 (9 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/components/RegularPlansView.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f336dfad2376d054c76dcb12c52eb48186435bb15a571078ab89e53da8681a32"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchiveFilesModifier.swift.archiveAllCloudFiles (cognitive 29): ArchiveFilesModifier.swift.archiveAllCloudFiles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (9 pts), error handling 1 (3 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1f8d81d677946ab488ac55f3a55b32dad1665f32e01ddda087f238af9a0528"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawEditor.persistCanvasUpdate (cognitive 28): ExcalidrawEditor.persistCanvasUpdate has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 3 (6 pts), boolean chains 2, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e170a1dd9431aaad12e64dc4359d6ef644981ae7a9bbb023ec15bbc525575a"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawLinearElement.== (cognitive 28): ExcalidrawLinearElement.== has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 28. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"259664769c1e08daf2924061daa9074e67257f98799a5775042d42dad964f8fd"}},{"ruleId":"D2","level":"warning","message":{"text":"TemporaryGroupMenuItems.moveFiles (cognitive 28): TemporaryGroupMenuItems.moveFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryGroupContextMenu.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6a0606b0a72aef13f2484324c1ebf8906ef05307496a58e0c7e39b6f3a90f6e"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantRoundTableRows.items (cognitive 28): AssistantRoundTableRows.items has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (8 pts), boolean chains 3, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"5103113ebae98d45a428722870a09c6cf6b348544fb9fe08bbe52add1c881669"}},{"ruleId":"D2","level":"warning","message":{"text":"Utils.swift.backupFiles (cognitive 28): Utils.swift.backupFiles has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (18 pts), error handling 4 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d56dab7d8cbd429bc2e0817dcdf32f9e923db76f1585038add7ddecadefb49"}},{"ruleId":"D2","level":"warning","message":{"text":"Migration_MoveContentToICloudDrive.migrateFiles (cognitive 27): Migration_MoveContentToICloudDrive.migrateFiles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (7 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. This shape REPEATS in the file: 2 other methods here (Migration_MoveContentToICloudDrive.migrateCollaborationFiles, Migration_MoveContentToICloudDrive.migrateCheckpoints) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd3012966068fbfc551b4d696283f206c9bbd6687ddb69ed78bf15ccc2b9141"}},{"ruleId":"D2","level":"warning","message":{"text":"Migration_MoveContentToICloudDrive.migrateCollaborationFiles (cognitive 27): Migration_MoveContentToICloudDrive.migrateCollaborationFiles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (7 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. This shape REPEATS in the file: 2 other methods here (Migration_MoveContentToICloudDrive.migrateFiles, Migration_MoveContentToICloudDrive.migrateCheckpoints) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f489cb7a6cf9d49b683bcd9cf45efbca05566c20e428c6f31eae8f71b74b763"}},{"ruleId":"D2","level":"warning","message":{"text":"Migration_MoveContentToICloudDrive.migrateCheckpoints (cognitive 27): Migration_MoveContentToICloudDrive.migrateCheckpoints has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 2 (7 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. This shape REPEATS in the file: 2 other methods here (Migration_MoveContentToICloudDrive.migrateFiles, Migration_MoveContentToICloudDrive.migrateCollaborationFiles) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"b409d57c391c73bb201bbcb331285c905adacb3aaf95cd6fc4367c9ebf9a2c13"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplePencilToolbarModifier.onDragging (cognitive 27): ApplePencilToolbarModifier.onDragging has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 10, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/ApplePencilToolbar.swift"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ab63b1e9710305c5bb2065552babb78716fd3f9d483160b53d9a75e0c3dc68"}},{"ruleId":"D2","level":"warning","message":{"text":"WebDAVClient.resolveEndpoint (cognitive 27): WebDAVClient.resolveEndpoint has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 5 (6 pts), error handling 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0eba7702f95439ae4c3e286fbf2d67129ffcee4ef93ac2edf91e9ad87cc9831"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiFontPickerView.body (cognitive 26): MultiFontPickerView.body has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 3 (7 pts), boolean chains 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/FontsSettingsView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"49db5a384dede0f7207e2122c9784cd6480591f32fd637df4237617114b8c2d3"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawEditor.loadExcalidrawFile (cognitive 26): ExcalidrawEditor.loadExcalidrawFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 3, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1878030c5b18107417b08e48815545006e4d1d7b2d7015615eab3ff48674f04"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawFreeDrawElement.== (cognitive 26): ExcalidrawFreeDrawElement.== has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 26. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac16ca8ac326ce1a88c3cb8e1ee64d4ec3d9564c9d44cd9d8e056f7f288c7119"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawArrowElement.encode (cognitive 26): ExcalidrawArrowElement.encode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 26. To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"d936f68099e839cc9efe0a54e60d5bf944cab1001a1525a6882b2b888d4a2261"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawPdfElement.== (cognitive 26): ExcalidrawPdfElement.== has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 26. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f9eecff1b4c063e006eb379343c386566d45f94ecff0ba687601f83ed7b904"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFileRowMenuItems.duplicateFile (cognitive 26): LocalFileRowMenuItems.duplicateFile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 5, loops 2 (5 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"23cbe209598ee598439d8cc5f43687107cc46bb9c2e5821fabcb492d91f1ca2a"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactPlansView.planButtons (cognitive 26): CompactPlansView.planButtons has cognitive complexity 26 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 8 (11 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/components/CompactPlansView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"252cfdece4f943eced26daa56480bb23ad713090e9b0ca7f4d34aa7b73211b77"}},{"ruleId":"D2","level":"warning","message":{"text":"DividerOverlayModifier.detectDivider (cognitive 26): DividerOverlayModifier.detectDivider has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, ternaries 2 (4 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitView.swift"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"06d86902f55f6c248f7fda9e16a34621c36ad0afcb679dc1975186aca6ba8c8f"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawImageElement.== (cognitive 25): ExcalidrawImageElement.== has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 25. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"e704e8c65b13753380f576e851f3b7cb9909a985e8338b1bc7657884d6e3f9e8"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFileRowMenuItems.body (cognitive 25): LocalFileRowMenuItems.body has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee69e2707a5f7dfbc4ea9f375dca071cebaa7673f8f719c9b0a2e8f160951af"}},{"ruleId":"D2","level":"warning","message":{"text":"TemporaryFileMenuItems.moveLocalFile (cognitive 25): TemporaryFileMenuItems.moveLocalFile has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"5badc2af36c0a14a2205d16a9a607c2c3f05e06597faf7e51e44af1b9bf93192"}},{"ruleId":"D2","level":"warning","message":{"text":"ExportImageView.actionItems (cognitive 24): ExportImageView.actionItems has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportImageView.swift"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77d7e8b5354a9a1b5be7df078bd00f19b70ca70994bddb599698c1a9dbb8205"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationSaveConfiguration.init (cognitive 24): ScreenAnnotationSaveConfiguration.init has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"eda539e57163b34bab2b8c07ab06cde9b62271f409346e906b7e8d54539b9454"}},{"ruleId":"D2","level":"warning","message":{"text":"FileRepository.resetUnlockedFilesRecoveryKey (cognitive 24): FileRepository.resetUnlockedFilesRecoveryKey has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"08da237f7c887eec3b6b31467055e6674567b9ce28bc9ca1d448a34c2527aa0e"}},{"ruleId":"D2","level":"warning","message":{"text":"AISettingsView.activityBody (cognitive 24): AISettingsView.activityBody has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BActivity.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"87eed18e84afb1b1c0a7eaf60555c6331867bd951f4f5288411d5ba8da1fbd95"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.endAIChatSession (cognitive 23): FileState.endAIChatSession has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), error handling 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState\u002BAIChatSession.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8181c98db780e43984300ab39476870f9cb5c54939fe391cf8aa74063dd5caf"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudKitSyncModifier.startCloudKitEventListener (cognitive 23): CloudKitSyncModifier.startCloudKitEventListener has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (6 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BCloudKitSync.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"fffaf02a13b972171047369fedd4b4280d621d498b8ab630b5264abb4cf030b0"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawToolbar.compactContent (cognitive 23): ExcalidrawToolbar.compactContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"a950de23534491b6c4a9a47ab19d48fdf1b311eb5f4907db248df16f3e37b6fa"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawGenericElement.== (cognitive 23): ExcalidrawGenericElement.== has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 23. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3699dbb73497339e52f03414cd29704f9fe1412793ed92d4f3ce981b9c4ac5"}},{"ruleId":"D2","level":"warning","message":{"text":"AIProposalArtifact.findArtifact (cognitive 23): AIProposalArtifact.findArtifact has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/AIProposalArtifact.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b289dde8bf560e77a52d1df7d6b0a7edbf8eef5554e58ffbb8bcfbd3ec15e9"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawDocumentSyncController.applyCanvasFileData (cognitive 22): ExcalidrawDocumentSyncController.applyCanvasFileData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d330ef32626cd86bcad429f34645b9931b8d742c463806d5b1ee72e22093fbd"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactExcalidrawBottomToolbarContent.body (cognitive 22): CompactExcalidrawBottomToolbarContent.body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33623d4d282384f641c8f7399c26c5fbc84e9d4753e95f2ae7ab59d700b8c1a"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawDrawElement.== (cognitive 22): ExcalidrawDrawElement.== has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 22. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"83077c82c8e85ecf9aa7302bfba5e1b5872df8361a2049e70274998eb66a47a8"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.remoteContentCandidate (cognitive 22): CloudStorageDocumentStore.remoteContentCandidate has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), error handling 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"1526c972741ba0333f9bb5b89e9a143b9b72f0df4faf22e92aefc889101fca20"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsNewView.allFeaturesList (cognitive 22): WhatsNewView.allFeaturesList has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21 (22 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20489048a4671aa6741a710ffc165b6a7e68cff5ca993ed0dd3c0359f6e2c6d"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemSelectModifier.performFileSelect (cognitive 22): FileHomeItemSelectModifier.performFileSelect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FileHomeItemSelectModifier.performLocalFileSelect, FileHomeItemSelectModifier.performTemporaryFileSelect) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"effb6a85b6d3c69c951e9c9aa7afb87a0aeda0695176c47c165dbc580d48d1bb"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemSelectModifier.performLocalFileSelect (cognitive 22): FileHomeItemSelectModifier.performLocalFileSelect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FileHomeItemSelectModifier.performFileSelect, FileHomeItemSelectModifier.performTemporaryFileSelect) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b7018ac0b8c4ae94b44926bad559642925373aa809beef0b556b4941c6c73f0"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemSelectModifier.performTemporaryFileSelect (cognitive 22): FileHomeItemSelectModifier.performTemporaryFileSelect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (FileHomeItemSelectModifier.performFileSelect, FileHomeItemSelectModifier.performLocalFileSelect) have the same decision points, in the same order, at the same nesting depths \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0071ccc82bd73557007af08ba0d064c392387d12fb4b7d436ce4fd4df50e8d7"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCanvasView.listenToLoadingState (cognitive 21): ExcalidrawCanvasView.listenToLoadingState has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (8 pts), ternaries 1 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCanvasView.swift"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aff14f041c94f0a5a8a53b758e6b67f5b1a5d1ffd7487d8038ee52db1ca4558"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationSelectionProperties.properties (cognitive 21): ScreenAnnotationSelectionProperties.properties has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (7 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSelectionProperties.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4d498721abf4773210ea42ce7372a97e8d1ed70ff2102a03fffbae1b4c2d7b"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.processContentSynchronizationQueue (cognitive 21): CloudStorageDocumentStore.processContentSynchronizationQueue has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), boolean chains 2, ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bddcc72d9fe1f00344c48f6be9e68fdcaedecc830fd1745954950de7e8b62f7"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.loadContent (cognitive 21): CloudStorageDocumentStore.loadContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccce6d389e11503a115b73d74033f168322d5ffd8d05ca030c5e9da6e88894e"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupRepository.delete (cognitive 21): GroupRepository.delete has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/GroupRepository.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"78f9e4aec96d9a729084de0cba49b4352c39ca64a409543de3915df04a5f8aa3"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawZSidebarRowModifier.rowBackground (cognitive 21): ExcalidrawZSidebarRowModifier.rowBackground has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 7 (17 pts), if/else 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/SidebarRowModifier.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0c23204144aed088e554e21a707b7d428e5e0543202e056d059d3b9b59ddc8"}},{"ruleId":"D2","level":"warning","message":{"text":"CursorStyle.asPointerStyle (cognitive 21): CursorStyle.asPointerStyle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/CursorHoverView/CursorStyle.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f339831f192faa6f9e001059934c613b8f2321414807fb8256f00a2962cd7d"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemSelectModifier.performCloudStorageFileSelect (cognitive 21): FileHomeItemSelectModifier.performCloudStorageFileSelect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"345a20dcd7972b415546afc7428e985b34b6d8d809fe31831dcd25746f260517"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactContentMoreMenu.body (cognitive 21): CompactContentMoreMenu.body has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (4 pts), boolean chains 2, ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9e10addd91a7f12e588d7ac35b8efef0b00ec3a76230d921465aa3b296f809"}},{"ruleId":"D2","level":"warning","message":{"text":"AdjustElementsTool.execute (cognitive 21): AdjustElementsTool.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 7, error handling 5, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a851a92fdb094152cc36c9df11119a1feaa7036580b669998cc30b08687091"}},{"ruleId":"D2","level":"warning","message":{"text":"ReadFileTool.baseInfo (cognitive 21): ReadFileTool.baseInfo has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 10 (20 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"6109aec6d5a1c9e0eca556a04aa21f61f1ff0c688aa8c0b62fa78610d9729394"}},{"ruleId":"D2","level":"warning","message":{"text":"AssistantRoundView.renderItems (cognitive 21): AssistantRoundView.renderItems has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"db8db931f381ea121ae625d6a987a9a1d73c32de0364c9a947e6610ba2808468"}},{"ruleId":"D2","level":"warning","message":{"text":"Utils.swift.rewrapEncryptedBackupFilesRecoveryKey (cognitive 21): Utils.swift.rewrapEncryptedBackupFilesRecoveryKey has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), error handling 2 (4 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"1563482d1703c29a3dd4e4112e97a001ad0800539c8b71d8d37072f17bdeac13"}},{"ruleId":"D2","level":"warning","message":{"text":"FileRowView.content (cognitive 20): FileRowView.content has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a3e1638dd068a37f52e2519c39420665b264af8f00109aa756d39763ab287c"}},{"ruleId":"D2","level":"warning","message":{"text":"NewFileButton.createNewFileFromClipboard (cognitive 20): NewFileButton.createNewFileFromClipboard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/NewFileButton.swift"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fdb6f2d17209a76aa327f90961a7fce1fa6bc12cb355971781fdd8c838ef01c"}},{"ruleId":"D2","level":"warning","message":{"text":"FileStatusObserverModifier.handleICloudStatus (cognitive 20): FileStatusObserverModifier.handleICloudStatus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (18 pts), error handling 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5465a4cb763c7bfa3c1b563b2885c78d3c62d61d1c8c98d5e1ba6c69e333736"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawEditor.pullUpdatingFromCloud (cognitive 20): ExcalidrawEditor.pullUpdatingFromCloud has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"e520a1be336ae67e3f316537004e5a76f2f88d7ec8f5338dfb3ecdb2e3ca1474"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationSession.prepareCanvas (cognitive 20): ScreenAnnotationSession.prepareCanvas has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (9 pts), error handling 1 (nesting depth added 3). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"944ee7704fc84c39e18d55129f749c0372326ae1f5d200f17ddf338f4cd8896e"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationWebRuntime.userContentController (cognitive 20): ScreenAnnotationWebRuntime.userContentController has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, ternaries 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWebRuntime.swift"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b0a28c046dfa18a4ea310cb6f6ccfa763d20c0561db0647817e0c9a26ca1b59"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawEditorToolbarModifier.body (cognitive 20): ExcalidrawEditorToolbarModifier.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 4 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b074dcca6a8af8c702c9eaf9bfa9147a96803437e035c867e38c256e53bc123"}},{"ruleId":"D2","level":"warning","message":{"text":"MigrationManager.runPendingMigrations (cognitive 20): MigrationManager.runPendingMigrations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 1 (2 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationManager.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48ec2d58e7d313c38c7b9228d91e82dec0289d727500428bcf08c90a007cbc1"}},{"ruleId":"D2","level":"warning","message":{"text":"CollaborationFileRepository.delete (cognitive 20): CollaborationFileRepository.delete has cognitive complexity 20 (threshold 15). Drivers by points: error handling 4 (8 pts), if/else 7 (8 pts), boolean chains 2, loops 1 (2 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CollaborationFileRepository.swift"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f0d9d8bc25ee04e59459ab06a6661aede6c6a94d6ac64951520122befc2fc1"}},{"ruleId":"D2","level":"warning","message":{"text":"FileMenuItems.moveFile (cognitive 20): FileMenuItems.moveFile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (2 pts), boolean chains 1, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/FileContextMenu.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e219cd47d3d4915fe6967dc73938b18b6e88e209747cea5419cab1ef41e2e5b"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryView.moveSelectionsToLibrary (cognitive 20): LibraryView.moveSelectionsToLibrary has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae80cf80085f3ec4423286370584025e68047090141d4077202811cfcb8f105"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsNewView.body (cognitive 20): WhatsNewView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 pts), ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/WhatsNew/WhatsNewSheetView.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a29692abb65dcb05da4c80f17fe484c2795eadcb28b6733e1fd65a633e2edc"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPJSONValue.validateStrictJSONSyntax (cognitive 20): MCPJSONValue.validateStrictJSONSyntax has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Runtime/MCPJSONValue.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"248d0eb49d41a00b665edcf490f7d3c1401ca46229f6219a604d39b50390a4a5"}},{"ruleId":"D2","level":"warning","message":{"text":"NewFileButton.createNewFile (cognitive 19): NewFileButton.createNewFile has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/NewFileButton.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda6686515b5def03e68876b8d850004cfe6bec82da113fe9a3409d98df2b1e0"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawEditor.scheduleCloudStorageRefresh (cognitive 19): ExcalidrawEditor.scheduleCloudStorageRefresh has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), error handling 3 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1075717718d9f0641276e7ddf26b86023d75dbd05a87654fed7771c0008a7d0"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawPNGDecoder.decode (cognitive 19): ExcalidrawPNGDecoder.decode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawPNGDecoder.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a044bd1ad750c7ca2b0acf2e639bf17364e9fd607664a43933c26cf254d8930"}},{"ruleId":"D2","level":"warning","message":{"text":"Migration_MoveContentToICloudDrive.migrateMediaItems (cognitive 19): Migration_MoveContentToICloudDrive.migrateMediaItems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 1 (3 pts), match/switch 1 (2 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"1646fc1043d9663daab5e457e3489292661e9c6ae8b4ce6849946f6db6bfbee0"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFolderRepository.importToGroup (cognitive 19): LocalFolderRepository.importToGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/LocalFolderRepository.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f670d9e8c3ac9c1f664a41fa2ac250de953d0e4709711c80860f504e1eb317"}},{"ruleId":"D2","level":"warning","message":{"text":"BackupsSettingsView.body (cognitive 19): BackupsSettingsView.body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/BackupsSettings/BackupsSettingsView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"c95cc5a7fa5669a6a37cbb8991bd9f317298fb0382600b7d6ceef7ac02105d78"}},{"ruleId":"D2","level":"warning","message":{"text":"UserDrawingSettings.from (cognitive 19): UserDrawingSettings.from has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/UserDrawingSettings.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"acfad65bf608062a9588f6bb4de56e66bd228a4285faa3119009191f374b5718"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryItemCanvasElementPreprocessor.remapIDs (cognitive 19): LibraryItemCanvasElementPreprocessor.remapIDs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"653667da61995b49cbac8d496883ccaa6ce2766cc4f1ae04ccaf1bfd3f10ee4f"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawMCPOptimizedToolHandler.canvasPreferencesUpdate (cognitive 19): ExcalidrawMCPOptimizedToolHandler.canvasPreferencesUpdate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (19 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"476f953a003f82b6ea001b93065968bd9a9b8db322cfb4eecb6063010da0a496"}},{"ruleId":"D2","level":"warning","message":{"text":"MathInputSheetView.generateLatexWithAI (cognitive 19): MathInputSheetView.generateLatexWithAI has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BActions.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ef6992f2494f3a2fffb2c2795cd20f221f05f0e0cb305e891086b741a54862"}},{"ruleId":"D2","level":"warning","message":{"text":"AIProposalElementIDRegenerator.remapIDs (cognitive 19): AIProposalElementIDRegenerator.remapIDs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ToolCards/AIProposalToolResultCard.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"978f5fd8a67d97aa3a4a170b0288b1ea3110c24d3193e1fbe4adbb582956d582"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONValue.firstString (cognitive 19): JSONValue.firstString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMathImageTypes.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0728dd8b4f1018291c6d42558e455982d17c18995c38b21f7ff69e74cffc8be3"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenFromURLModifier.onOpenLocalFile (cognitive 18): OpenFromURLModifier.onOpenLocalFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BOpenFromURL.swift"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed33c7a212b5f904cd2aaec2cddbe482aa241d08ab7427f67c81221182768842"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.applyCloudStorageIdentityChange (cognitive 18): FileState.applyCloudStorageIdentityChange has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"bacda9edf3805dba8942ab9997fa5b418dab29414bdcd6f04ab3a86835608038"}},{"ruleId":"D2","level":"warning","message":{"text":"NewFileButton.createFile (cognitive 18): NewFileButton.createFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, ternaries 1 (2 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/NewFileButton.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"72fddeab4dcb902bd63141d0d632936579f0a86a3e3497d9b014ea293004cc79"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationSession.clearCanvas (cognitive 18): ScreenAnnotationSession.clearCanvas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a19e1c066e57a3ee7720f0c8395d62a113eb5bd18385cb286858748c5c4fbe5"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenAnnotationSession.syncSelectedElements (cognitive 18): ScreenAnnotationSession.syncSelectedElements has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c3ade039cdf13b0fcce4e563edd22ba06d43fde767150e8c93c989984f278e7"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawSVGDecoder.decode (cognitive 18): ExcalidrawSVGDecoder.decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawSVGDecoder.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"18da086aca9809ac42c3b01c3d2ae5fe24a97465b3af14b5a5c3c19f7d0d579f"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawLinearElement.encode (cognitive 18): ExcalidrawLinearElement.encode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18. To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c4ba74accc00fb4dec52f52e968e95c88ec8c4e637f7c286f4e9c3920ce876"}},{"ruleId":"D2","level":"warning","message":{"text":"AIChatAttachmentRepository.garbageCollect (cognitive 18): AIChatAttachmentRepository.garbageCollect has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 1 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIChatAttachmentRepository.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d2079b2edf56e60ea57f68202efb34a6b82b70fd598fcc621a14b2ae6a61ab2"}},{"ruleId":"D2","level":"warning","message":{"text":"AISettingsView.settingsTabHeader (cognitive 18): AISettingsView.settingsTabHeader has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (18 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BTabs.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"47979cdabf9d775ddfc8496adf874ed354f9e169ec2de8e1f8f25bfc650928c0"}},{"ruleId":"D2","level":"warning","message":{"text":"BackupsSettingsView.unlockBackupPreviewWithSystemAuthentication (cognitive 18): BackupsSettingsView.unlockBackupPreviewWithSystemAuthentication has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/BackupsSettings/BackupsSettingsView.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b254a474072216c6065147a0576f439fdb6f5216564e430b8664bb48b91d2bd"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupMenuItems.body (cognitive 18): GroupMenuItems.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/GroupContextMenu.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae27f4f071c454c81c811ec133fe3ef263cfd89b7dd104b01210593eeb41a03"}},{"ruleId":"D2","level":"warning","message":{"text":"SegmentedPicker.body (cognitive 18): SegmentedPicker.body has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/SegmentedPicker/SegmentedPicker.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bdde47e09e00d7e0ef8c49cc577e219440ffe3197d7df87100ca1db379268c1"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCore.waitUntilReadyForFileLoad (cognitive 18): ExcalidrawCore.waitUntilReadyForFileLoad has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore.swift"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"7384edb0107d9b80a665b768db3dd834e7a00442fbc1a6976b04cac9fa94e3fa"}},{"ruleId":"D2","level":"warning","message":{"text":"FileEnumerator.enumerateICloudFiles (cognitive 18): FileEnumerator.enumerateICloudFiles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (8 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cd392d6440cc66424a6b229d828f977340e36501b76b1aa6248e017ffdc9a7"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageURLResourceLoader.load (cognitive 18): ImageURLResourceLoader.load has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 3, loops 1 (2 pts), ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"487eaff89527fdb356db8403c4b4a971427bde9dc8e7d07b32b6fc3fb37dfd3a"}},{"ruleId":"D2","level":"warning","message":{"text":"File.loadContent (cognitive 18): File.loadContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), error handling 2 (4 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"95eedd3e50d4e1b911b8d10ac2cd2aedc80c424a456e0a8c7f78907010f680d9"}},{"ruleId":"D2","level":"warning","message":{"text":"overwrite_console.summarizeConsoleArg (cognitive 18): overwrite_console.summarizeConsoleArg has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Resources/overwrite_console.js"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df534928f4bbc04c9e948c2f85df25a51b45809b2aa3bb8ad6096211ffaf5f3"}},{"ruleId":"D2","level":"warning","message":{"text":"ExportImageView.exportImageData (cognitive 17): ExportImageView.exportImageData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 3 (4 pts), boolean chains 1, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportImageView.swift"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"702f86ad78b03be4c5b89ef5b6fac25d3bb289ee82e0320a963cd06318b490b8"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupRowDropModifier.handleDropFile (cognitive 17): GroupRowDropModifier.handleDropFile has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupRowView\u002BDragMove.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"469d536ca2ff580eaec47dcff008dccc9837538854469ab3fc61c2de93a6133e"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupsView.diclsureGroupView (cognitive 17): GroupsView.diclsureGroupView has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupsView.swift"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e394f3d81763e94cdfe4f2b2b042c7084a2fcc2a255fb78e682f92332ef354c"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.restoreActiveCanvas (cognitive 17): FileState.restoreActiveCanvas has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), error handling 3 (6 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState\u002BHistory.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"997aae10d48e6f4c4737a591b35944915ed31c620462da500578eb5102aad41a"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactAIChatReplyTicker.handleReplyTickerVisibility (cognitive 17): CompactAIChatReplyTicker.handleReplyTickerVisibility has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (16 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"229c7ba14042395b4c3c30235c2c6bf656b5df6a73e6e026bff3e2ae16fe0381"}},{"ruleId":"D2","level":"warning","message":{"text":"FileCoverCacheCoordinator.restorePersistedPreview (cognitive 17): FileCoverCacheCoordinator.restorePersistedPreview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, ternaries 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"b287354c7f2dd59df26a5129ea64dbd967624a488921626801d919ba3dd6fbd8"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawFile.init (cognitive 17): ExcalidrawFile.init has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed85e2ef369053fd2edbe9a191ca8a16268b323b03481bf0289e45c698b2fc4e"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.folderSyncStates (cognitive 17): CloudStorageDocumentStore.folderSyncStates has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 4, ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a02c9168b3a7e7627a049a611f3477947e0b42d3bede60ae1245acd1195562"}},{"ruleId":"D2","level":"warning","message":{"text":"CoreDataMigrationModifier.startContinuousCloudKitMonitoring (cognitive 17): CoreDataMigrationModifier.startContinuousCloudKitMonitoring has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationState.swift"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4d19c8e9ce072c8dee53d7e869395ecf04407978ed63dc7d0af4bea60ea6f5"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFilesProvider.getFolderContents (cognitive 17): LocalFilesProvider.getFolderContents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 5, ternaries 1 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFilesProvider.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"333757e396924b2831824c7bc1ab9b9c3f946b3132eee26822c33536ec58c830"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFolderMenuItems.body (cognitive 17): LocalFolderMenuItems.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2a39390e532df82cda1cfa09d6c9b52a890bfff464a09dde3a7206e645dbfa"}},{"ruleId":"D2","level":"warning","message":{"text":"MissingFileMenuProvider.tryToRecoverFiles (cognitive 17): MissingFileMenuProvider.tryToRecoverFiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MissingFileMenu.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cb1c4abb8282113f656b59a5394a9667bb0c54617866c0185b2c7e28ec6265"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryView.bottomBar (cognitive 17): LibraryView.bottomBar has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 1 (2 pts), boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1dc8127938f7c1ff2bfb813c371efca921fdfa37bb45d709fb3f7b896b031d3"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCore.configWebView (cognitive 17): ExcalidrawCore.configWebView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 1, error handling 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa6a6847a149f000e7074ac8be49a72f984d9d5aa2411838db245210b4db33a"}},{"ruleId":"D2","level":"warning","message":{"text":"ColorButtonGroup.body (cognitive 17): ColorButtonGroup.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ColorPicker/ColorButtonGroup.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a29a54edfca0f8be28bd64d72b570edc1a99a61522aa7cba3db1ea4cfde7a99"}},{"ruleId":"D2","level":"warning","message":{"text":"AIChatView.messageList (cognitive 17): AIChatView.messageList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 5. To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessages.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e937cd151c302a1319db53a865cd66010f1871ab9260275716eb6d122c85fe1d"}},{"ruleId":"D2","level":"warning","message":{"text":"AppDelegate.scheduleTerminationSheetIfNeeded (cognitive 16): AppDelegate.scheduleTerminationSheetIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 4. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/AppDelegate.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7abf1275bd5b5e6eb4de3328377a0ce2ff0f6614b6584d75221336435e3ccf61"}},{"ruleId":"D2","level":"warning","message":{"text":"SerachContent.body (cognitive 16): SerachContent.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de29a6057e295aa0c4143284f93986e70f15cd93bbae883860f26b01a667672"}},{"ruleId":"D2","level":"warning","message":{"text":"GroupsView.canDrop (cognitive 16): GroupsView.canDrop has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 10, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupsView.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96203f1f75c5678e97bba6660a9cde47c1c6dcfc2e6d0e05700ea363c9724ae"}},{"ruleId":"D2","level":"warning","message":{"text":"FileState.recoverFile (cognitive 16): FileState.recoverFile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (16 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":2153}}}],"partialFingerprints":{"codehealthFindingId/v1":"1407c8d6f250eb56fac3354889b4c3402faa6dfd00c047e4af5d8e235b6284a1"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.loadCustomerProductStatus (cognitive 16): Store.loadCustomerProductStatus has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 1 (3 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Store_AppStore.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"044de7b38a96ad095b748d077bb86973a84401700fb05171a5493fbf876f9b04"}},{"ruleId":"D2","level":"warning","message":{"text":"NewGroupButton.content (cognitive 16): NewGroupButton.content has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (3 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/NewGroupButton.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"11cf41345f06a8d214dfd6634bcbab63175816c3cd6846e91a29c0052a07ccc0"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCanvasView.listenToDocumentLoadEvents (cognitive 16): ExcalidrawCanvasView.listenToDocumentLoadEvents has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), match/switch 2 (5 pts), ternaries 1 (3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCanvasView.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb87317d09d6e00759727069eeb2fe3700c68cd6146afa60c5ca63f137ae34c"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.deleteItem (cognitive 16): CloudStorageDocumentStore.deleteItem has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, boolean chains 5, error handling 1 (2 pts), loops 1 (2 pts), ternaries 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5cd1b078b9a6df3634d3d875450d17a313f6c20228e1e25c4d9c00873a3e63"}},{"ruleId":"D2","level":"warning","message":{"text":"CloudStorageDocumentStore.enqueueMove (cognitive 16): CloudStorageDocumentStore.enqueueMove has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2473}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eeee78f57679b4b8261fccbd6dbcd8a8ea1fb13973fad2cf6216d21c9bbe329"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalStorageManager.saveContent (cognitive 16): LocalStorageManager.saveContent has cognitive complexity 16 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 4 (6 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7dec5f288335138ec21e210d8a414eaaf4862bf8a43e933bd8941daa4f78d8d"}},{"ruleId":"D2","level":"warning","message":{"text":"MigrationManager.checkMigrationsNeeded (cognitive 16): MigrationManager.checkMigrationsNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (6 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationManager.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ff141c29d32eab1ef0326ff09ccb0e9bea43d0add14e66bbb4494ee52f82ef"}},{"ruleId":"D2","level":"warning","message":{"text":"LocalFolderAvailabilityIndicator.monitorAvailability (cognitive 16): LocalFolderAvailabilityIndicator.monitorAvailability has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFolderAvailabilityIndicator.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0618faac25bc35f9d14fd6c360e6af3283b5a11723754523a695e9d9226c7c7"}},{"ruleId":"D2","level":"warning","message":{"text":"TemporaryFileRowView.body (cognitive 16): TemporaryFileRowView.body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileRowView.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c03d49f490f98f7efb6ba5e7ac72c9aa20bbcafd2b99cb9d8676c378eb2fae8"}},{"ruleId":"D2","level":"warning","message":{"text":"FileHomeItemAppearanceModifier.background (cognitive 16): FileHomeItemAppearanceModifier.background has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (14 pts), if/else 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bcad97da52bb96297bfa94caaceb81a65886e756a771ca2e247e05a2677f365"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCore.handleCopy (cognitive 16): ExcalidrawCore.handleCopy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a8f54f2563c71e0d346c3338f4183742fd92f4f25fa1ce00f68fe13f97cec5"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawCore.loadPDFAsTiledImages (cognitive 16): ExcalidrawCore.loadPDFAsTiledImages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BPDF.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f81c0b2dc37c86752ac92da1f5253cb97f16ba14fb8782bb7e3fe8092fa7ab"}},{"ruleId":"D2","level":"warning","message":{"text":"ExcalidrawDocumentSnapshotCoordinator.commitDirtySnapshot (cognitive 16): ExcalidrawDocumentSnapshotCoordinator.commitDirtySnapshot has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"9755464377b9446b447a967db9a29e241a99d9db4fc52aa9fbe1e3826f8508b0"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncCoordinator.checkForICloudUpdate (cognitive 16): SyncCoordinator.checkForICloudUpdate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b2ecfc5525cf741a22a561bf140f12edc9b7c7f111ce682216148c4b958ed6"}},{"ruleId":"D2","level":"warning","message":{"text":"WebFetchTool.execute (cognitive 16): WebFetchTool.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/WebFetchTool.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd11cdfcb3375822a1423029794ee44873ac355d253046ebb4a5cb06bb0fb46"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactBrowseRootView.content (cognitive 16): CompactBrowseRootView.content has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"640f20cf74f0eb0a9285921efb345e5fc711f356dfc44e0bec5a430a6fcc740b"}},{"ruleId":"D2","level":"warning","message":{"text":"ImageURLResourceLoader.isBlockedHost (cognitive 16): ImageURLResourceLoader.isBlockedHost has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (8 pts) (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc7373b662d25d527ad785056239c9a4784b6f2a8efa31299f58f1d3a3e1ded"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONValue.collectImageSkeletonFileIDs (cognitive 16): JSONValue.collectImageSkeletonFileIDs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c995931ea1300365545a21a0d3937210549b558da834bec3ced2151b493c9eb"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchiveFilesModifier.swift.storedEncryptedContentIfPresent (cognitive 16): ArchiveFilesModifier.swift.storedEncryptedContentIfPresent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"314b388e6e20f3bcbb45867343fc3cd2987d52c6626192ec2074851689850ba4"}},{"ruleId":"D2","level":"warning","message":{"text":"LibraryImportSheetView.swift.handleDropExcalidrawLibrary (cognitive 16): LibraryImportSheetView.swift.handleDropExcalidrawLibrary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryImportSheetView.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9f3aec3f5bebb36ce13c603ebe2ed0ca085ff22a512fc837fa1f7747ff3843"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CloudStorageDocumentStore: ClassTooLong \u2014 2373 significant lines (blank, comment-only and punctuation-only lines excluded), 120 methods. The bar is 400 significant lines; this is 1973 over it, 5.93\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a4aed25fbd0cc9df8f438e9b35b617e036cb4f01dcfee0304de602acf819fc5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ExcalidrawCore: TooManyMethods \u2014 163 methods, declared across 29 files: Helpers/ExcalidrawCore\u002BExportHelpers.swift (22), ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift (15), ExcalidrawCore/ExcalidrawCore.swift (15), ExcalidrawCore/ExcalidrawCore\u002BNavigation.swift (12), \u002B25 more file(s). The bar is 30 methods; this is 133 over it, 5.43\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fb932d7fad0ccd090e2a818492ae035a42a92e3258149508989800e1da020e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: CloudStorage/CloudStorageDocumentStore.swift: FileTooLong \u2014 2377 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CloudStorageDocumentStore (15-3292). The bar is 500 significant lines; this is 1877 over it, 4.75\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d84d257b468f4b03ee75ae8817c786f4d8532efbc56942c96bf5dacdec69831"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WhatsNewView.allFeaturesList: MethodTooLong \u2014 allFeaturesList runs 407 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 307 over it, 4.07\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"33863f06030a8f356d1339e1defa60ea285bc6b7ff9eeee1b153692cff4903f2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CloudStorageDocumentStore: TooManyMethods \u2014 120 methods. The bar is 30 methods; this is 90 over it, 4.00\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f84ab79d852f2a3ab3521f88530c79a59e4254185d9a3ebb37e0cbc225b005f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FileState: ClassTooLong \u2014 1576 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 1176 over it, 3.94\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"14383194c76d8440de14449cbca94b316639061a3d16ba90465407c126ad9faa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Store/FileState.swift: FileTooLong \u2014 1583 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: FileState (16-2433). The bar is 500 significant lines; this is 1083 over it, 3.17\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4046296f2149ca4b2ae73c644601efbe4cd519729ed8cad16bde1b6706a6d9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExcalidrawMCPAppBridge: ClassTooLong \u2014 1231 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 831 over it, 3.08\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae7ecad75b837699ca59cb1ef98928310968c15ad91f75a580fa1c1985e79ee"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReadFileTool.simplifyElement: MethodTooLong \u2014 simplifyElement runs 297 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 197 over it, 2.97\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2014ee31b3b0c01f6c449cdebab99b3f2cc11c49e9f9a2d3c4bd80191c11c9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FileState: TooManyMethods \u2014 84 methods, declared across 3 files: Store/FileState.swift (68), Store/FileState\u002BAIChatSession.swift (13), Store/FileState\u002BHistory.swift (3). The bar is 30 methods; this is 54 over it, 2.80\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"24526ff01b86ba073339554fa829aec617484828ff60d811945a18482e0b9317"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawRawIcon.path: MethodTooLong \u2014 path runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/FileRowLabel.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3d81cce8780d924924d69b97877358568a9264a2d1d86bdc5e210a2ac5747b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Bridge/ExcalidrawMCPAppBridge.swift: FileTooLong \u2014 1238 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: ExcalidrawMCPAppBridge (13-1697). The bar is 500 significant lines; this is 738 over it, 2.48\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"72df77050f99b0c688ccc6f72f316473542d4511c64717dbc3ffb469b674d611"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawRenderer.canvasView: MethodTooLong \u2014 canvasView 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\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc6c6f843d773c4fe3f9833f1f5fe015f2c9f4912c73965db43c86c813cbbad"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DrawingSettingsPanel.body: MethodTooLong \u2014 body runs 230 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 130 over it, 2.30\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsPanel.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd3bc464a477d0d9219760dda77f5b42ca0c5248a3b18a1f248d3a2ba4c79f1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: AdjustElementsTool/AdjustElementsTool.swift: FileTooLong \u2014 1143 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 643 over it, 2.29\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"477488508f47f01d7773d601e0ab84a07c5da34d4bb6cc7cff429a2ece148375"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExcalidrawEditor: ClassTooLong \u2014 899 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 499 over it, 2.25\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"c281b7a7fd82f652af42cd3c479d8130bb25233548f35c24712672cc37a1cad8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ExcalidrawMCPAppBridge: TooManyMethods \u2014 64 methods. The bar is 30 methods; this is 34 over it, 2.13\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"167dfbbcabdd8b583f3c9240ffce75a581fe165c987ecc0fcb4edc5a173f6b25"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift: FileTooLong \u2014 1031 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 531 over it, 2.06\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dafdb1196929bab40db7ef0092d11dd876c3ad864de2f5aac5f64638b59d9d2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Editor/ExcalidrawEditor.swift: FileTooLong \u2014 1013 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ExcalidrawEditor (26-1306). The bar is 500 significant lines; this is 513 over it, 2.03\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f4fe78bb90323009b21e263766081dcf80c81228a6c74e958001b11dd5af42"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FileCoverCacheCoordinator: ClassTooLong \u2014 804 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 404 over it, 2.01\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"126ff23cf4cd2b2eeedb05c4cf7a9af7a1d6c208cebc303f167f77aa771dd017"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PromptInputView: TooManyMethods \u2014 57 methods, declared across 6 files: PromptInput/PromptInputView.swift (17), PromptInput/PromptInputView\u002BSend.swift (13), PromptInput/PromptInputView\u002BCompactIOSFloatingInput.swift (12), PromptInput/PromptInputView\u002BActionBar.swift (9), \u002B2 more file(s). The bar is 30 methods; this is 27 over it, 1.90\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView.swift"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab54d06632075d9bfecc4cb59021227020cd22701e935d959c7df32ed6f7a39b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AdjustElementsMiddleware: TooManyMethods \u2014 55 methods, declared across 10 files: AdjustElementsTool/AdjustElementsTool.swift (25), AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift (7), AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift (4), AdjustElementsTool/AdjustElementsTool\u002BMermaidOperation.swift (4), \u002B6 more file(s). The bar is 30 methods; this is 25 over it, 1.83\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8713471b831010f98370d1867636dfdd80601cd72be225128f50c76841dd8d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AIChatView: TooManyMethods \u2014 53 methods, declared across 8 files: AIChatView/AIChatView\u002BActions.swift (20), AIChatView/AIChatView\u002BMessageRows.swift (8), AIChatView/AIChatView\u002BMessagePresentation.swift (7), AIChatView/AIChatView\u002BMessageScrollState.swift (7), \u002B4 more file(s). The bar is 30 methods; this is 23 over it, 1.77\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e8b90109521db3ffc365856ba79b6544fba7c4eec8fc4d3a5fc377d3ef7a10"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: View: TooManyMethods \u2014 52 methods, declared across 38 files: AISettings/AISettingsView\u002BMCP.swift (4), components/LockedFileAccessSheet.swift (3), MathInput/MathInputStyles.swift (2), Extensions/View\u002BExtension.swift (2), \u002B34 more file(s). The bar is 30 methods; this is 22 over it, 1.73\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/ScrollView\u002BExtension.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"52c7dec818e0383229a7edf5f5103d60163fe67497c16fac3c976d1247aa25ff"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ElementPropertiesPanel.options: MethodTooLong \u2014 options runs 173 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ElementPropertiesPanel/ElementPropertiesPanel.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"978b3dd014baeffb2b22843c77f884c520a4f2a7767888eb79d44ed795c83aaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: components/FileCoverCacheCoordinator.swift: FileTooLong \u2014 821 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: FileCoverCacheCoordinator (23-1146). The bar is 500 significant lines; this is 321 over it, 1.64\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"31831e8b9cc1c6440a641cee79cb8772dfef171f3c6f6b921da830313ae0639c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AdjustElementsMiddleware.patchElement: MethodTooLong \u2014 patchElement runs 158 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 58 over it, 1.58\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ceeb027b2a0061b447a3e8db4d47f05bdfebf9ab3f58b79582be98dccfe3c9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FileStatusObserverModifier: ClassTooLong \u2014 591 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 191 over it, 1.48\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e528f511e0d596b194c6eaf4c866feedb758180ad6441bfde3745411cccfd1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: AISettings/AISettingsView\u002BMCP.swift: FileTooLong \u2014 734 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 234 over it, 1.47\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9829ef7fb808910c0f42e01662af94c42253d5a2f379d989d651f27efd34c50"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExportImageView: ClassTooLong \u2014 585 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 185 over it, 1.46\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportImageView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"248c7aa667356e30f34ec9ef742f1b7d4e645299106f498739c67b366dc8c32e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ReadFileTool/ReadFileTool.swift: FileTooLong \u2014 730 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 230 over it, 1.46\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d3bd07e4c09c1d65c4bba3057ff900d682d7302743c4fa4d259d15d472aa38"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawHomeView.handleActiveGroupChanged: MethodTooLong \u2014 handleActiveGroupChanged runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dca9dbe633884ddfcc64909935db4a960b6cc5669083d99fb1cea3bc649945d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ElementPropertiesPanel/ElementPropertiesPanel.swift: FileTooLong \u2014 719 significant lines (blank, comment-only and punctuation-only lines excluded), about 80% of them inside a single declaration: ElementPropertiesPanel (16-728). The bar is 500 significant lines; this is 219 over it, 1.44\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ElementPropertiesPanel/ElementPropertiesPanel.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"af61162d23426e3245a27969a84131047c1520ba5a74069075e66a8b30762d7e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ElementPropertiesPanel: ClassTooLong \u2014 572 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 172 over it, 1.43\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ElementPropertiesPanel/ElementPropertiesPanel.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5e83d0d40d950902807664cac6b68613de1057b8d5030941a8458763687bc4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Toolbar/ExcalidrawToolbar.swift: FileTooLong \u2014 707 significant lines (blank, comment-only and punctuation-only lines excluded), about 75% of them inside a single declaration: ExcalidrawToolbar (18-742). The bar is 500 significant lines; this is 207 over it, 1.41\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cefe8f36cf7933d20b27a282fa1b6d963ff2b10cf5fa846706dc0ef051ccb79"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawCore.userContentController: MethodTooLong \u2014 userContentController runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dad436525e297a3c26d3f478a7601edbcb7d57ee5e61a7d9cdba50ec7dafa4b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileState.performActiveFileChange: MethodTooLong \u2014 performActiveFileChange runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"b059287cbc4c59f15190bf98a7ecd7d2410ae928463d8f36c3f1e29d954d62bd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FileCoverCacheCoordinator: TooManyMethods \u2014 42 methods. The bar is 30 methods; this is 12 over it, 1.40\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fb00ccaf0a7cf36a89bede3b7b7182af08394a4d2f85f944e606f269cd1b354"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawLibraryImportSheetView.body: MethodTooLong \u2014 body runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryImportSheetView.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4882ae4edf2df33a58bcea01af693f911deffeb5e5bbfb9777f62098c72abc3b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MathFunctionPlotWebRenderer.runtimeHTML: MethodTooLong \u2014 runtimeHTML runs 137 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"546ac8e0bf63bc5942716016fc1729541a491f3e3335b9a679206a766175813c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Settings/SecuritySettingsView.swift: FileTooLong \u2014 679 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 179 over it, 1.36\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SecuritySettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22fa07f2047a8bc095358a8fc70e47a1452fa7fe64077d6f4e46133c7e47b1fe"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExcalidrawDocumentSyncController: ClassTooLong \u2014 535 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 135 over it, 1.34\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"95b6c347ac1d11c81ad19dff8ab8fb04ec1c443bbc21a18652c5896fb6594b1f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExcalidrawToolbar: ClassTooLong \u2014 527 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 127 over it, 1.32\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceabf9443d207268e832b86e50b3398cca210fc43b0ec9b465dee6db0b7d0d6f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ScreenAnnotationSession: ClassTooLong \u2014 524 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 124 over it, 1.31\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca959319f14d67a314368929b8b7f8ee2370b6ace6a01d98863cb35b01f88a5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenURLSheetView.body: MethodTooLong \u2014 body runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BOpenFromURL.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"864c6b878f4cc6f9f635ba62fe3553a6a137c61d5b1028fbc9708c35282d8e84"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PromptInputView.startSend: MethodTooLong \u2014 startSend runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"db583566008ba62378788177314864b401b44f6719ca0fb78d2218e5e68a36af"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DebugPanelView.cameraSection: MethodTooLong \u2014 cameraSection runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4b1e4c84e5f6c78ac02e8f32c919c848bdc2f1813761fbe942612c27e890fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Share/ExportImageView.swift: FileTooLong \u2014 636 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ExportImageView (14-796). The bar is 500 significant lines; this is 136 over it, 1.27\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportImageView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c9cbcfdfe23349a11fd30c005fe685f9a125439900a52836ed1ae6c259af87a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CloudStorageDocumentStore.replayPendingMetadataOperations: MethodTooLong \u2014 replayPendingMetadataOperations runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2303}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e76abf64d4e2226a6d3237e87efde854eabc86470d0fbe75ec333bf827f05a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Components/FileHomeItemView.swift: FileTooLong \u2014 634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 134 over it, 1.27\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"468b18c0fb6a6509c52ee6fb0b899cabeadc7f20eb0683081d1e578ee2c92c15"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ExcalidrawDocumentSyncController: TooManyMethods \u2014 38 methods. The bar is 30 methods; this is 8 over it, 1.27\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ea0bcbf2636e36ac4dda595d09f15a6116b9dfdbb50730e2196a570cb7aa1a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Paywall: TooManyMethods \u2014 38 methods, declared across 3 files: Subscription/Paywall.swift (24), Subscription/Paywall\u002BCompactIOS.swift (7), Subscription/Paywall\u002BRegular.swift (7). The bar is 30 methods; this is 8 over it, 1.27\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Paywall.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab6316e18dc7588dcce1a4689ee0b39c6799eaaff61f561fc59efdee4e1ed4ee"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DebugPanelView: ClassTooLong \u2014 504 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 104 over it, 1.26\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca1de39810fc12ff68476a56c2200dea254d3ef96b208876669ef0aaac9a5e10"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Editor/ExcalidrawEditor\u002BFileStatusObserver.swift: FileTooLong \u2014 627 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: FileStatusObserverModifier (13-874). The bar is 500 significant lines; this is 127 over it, 1.25\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a555d3a6a3bc810e0d79b7b00d8b32eb71cf0af13c361f60f6a6519c7c4f3a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MediaCleanupSheet: ClassTooLong \u2014 501 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 101 over it, 1.25\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/MediaSettings/MediaCleanupSheet.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"6502fa4c90e9c8ec799cbd5247341f24cffe49a491e86c00f689ae9ea2cdf482"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AIChatView.messageList: MethodTooLong \u2014 messageList runs 125 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessages.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"2993e65dbbd5a9626ac60b10fa9a1bde616cada24b5dcc502fac5164b6175e9f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PDFInsertSheet.regularSheetContent: MethodTooLong \u2014 regularSheetContent runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50b524c307e1280463e8c61bd1161419fdb00dba34df34f494a3e48da34b67d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawHomeView.homeLayer: MethodTooLong \u2014 homeLayer runs 121 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea23edb1ee48311b73954ab48de502d8dd151fc97f77763f01503eda4245afa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Engine/ExcalidrawDocumentSyncController.swift: FileTooLong \u2014 602 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ExcalidrawDocumentSyncController (78-871). The bar is 500 significant lines; this is 102 over it, 1.20\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2693ae8ae122e3d5d8fff6d96b983d97cadcd8bb63d2b92f7c4368369c1532c4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AISettingsView: TooManyMethods \u2014 36 methods, declared across 8 files: AISettings/AISettingsView\u002BActivity.swift (7), AISettings/AISettingsView\u002BMCP.swift (7), AISettings/AISettingsView\u002BLoading.swift (6), AISettings/AISettingsView\u002BModelPicker.swift (5), \u002B4 more file(s). The bar is 30 methods; this is 6 over it, 1.20\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9b6d2e095d978433860e4581c6cdacfd45230b8981960f73fe7c0847e15375"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawZApp.body: MethodTooLong \u2014 body runs 120 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawZApp.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8fa73eb7f0d761d90de4be6433ed027b0638c734031379d32752250592274f7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileRowDragDropModifier.body: MethodTooLong \u2014 body runs 118 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd56262289b19e0251f42adf24cca839e4f2eeaae5c935ae0b43286d3c402516"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LibraryView: ClassTooLong \u2014 468 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 68 over it, 1.17\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4eb83151606b1141a85b748b70ca365b218afb318630d7076687515babc39a7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: FileRepository: TooManyMethods \u2014 35 methods, declared across 2 files: Repository/FileRepository\u002BLockedContent.swift (19), Repository/FileRepository.swift (16). The bar is 30 methods; this is 5 over it, 1.17\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e5bc98eb027cea4e7d4cd99bf80a2326b98cd8a8f8d737fa5d82c6db3a2e60"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LockedFileAccessSheet: ClassTooLong \u2014 462 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 62 over it, 1.16\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"271446d6674755e03e8b1edd3e6a75e382a755364a6a979bfd2b0f7cc4e26114"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Toolbar/CompactExcalidrawBottomToolbarContent.swift: FileTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded), about 66% of them inside a single declaration: CompactExcalidrawBottomToolbarContent (19-547). The bar is 500 significant lines; this is 75 over it, 1.15\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3daceef310f566cf6e605ace6b06bbcbf3cbdc2abccef2f3ffeb7ac3b8aa50cd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Toolbar/ExcalidrawEditorToolbarModifier.swift: FileTooLong \u2014 572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 72 over it, 1.14\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcab945138b293a9569f78cd2b396c6bbac42abc5043ef40d809a2738b93b0ee"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ExcalidrawEditor.editorSurface: MethodTooLong \u2014 editorSurface runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f852895a79737baf6d17d5e3cc83e235cccc0cdcb219836dcb1bcd2d2b65ab"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FlexibleSplitLayout.placeSubviews: MethodTooLong \u2014 placeSubviews runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80f16ae959049f5a500d06623ea3a23402dfdcd979ba15ae9b668d47b7247b2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NavigateCanvasTool.perform: MethodTooLong \u2014 perform runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"967f8a1bf1d5cf4ea04710dc83deb1b9751da4a435e98b30aea9947352248a51"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: components/LockedFileAccessSheet.swift: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded), about 82% of them inside a single declaration: LockedFileAccessSheet (51-695). The bar is 500 significant lines; this is 62 over it, 1.12\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b1395935f1e4893cb5149f707433dea824350b3589a3fd615e221dd53b05a4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PDFInsertSheet: ClassTooLong \u2014 448 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 48 over it, 1.12\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d3833b0e2808f0a5d410f93fba584968d264b5d489d7dd922dc1ebe37edebb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Utils/Utils.swift: FileTooLong \u2014 559 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 59 over it, 1.12\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"189edcd1656e55a6c7a524f297f9f4bca6e099955562150f976a739abf17eb04"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ScreenAnnotation/ScreenAnnotationSession.swift: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ScreenAnnotationSession (9-704). The bar is 500 significant lines; this is 57 over it, 1.11\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c11d8757b4e8cde9d655e85920e9bb98ccd2aa7de07e8e5e593af896e7604a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: AIChat/AIChatIslandView.swift: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 57 over it, 1.11\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/AIChatIslandView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"784052e9c75083e6da08f8cb042b4504dfec3108d7d7f946f90f646bf032f8c5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 53 over it, 1.11\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddOperation.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc44e5140d7cd25c7d4898a7d49b163e2913cc9b36dd827e1fe53671a0a2c518"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LockedContentStateStore: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 over it, 1.10\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/LockedContentStateStore.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c182f23e427442b2710f3ab8db444ccfaf801a69539251ac0ab3bea87e5b1918"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: components/AnimatedPresence.swift: FileTooLong \u2014 543 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 43 over it, 1.09\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/AnimatedPresence.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8b53b6af400cebef51174925892749b009d2b74fb1536bc1faa4e13a24d511"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ScreenAnnotationView.body: MethodTooLong \u2014 body runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"626ee1bbed635670528e2b06295c040405be0d2b9a00357a5335924d382c0271"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileCoverCacheCoordinator.generate: MethodTooLong \u2014 generate runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"8694f11a813dda88a0393fb38fd5bc0556ad4f0b90f6a69dd6e19ac43aaeb612"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GeneralSettingsView.content: MethodTooLong \u2014 content runs 107 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 7 over it, 1.07\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/GeneralSettingsView.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"51419cabb5ae147f05a45bc063759e92acdce787a485b357847f7dbb88fdfd4b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ScreenAnnotationSession: TooManyMethods \u2014 32 methods. The bar is 30 methods; this is 2 over it, 1.07\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"455c5e5b21e99ef770ab41be8bbf3593481f70f3c40bbc8977e8b295d0ce8f3d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Optimized/ExcalidrawMCPOptimizedTools.swift: FileTooLong \u2014 532 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 32 over it, 1.06\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b90cf6723329be8ecfefdc6c619c44830ebb4655f7bb9e43dfb5834497cf1981"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ExcalidrawHomeView: ClassTooLong \u2014 424 significant lines (blank, comment-only and punctuation-only lines excluded), 10 methods. The bar is 400 significant lines; this is 24 over it, 1.06\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"170d0971bdd10cfe5b6fed570079bacffd4c6b12e8fde614a91e5588bce37908"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CollaborationEditor.body: MethodTooLong \u2014 body runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"495d9bcb127c7fa0088696a69e548b7f566e39fcde330d31e040a57b0eaee186"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ApplePencilToolbarModifier.body: MethodTooLong \u2014 body runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/ApplePencilToolbar.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4da04d3cc2c741f21a9d2981f4dc63fa0f4cfd13d9474ba4c189f7613d6c15c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileHomeItemContentView.content: MethodTooLong \u2014 content runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a6910493c5f8a075a7821222ae9649d316ae9c2481644dd214d5ac909b9990"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MigrateToNewVersionSheetView.body: MethodTooLong \u2014 body runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f478b88e21fed857f3b26b8a8f0be0f2d0ba36cea1340a4af25d52505e0d0f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ContentView.body: MethodTooLong \u2014 body runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView.swift"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c54ffe602c5c4b7dd9f53d498884adf980498ac426db49381652d97bbdc84d1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SyncCoordinator.performDiffScan: MethodTooLong \u2014 performDiffScan runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aae01eeb0dd26571ee99d6a5c96674194494f1203d44a2175ea3be4e0b340dc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MigrationProgressSheet.body: MethodTooLong \u2014 body runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 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 \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationSheetView.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ec37156a3df2e0a619a657dfd1137c5178da6a00dc13fb39c088fbebf2a7f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: DebugPanel/DebugPanelView.swift: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: DebugPanelView (13-761). The bar is 500 significant lines; this is 9 over it, 1.02\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73c93841a2d88149fa2df365be074fcce6d609490fc1f44877d1e48f0902873"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Library/LibraryView.swift: FileTooLong \u2014 507 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: LibraryView (18-688). The bar is 500 significant lines; this is 7 over it, 1.01\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"34ed1a44debf80a5cd18b4f792b1c095053ae9adc5b544ac0afe7bd2cc2f6610"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Paywall: ClassTooLong \u2014 405 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 5 over it, 1.01\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Paywall.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f1d770a92fc43c2f3f4c44773d234028cb6fec9d1250f185d1f02d3d8fa5d5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MediaSettings/MediaCleanupSheet.swift: FileTooLong \u2014 506 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: MediaCleanupSheet (14-742). The bar is 500 significant lines; this is 6 over it, 1.01\u00D7 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/MediaSettings/MediaCleanupSheet.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea287fa22b8a58c656214212366d9d115b9d938eba72c44725c85fd168cd91e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ChatScrollView/NativeChatScrollView.swift: FileTooLong \u2014 505 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 5 over it, 1.01\u00D7 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d26df77cc6218ede4a814083611e789c856f9a1b63daffea18165237d092217"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (10 members, 5 shared lines): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:11-25 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadBar.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityExactlyOne.swift:11-26 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootMany.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOne.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOneOrMany.swift:11-25 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadDiamond.swift:11-23 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadNone.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangle.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangleOutline.swift:11-22 \u2014 These 10 members are variants of one another: a block of 5 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 10 times. The repair is at the members\u0027 grain \u2014 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 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da68bb5379aa95f7060d477c9152a4ea73f92915a397c780d00bf3ade922b7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (9 shared lines): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:21-42 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:55-76 \u2014 These two members are variants of one another: 9 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebe9cbb864f96ba3cc9e2887fef4e82c2307edfd32aa3a52582dd22255582ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift:108-158 | ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift:445-491 \u2014 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 \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e1b1f7e6f8c4a69472b590dee00e75d3c710ad4e8164e6df9c12a4b4bcd3ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:140-157 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:161-172 \u2014 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 \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb77f9b7b1a6a4b8c78a7396a6abfa26ac725c69627121159a340d600e5f1d0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (10 members, 50\u002B identical tokens): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:73-127 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:121-178 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:272-321 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:79-129 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift:128-177 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:98-159 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:247-318 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:477-568 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:90-147 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:216-278 \u2014 These 10 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 \u2014 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 10 times. The repair is at the members\u0027 grain \u2014 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 10 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"db60da7db548bf3647b192af61f673cbcb89c0e35e6fff3e9d6749b9c352b504"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:180-208 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:323-347 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:131-158 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:161-188 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:321-351 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:571-605 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:149-177 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:141-174 \u2014 These 8 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 \u2014 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 8 times. The repair is at the members\u0027 grain \u2014 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 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4aa899151ee1d88f1d14008181879b64b166b146170c54f76c55f6c7bb7dedb"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:11-25 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOneOrMany.swift:11-25 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadDiamond.swift:11-23 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangle.swift:11-22 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangleOutline.swift:11-22 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:138-403 | ExcalidrawZ/Store/ToolState.swift:589-602 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad647d7e3aa3e70bc45a65f4fdf80f38531da5817b9332b9dd5b633a51552cef"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): ExcalidrawZ/Models/ExcalidrawElement.swift:83-106 | ExcalidrawZ/Models/ExcalidrawElement.swift:110-133 | ExcalidrawZ/Models/ExcalidrawElement.swift:135-158 | ExcalidrawZ/Models/ExcalidrawElement.swift:160-183 | ExcalidrawZ/Models/ExcalidrawElement.swift:185-208 | ExcalidrawZ/Models/ExcalidrawElement.swift:210-233 | ExcalidrawZ/Models/ExcalidrawElement.swift:235-258 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElement.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"16d6acf0e8b9259c2657d79da599986193d2de5a8520413e20518dd057a8f667"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:120-135 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:194-213 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:287-296 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:338-347 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:390-399 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:656-665 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaee20f247a1c017e62f0cbb43a7bd047f31747e72bd29e0f4785be01dfca11b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:176-193 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:176-191 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:120-132 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RenameFileTool.swift:102-127 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift:194-206 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"05fe88324fc7850ca7115dbc8397cd4395725055b0d32bfc7522bf9351afc051"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:51-64 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:77-90 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:24-38 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BViewportHelpers.swift:132-142 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e411834ec74d8fc10f1bf7940383564dc3b0b45b966549a45d82fa12fbe69d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:62-80 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift:11-31 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift:33-51 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BSkeletonHelpers.swift:11-35 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"f634270a450c3a5f55ce716bdfbaaf61523b09a0db1399aff121fb11964cb142"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:265-278 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:306-329 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:358-381 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:415-427 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"748752579a2b9c9a4f374f69eea8578314ce9bd96561886e603df8dadd0f0ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift:65-79 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:63-75 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:69-81 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:82-94 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff62d60c179c1362863fce935a39067194cd6993aac241afc63c75d3c8d03cd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift:81-100 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:77-94 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:83-100 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:96-113 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa6d3e1abb51b88d608d317bd48556c34c2dc75d207ef3e6cdf96b465ac6f81"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:104-218 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:220-334 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:336-436 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:438-552 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"e00e2f142312c5123d6fcdb350bbb8c845893cf0276b9615b22ea73959662c35"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:190-206 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:593-608 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:63-79 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:65-83 \u2014 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 \u2014 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\u0027 grain \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"1498575240abcd0efe68cf8ffffbfd32527f90e0d95d5fd872702d7d51a57e57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 10): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:76-121 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:123-168 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:274-319 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:82-127 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift:131-176 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:101-146 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:249-294 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:479-524 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:93-138 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:219-264 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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 \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:75\u0060 calls \u0060encode\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:122\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cadc8c0d9105efe252dc483be2f0af0c192d6129d0462734bc19a6d7cfd9d29e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43\u201344 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:163-205 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:185-228 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:277-320 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:163\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"79dcec2ecef0490b5e73a81e66a9d5ccf2522b9b91da7f4929c590b1ec2de77e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:332-375 | ExcalidrawZ/SidebarTrailing/AIChat/components/ToolCards/AIProposalToolResultCard.swift:324-367 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"f031510cc00eff839f1bb113c1313e11ddb012a24b9086a95077c43cb9b55e05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:90-130 | ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:161-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:90\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:160\u0060 calls \u0060fileScopePredicate\u0060 and \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:89\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d2a09d098cd2d82136ab7d21f005b1603563fcfc5bdd04990158d0b00d2f3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:166-204 | ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:227-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:166\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"d897bb86d42ef487fd450e28e5eef9ed8fb6b690217c4379c8ace3478d90faea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift:108-139 | ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift:445-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift:108\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Content\u002BSearchable.swift"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e863e873133aeeffb4973d7e37d8b724eec071029ae7656cc7e674b31bed47d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:52-81 | ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:138-167 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c540aa49ed294f99abe3b7891099d3f72fd41c5eb62af4efd7ff66e329724d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201329 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:252-280 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:689-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9cd11f62283f79e934f9d7ec9c0bb012c45569a5106fc89125e3d979c56486"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift:200-227 | ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift:234-261 | ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift:311-337 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift:200\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawRenderer.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"93017b6550c8b2f6f5083d07ee28e124843baf34f9f1de94dc39d32dc79c4b9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:197-224 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:502-529 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:197\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7411e302d4da164999f0d0105eadbfc3d54039fda6372320e6e3193af7ac41f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:261-287 | ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:339-366 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c438ca804b00072aa64c180a02797275cd3a0eca5c3ad1cf508937d667b9db57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:269-295 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:180-206 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"067103e48d9c8267e899d8a1e1f4eec23e2724fee57e4b72f6792e3969f83c9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1406-1431 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1487-1512 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":1406}}}],"partialFingerprints":{"codehealthFindingId/v1":"8129bfb51aa0eb0f54bf39abe03ab354ae5ae844f62bf5e5406b7369d4c37def"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:435-460 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift:458-483 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d132864c5c8ce66474b5c5479e5df42da1414d9976e74870dd1a2f6ba924560"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/components/ExcalidrawFileCover.swift:450-474 | ExcalidrawZ/ExcalidrawView/components/ExcalidrawFileCover.swift:491-515 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/ExcalidrawFileCover.swift:450\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/ExcalidrawFileCover.swift"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1acb3fd3d79c26a0a48007cc34629d408da0d7eb78bac0f24dbb90be15ab46b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201324 lines \u00D7 4): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:59-78 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:135-150 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:37-60 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift:34-49 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:59\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e25248b37f2c8954087df8e48c5b07761c4792f6cd962595e21b19360fa60e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift:84-107 | ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView\u002BDiagnostics.swift:238-261 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"8736098b5818b01e9e7ad3f57ed7cb41ac5068f285cc19037c4636c90876e8ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 7): ExcalidrawZ/Models/ExcalidrawElement.swift:84-106 | ExcalidrawZ/Models/ExcalidrawElement.swift:111-133 | ExcalidrawZ/Models/ExcalidrawElement.swift:136-158 | ExcalidrawZ/Models/ExcalidrawElement.swift:161-183 | ExcalidrawZ/Models/ExcalidrawElement.swift:186-208 | ExcalidrawZ/Models/ExcalidrawElement.swift:211-233 | ExcalidrawZ/Models/ExcalidrawElement.swift:236-258 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElement.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c00a9bf177d1930762ca42319eb3687172a7240e93d3c991eab1d26d031978c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201323 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:394-412 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:301-323 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"715a1842db9c4351fddf7994ab9af68cbd517d30943860092f8801d766476937"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201323 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:242-264 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:232-247 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:242\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"39a617a3048a6edc06bc52d654567034b31a931a86c3d65db02503e54059ed8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:196-218 | ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:224-246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:196\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:222\u0060 calls \u0060WhatsNewVersionSection\u0060 and \u0060ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:194\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"679dda27c7f3d2bd437685b8ebc8c5e5bf920c3197cfe981705e06c0c724edc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 8): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:182-202 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:325-345 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:133-154 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:163-184 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:323-343 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:573-593 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:151-172 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:143-164 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 87 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"0042916504d261164e626e12c38ef443ce7d209cdee34f3e9caefa766faaf316"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 6): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:381-402 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:534-555 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:564-585 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:594-615 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:624-645 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:654-675 \u2014 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 \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:381\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:588\u0060 calls \u0060simplifyCrop\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:403\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"57592272466cc8e71130ae76d870b8974f426854afb058fd87fa601e9f8baf6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxModels.swift:199-220 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxModels.swift:183-204 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphModels.swift:88-109 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxModels.swift"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a84b48f573004cf7605b6d1189248e36f42a292983919aae60d1e92d85a6a1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:326-347 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:569-590 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:326\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:591\u0060 calls \u0060frame\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:348\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55cc25641cb0fa06be7e9006d7e0c3ebfd3a060e61623b2e5e4bde15ec05f34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:259-279 | ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:303-323 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:259\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f7f06ebdb1ebaa303bc41cf6cb15d08fab6b4d0415c97aa46624fec69b0626"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): ExcalidrawZ/Persistence/iCloudDrive/MediaItem\u002BiCloudDrive.swift:19-39 | ExcalidrawZ/Persistence/iCloudDrive/MediaItem\u002BiCloudDrive.swift:88-108 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/iCloudDrive/MediaItem\u002BiCloudDrive.swift:19\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/MediaItem\u002BiCloudDrive.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"877f287a71415567e34929beb12c12ded097420ba400dd464b2e3f1eb0457ba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:525-545 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift:391-411 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:525\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"37c4f82eefa77283f9f0bc1d7cf907731a75344076fcab2234d0d65611a7c385"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:633-649 | ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactCloudStorageBrowserView.swift:218-237 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:633\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d2572d66a042f5512b0cbee82963e0ecc69dca0b03cd85ec21026157d4dca92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:30-49 | ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:101-120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift:30\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/FileEnumerator.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"503f184349cc17774771b496c711c1a9dbc99dadb508762a9840f80eb33bd138"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift:347-366 | ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift:709-728 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift:347\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"777aa648fce1bc41927916593c6fcae26e1d9c3e301ff1af680b0c516cc45891"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): ExcalidrawZ/Share/ExportImageView.swift:510-529 | ExcalidrawZ/Share/ExportImageView.swift:579-598 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Share/ExportImageView.swift:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportImageView.swift"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"9342e03f047f65186490ad85e42532ea4341b66e8673849871be822f9a69aca5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): ExcalidrawZ/Utils/ArchiveFilesModifier.swift:335-354 | ExcalidrawZ/Utils/ArchiveFilesModifier.swift:486-505 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/ArchiveFilesModifier.swift:335\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"a98e71e4671fff42714cfd27af42767d2628b2be12d7b2c4886b57230df3ef90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 4): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift:82-100 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:78-94 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:84-100 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:97-113 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0be3147e4376bd73d886f20a3b359df6b311d2e8f99cd844e6388a04b9d42ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:109-127 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:225-243 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:341-359 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:443-461 \u2014 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 \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ea77d4acc10ff7e25da57e1cc37c2f3f232351b54e9a597ecf36dedb40be19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift:536-554 | ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:271-289 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:182-200 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift:536\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d46d0d46487fcf5b10d4c128fc5b11ab6445f203fc69a2cdae9633786a83d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201319 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:249-267 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:686-699 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:237-250 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:278\u0060 calls \u0060scrollToBottom\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:251\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"34e127d99535ab6e3646c9d3efdfd44ce61fb021bf6806c9b77db4e9996ad850"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:60-78 | ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:123-141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:60\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd61df8d5e654e00d9bb5d7f9a402f034963a74273ba2b3c177552bf58b1c06e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): ExcalidrawZ/Share/ShareView.swift:140-158 | ExcalidrawZ/components/WhatsNew/WhatsNewSheetView.swift:156-174 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Share/ShareView.swift:140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ShareView.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5937b3eb30a94f0403a79d0bde43cc5e93067638ac23174e4a992918f90a80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:70-88 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:51-67 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"66464f3222a8e3adf3f61a2e3bf3310342a80bc2bc2a66ca04aee3dd1cc4caed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:376-394 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:383-401 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:376\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38d7376affd2cc5d903865f4696490ee9e7e2a959cfaaf61f2c6e32e2ef79cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): ExcalidrawZ/Utils/ArchiveFilesModifier.swift:311-329 | ExcalidrawZ/Utils/ArchiveFilesModifier.swift:463-481 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/ArchiveFilesModifier.swift:311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"27359d82462fd06c1545c79ca39ccc03bcae97fbc414bdb6f8491e75dced1374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:182-199 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:298-315 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:182\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdacdef088092d080a29081caeaa0466dfcd1634ac49ec017c83c9eb6dc70ab6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift:154-171 | ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift:200-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift:154\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/FileRowView\u002BDragMove.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7427c85748574beaeb7ce44c5fef1f3729517f6c9a95659165eaa9c72f7447"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift:569-586 | ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamToolHandler.swift:75-92 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift:569\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamToolHandler.swift:93\u0060 calls \u0060cameraAspectRatioHint\u0060 and \u0060ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift:587\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c21431d720052ac5fe3b7fab09cf7d59bf5b1aab0ad055f92c03109a5e3b82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift:138-153 | ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift:180-195 | ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift:222-238 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"b16081086d4da71fc4429f01de068e211800496abcbb30dc87bdfcc678ded2e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:131-147 | ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:187-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:131\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc173cd5ac892fa0986cbbe5d84eeb57ee6419b6f3a81c3e88d1904da41161fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:44-60 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:111-127 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:44\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2830f80a7e731922d75dec0be02bbba90c776e4eff3b89a35d5171f84aa90bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:88-104 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:109-125 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060configuration\u0060 to \u0060BoxConfiguration\u0060 in one and \u0060DropboxConfiguration\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d6a4481e8fefc13f935fc20a042f5973964a2d2464f4735f553f9178fb5877"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:321-337 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift:479-495 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:321\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfabf19f326def1741072ab4643e4e12771dc88632eee5b120d9be1d704269c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:164-180 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:281-296 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:164\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb3ef23f1e126fa7a3a395c6ed3ad4d7fb0b99a18dc580551cff7ca292b64a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFilesListView.swift:36-52 | ExcalidrawZ/Sidebar/Temporary/TemporaryFileListView.swift:28-44 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFilesListView.swift:36\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFilesListView.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"0882c0e77a72cc800e65566e89342a1b645b92b2e1817ea7056aeb32f096a63f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201317 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:213-221 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:92-108 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:213\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2db9a3dd97c645a9872c7eccac13aed060b076f4d6cd7223ce80389281d31d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201317 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:287-303 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:297-308 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1ffd20356a4b94fb7425accbfb4293e3bc4e0f83a65884ab430dfca1fc222a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:509-525 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:804-818 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:509\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:527\u0060 calls \u0060dismantleNSView\u0060, \u0060removeObserver\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:819\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ecc51d3388114175e4fef01ea00c42248dca91894342d85a9e309e82e4ef5e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:20-36 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:20-36 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0c940dfe24d53f793d7bed1bb215fb5aefa274b651e369b4bf1b7a169eca23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:61-77 | ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift:65-80 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:61\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"388e2c837a9b172121da9b78e3facc078824defffa6d81f5029fde253114cc33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:976-992 | ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:1056-1072 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:976\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"a602391a3d395a34c13f325a8c5909a90c2910094e446a50e8a9e5bf58205356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 5): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:392-407 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:422-437 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:545-560 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:635-650 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:665-680 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"54446d032186e487bde9e9c0eb5a985df0b638ef11b5d322388b0b39a94a4324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:35-50 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:42-57 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:55-70 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 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. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"df1f01e41ec340f51df925ca6eb6ebf7807238235e8515cc18d9b2fa8b911968"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:452-466 | ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:480-495 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:452\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"081d40b5a40f0f08dac281a76ae3f4e5b581b90ae931e7093035bd6e9b612779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift:350-365 | ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift:398-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift:350\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e45e1f65e67844ba7e72991de61f51f604753cfbeb15371c73d7214497a4c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift:695-709 | ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift:719-734 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncCoordinator.swift"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f62fcd46ccaa0e89bf3143c09cdc3b621ee681c6007fd7297ab88ec2e8a32b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:203-218 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:319-334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:203\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab602adb0b4244c693ff652644cfe28ea48a43f89453a7994babfd67bc5dee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:37-52 | ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:100-115 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:37\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e3fc0e4af14c1a35a7205cb0e4e99a910f20cbeee8c6ad15025b1d8038fe9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Settings/GeneralSettingsView.swift:113-128 | ExcalidrawZ/Settings/GeneralSettingsView.swift:134-149 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Settings/GeneralSettingsView.swift:113\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/GeneralSettingsView.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f46a5db1093e163d237e9fba494ef467f0029e0eae8f53f9f5d36f7628b96c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Settings/components/DisableICloudSyncingModifier.swift:37-52 | ExcalidrawZ/Settings/components/DisableICloudSyncingModifier.swift:72-87 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Settings/components/DisableICloudSyncingModifier.swift:37\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/components/DisableICloudSyncingModifier.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ee382a0bd97fcb72d98cd2a7706e4e8c13349ecd2f9fa141bc320c5fcc1872"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Sidebar/components/FileContextMenu.swift:146-161 | ExcalidrawZ/Sidebar/components/FileContextMenu.swift:168-183 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/FileContextMenu.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"f376d4b265b05ef968c2f6f21fcd994224b89400262da46e13871c25d77bd056"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Sidebar/components/MissingFileMenu.swift:59-74 | ExcalidrawZ/Sidebar/components/MissingFileMenu.swift:258-273 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060file\u0060 to \u0060FileState.ActiveFile?\u0060 in one and \u0060file\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MissingFileMenu.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7075f6e413acb05e182ac70ca14ec14de87ce678e858e0cd812e8bbcc232726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift:154-169 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift:195-210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift:154\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"6239e6ad150aa2084a87be16060286b2571761b14c9b13598790adcc350a12d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:296-311 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:262-277 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:296\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d61d957ed35563a5a491809b9207b4dd9c51fb68cdecbd412ada65891aba3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:332-347 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:317-330 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4ac3421804c735e4473a54c6993112ec03af8b86d17d1280ecad3b5c38f54d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): ExcalidrawZ/Store/FileState\u002BAIChatSession.swift:406-421 | ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:692-707 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Store/FileState\u002BAIChatSession.swift:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState\u002BAIChatSession.swift"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"978a313db3f9aa8f2dae729b99c0e8051ac66d40a2c51fa6da6ef046ff07848e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:441-455 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:472-486 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:503-517 \u2014 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 \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:441\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9e90df6738fe88bf179bf4d0119ecea34ce3ccb8bdf0349f8f91c4475f73af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CloudStorageFolderFileHomeView.swift:118-132 | ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactCloudStorageBrowserView.swift:105-119 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CloudStorageFolderFileHomeView.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aecce783eeb4256b33e4b4a18b50ae5bc384fe87b191edb9be58ac782dd1960"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/Components/HomeTipsSection.swift:174-188 | ExcalidrawZ/components/WhatsNew/WhatsNewSheetView.swift:235-249 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/Components/HomeTipsSection.swift:174\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/Components/HomeTipsSection.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47e123e8636b1ac6f613f4ea6286f1baa6d4fed3f655093e60ae43c1db62bc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:310-324 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:553-567 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b2aee948a95f131e4e196685dc9bed3a7bb69bde5f00b2fe54e7d521d403b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:390-404 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:636-650 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe2b647a06f8b694c03ee4e40d952f134b81677ea0167483009bc8498350ce5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:73-87 | ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift:1019-1033 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:73\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"397c7dd56ce2f56cc8fc6c57eeb372eece74bc1788f1f4f74bff4d4393eff826"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:96-110 | ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift:326-340 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:96\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"a81bef5c9e03d1021f41236749e07587b3853bd3f75bfd4d57fc0f3a8712bb48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:719-733 | ExcalidrawZ/SidebarTrailing/Library/LibraryItemPreviewCoordinator.swift:145-158 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:719\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a4e4941784da3e4d01caa0bad8614db91b912367635b01de3a380d89d87af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BPersistence.swift:25-37 | ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:195-209 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BPersistence.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0cf8f192c4167189f1cc3afec5788111326e44285155b6c4005cd7f0dd3b887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:356-368 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:265-279 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:356\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:355\u0060 calls \u0060permissionDenied\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:264\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"715f739427eefb4ac2782a2bcbddea77ef3d3a2c0b3f08e43b6804856baca82a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVServiceIdentity.swift:21-35 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVServiceIdentity.swift:37-51 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVServiceIdentity.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70b53853f7588f419e7a815dd739d743c6cb86deea8969dd96e764fc8251dac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift:129-143 | ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift:145-159 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f735e038a42c8302a0e65ebb3e715ef1966c8595aa7badb62ca03ee813f94556"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/CollaborationFileRepository.swift:495-509 | ExcalidrawZ/Persistence/Repository/FileRepository.swift:711-724 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/CollaborationFileRepository.swift:495\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CollaborationFileRepository.swift"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5eb5f4d43fbf9b08b94169f76f93db8f986c9c63f1a5300fb579975e03ca95d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201315 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:201-210 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:88-102 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"853c04d4d0cdbecd74f757ac4f74194396e42666cef00761bc8afc2a80b3c816"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:247-261 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:275-289 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:247\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"369534fc164c3c468aa11aa36e11f52cdd274e2185372c75278b9fe533f7a7ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:271-285 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:299-313 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:271\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ad19b8a82a3cf5b6d4bc162a5dbe1a6bd3c912504ba22f54b6aa2a54d9f360"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:30-44 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift:44-58 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1fd9f27b5bb88f2929f90c21dc051d893d92646b00ac0ce2c770daa86c52ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BInputField.swift:81-95 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BInputField.swift:111-125 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BInputField.swift:81\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BInputField.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea135ef656b0fbd9452dda063f60fa0f014d6609813488646643a12edbb99084"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/Store/ExcalidrawFileSortProvider.swift:59-73 | ExcalidrawZ/Store/ExcalidrawFileSortProvider.swift:91-105 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Store/ExcalidrawFileSortProvider.swift:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/ExcalidrawFileSortProvider.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"de396c10304560c2ab9c55aa9da70c85e61fe939b84dad026fe695c6f3d13bd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): ExcalidrawZ/Utils/Utils.swift:395-409 | ExcalidrawZ/Utils/Utils.swift:480-494 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/Utils.swift:395\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"a668f274a1df70c0b5d32f1877e2574d7cf24cf17c971ce35b0966be68fd24e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:428-442 | ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:446-459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift:428\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u0060version\u0060 to \u0060\u0022v1.4.4\u0022\u0060 in one and \u0060\u0022v1.4.1\u0022\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/WhatsNew/WhatsNewSheetView\u002BallFeatures.swift"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"34664fac3d258ab53efda10a6e1a196c7bbbaa107cbca92f32ba57b9f38d9ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:38-51 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:74-87 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:105-118 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:38\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a80b2c10d7fbbae12fac14bc22411598ba28453a6cb3051570c56b018b63f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:979-992 | ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1195-1208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:979\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42b0379ff1bdd3d0c8742b4f3a4fd995b4b807d7df1de5128586c41d9df49ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift:364-377 | ExcalidrawZ/Sidebar/components/GroupContextMenu.swift:550-563 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift:364\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4811a41857793202eb2a75dd9b192ff4aa34284a888d92bb9fc7b8260c91ed3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:407-420 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BSend.swift:430-443 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:407\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"2055c88de112483bc690399abaf0a6c3c619912a4c1f71a96173fabfd1e72a96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:190-203 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:593-606 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:190\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb42884f9ed25860c3d8c21148509f723812b4da4f0355642ee88f2ed885300"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Subscription/Paywall\u002BCompactIOS.swift:74-87 | ExcalidrawZ/Subscription/Paywall\u002BRegular.swift:121-134 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Paywall\u002BCompactIOS.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d0f028b3c6019d5e258c2149d171e323d18569d20694a0dde63016f0bfb8e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:256-269 | ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:311-324 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:256\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"202eb52b791782eb0d9ba1e0229d375a04e70d7954c2e41c94a2605a25e7c651"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:281-294 | ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:330-343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:281\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:280\u0060 calls \u0060appInfo\u0060 and \u0060ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift:329\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a530f045a20a81f5826627b037b3b2fd3bb3008a97a52333921417f9988122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift:90-103 | ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift:134-147 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift:90\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"58925742258f9ba3842a2b233af13f8c16551554a1d55fbbd6012ece54dbebf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:124-136 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:172-184 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:194-206 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:217-229 \u2014 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 \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:124\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u0060item\u0060 to \u0060\u0026item.updated) newElements[targetIndex] = .text(item) case .generic(var\u0060 in one and \u0060\u0026item.updated) newElements[targetIndex] = .linear(item) case .arrow(var\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c5d8c12b219ccbcc7b003f7a35f820d2f8ceffd035127fe5d01acfa6677f01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:299-311 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:528-540 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:554-566 \u2014 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 \u2014 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 \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:299\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:297\u0060 calls \u0060encodeIfPresent\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:526\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a8a34ebc97a87292106487b51eb763580f17855315e0cc2597feb628bfec3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201313 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:62-74 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift:206-211 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:40-52 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:62\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3506c6866b80edebaa3fa852017f65daf6f0a441f4d9ffff0b6738a8ee49f90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift:46-58 | ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/components/CompactFolderItemView.swift:59-71 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift:46\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift:59\u0060 calls \u0060allowsHitTesting\u0060 and \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/components/CompactFolderItemView.swift:72\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileItemSelectionModifier.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"03922594b0c82a1d89aa3a55f99c6e5bb0f902a013c11feee992372821e8475e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:500-511 | ExcalidrawZ/ContentView\u002B/Detail/Home/FileHomeView.swift:170-182 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:500\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4803f3b7aaf65b75d55dd3a423b3d31f35e693dc9b61dd1ad80b5e8896f977"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:106-118 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:143-155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:106\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e00bf18a85423531a89a8ea5354f4133d463927aa7d49017a23559ea63f0b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift:115-127 | ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift:120-132 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift:115\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fe4bc924c95c36af3e6b2bf13049c2682feb793d7296ca873bd7ec1720cda23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:438-450 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:454-466 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:438\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb5dbb4dce0e60da83ee1bf1f33ef54b62fd39a71b3d0056b0c7daf39cbc8e8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift:225-237 | ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift:313-325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift:225\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"57139443bd2691af4d42ef80e9e014ec4fddd2d5f2888f3e5b6bde9422885a5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:53-65 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:89-101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:53\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"794f80150224994ec6e8c327690554b666f390303a116d6d93dbd716db35ac87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawImageDecoder.swift:141-153 | ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BDocument.swift:60-72 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawImageDecoder.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f716d00d362830d46271af88b1ec7177f598bd05fac26c6c519b10d0f2a66b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:49-61 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:160-172 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:49\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcafe1f008860c1a0635928b2903b3fcf17e6685cc24e759502bada23eebf73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:290-299 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:477-489 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"750659b8f5ad76b8a1b15516336e124babab5b0781dd44a6466c864a524d5acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:83-92 | ExcalidrawZ/Persistence/Repository/FileRepository.swift:476-488 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"316a6f3542988c20799d04d25f385855b09dc78116e0e8704941a104025b18c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:88-100 | ExcalidrawZ/Persistence/Repository/CollaborationFileRepository.swift:269-281 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bd1801c4bc8cef3abf930a2b2c0dbb2145a6195537fa4c047f1d36876e34aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift:42-54 | ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift:71-83 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift:85\u0060 calls \u0060warning\u0060 and \u0060ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift:55\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9fb19c541f81d34b0095660c068dbbced57cda57edaffa0c57c6fc769991e6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:64-76 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:67-79 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:64\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"770c9163a72a192124ad5e4c60493bba84144feaf35ea7152f7bdff8d968b2a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift:227-239 | ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift:443-452 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift:227\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c88d05552389ea4d28dc205e87219748dbf9bd4c8ac1d5eea58334461504071"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Utils/ICloudFileKit/FileCoordinator.swift:188-200 | ExcalidrawZ/Utils/ICloudFileKit/FileCoordinator.swift:350-362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/ICloudFileKit/FileCoordinator.swift:188\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ICloudFileKit/FileCoordinator.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"30cc28ad1a77815117be4c8f082b18167abf657940a980dbdb1ebe11376708c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift:555-567 | ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamToolHandler.swift:61-73 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift:555\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"b850674407e0b41f454426ad515a6e13fd426d98c307d24ce9fdf784f1495488"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 5): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:48-59 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:122-133 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:170-181 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:192-203 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:215-226 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:48\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060item\u0060 to \u0060\u0026item.updated) newElements[targetIndex] = .text(item) case .generic(var\u0060 in one and \u0060\u0026item.updated) newElements[targetIndex] = .linear(item) case .arrow(var\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:60\u0060 calls \u0060Int\u0060, \u0060parseTextAlign\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:134\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb446f7242eca5bdce00ac0fa2569a1feecb18359f8099cc0f9dc3d57ab4f11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift:66-77 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:64-73 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:70-79 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:83-92 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a86e15b66e8e631c56655ef5d7522ef23c22ebd4e0801178eac19b260fe57a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:67-78 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift:16-27 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift:38-49 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5a9a8d57546543d6ba6bb9cac04bc25c9bab58252346150d3e9f2ac52035122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:53-63 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:89-99 | ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:120-131 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift:53\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1eddf3863cac877327a891a66c324731f345380a6ad54cddd68014e5685a7b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:92-103 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:113-124 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:82-93 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:92\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060configuration\u0060 to \u0060BoxConfiguration\u0060 in one and \u0060DropboxConfiguration\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c313583e7e6030e84145335664558a888fa85e412fc8325f54e177ab5f026e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): ExcalidrawZ/Persistence/iCloudDrive/CollaborationFile\u002BiCloudDrive.swift:18-29 | ExcalidrawZ/Persistence/iCloudDrive/File\u002BiCloudDrive.swift:19-30 | ExcalidrawZ/Persistence/iCloudDrive/FileCheckpoint\u002BiCloudDrive.swift:19-30 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Persistence/iCloudDrive/CollaborationFile\u002BiCloudDrive.swift:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/CollaborationFile\u002BiCloudDrive.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fed749d81b15319fac7d912e2938c45fd688b1a3f2ffa59cc9d81d9cd657e3f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:123-134 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:170-181 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:217-228 \u2014 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 \u2014 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 \u0060ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:123\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee9b2b11e988eb5df7cfde8fbf23486cca04e28dd25e357773f42cc1a5c6c10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:213-224 | ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:137-148 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:213\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:135\u0060 calls \u0060Capsule\u0060, \u0060fill\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:212\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a86c3c37a4327f6c8e0d34c404e51d8eb0870574313a4f2708ba2fc52e2728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift:134-144 | ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift:151-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift:134\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/JoinRoomSheetView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9c619ac41d05272034565ac7eb1a8a4d33c94931fc167a8c3da76b5898950a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:112-122 | ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:245-256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:112\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"920af5d43c8ce7628a0796b264f4d8560d6234323cbfb4aa0530430477952bf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:77-88 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:403-413 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:77\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"3582de68f812af2b87f0e1242320eeecff216c177232a5f581959f4c276fc600"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:362-373 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:601-612 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:362\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b1abb031deba83385676fd9e83475bed2d07818f0b2e2dbea084dae6af81e0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:252-263 | ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:442-453 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4844c0143f49e7b6fd8aa6388362b0e996b4c6316b37dd3d2292ccff6d960a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift:404-415 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:401-412 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"d028d938961036c4840aa5be4219bcff3486e41468c0898d5f73c84c45abea7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/FileRepository.swift:111-122 | ExcalidrawZ/Persistence/Repository/MediaItemRepository.swift:35-46 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"62372ad3aba562fc742a8c9fbe4d06782b6a0ebfea44bc8e230cc7c68dbfc887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Settings/AISettings/AISettingsView\u002BInformation.swift:96-107 | ExcalidrawZ/SidebarTrailing/AIChat/components/AIEnableConsentSheet.swift:241-252 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Settings/AISettings/AISettingsView\u002BInformation.swift:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BInformation.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d803bc8350497a030e582e610fe146015800c0071c4c41b421ae9c5f36f964d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Sidebar/LinkedStorageSidebarSection.swift:75-86 | ExcalidrawZ/Sidebar/Local/LocalFoldersListView.swift:68-79 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/LinkedStorageSidebarSection.swift:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/LinkedStorageSidebarSection.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4891b3fdc82c1024f0d6e443e4cc80e722cc43e03e0ce1f5a8df4e43fa61c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Sidebar/SidebarFileRowSelectionState.swift:23-34 | ExcalidrawZ/Sidebar/SidebarFileRowSelectionState.swift:125-136 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/SidebarFileRowSelectionState.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8d2ecff8c215bc0940844edcc34186249f0d7dd4d429fbcbeb231b76c56051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddLabeledShapeOperation.swift:57-68 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddLabeledShapeOperation.swift:88-99 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BAddLabeledShapeOperation.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19b289fd57ddd3682fe634aee9dac8bb55f1f19d684dceb1161b40ad3614345"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:266-277 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/InsertMathTool/InsertMathTool.swift:134-145 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:266\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"12085672308d325efe274acf10c0f779a1588a55016c0a865c31d153baac45cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1443-1454 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1522-1533 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1443\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":1443}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96bb4709e393f483a6966c74f590c21e76f2b7e39ec8be9de2ca2f615f7dfc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:137-148 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:83-94 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:137\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"890d0c23265f9e922db91f05e3a9bedd911d3916d5f6ffed377fc56a0e8e459d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:416-427 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:424-435 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 61 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:416\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"947b5459686d0cbcf37a1080f70986b5aedb603784ef2a8289f28d6b0346bfc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Subscription/LLMCreditsRefreshCoordinator.swift:29-40 | ExcalidrawZ/Subscription/LLMCreditsRefreshCoordinator.swift:67-78 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Subscription/LLMCreditsRefreshCoordinator.swift:29\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/LLMCreditsRefreshCoordinator.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"538728d8539dbc41862a39a1b9f3c43ce50bb6e15c9e460e62d1494478dc2a82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/components/ColorPicker/SpectrumColorPicker.swift:142-153 | ExcalidrawZ/components/ColorPicker/SpectrumColorPicker.swift:181-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/ColorPicker/SpectrumColorPicker.swift:142\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/ColorPicker/SpectrumColorPicker.swift"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e22ad69379c10a44047181ebc7022e744bfc5ba3fe0c4f30839352718899bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 4): ExcalidrawZ/Utils/Utils.swift:353-362 | ExcalidrawZ/Utils/Utils.swift:391-400 | ExcalidrawZ/Utils/Utils.swift:434-444 | ExcalidrawZ/Utils/Utils.swift:476-485 \u2014 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 \u2014 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 \u0060ExcalidrawZ/Utils/Utils.swift:353\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3120a347c61bc151118214041b6598a4852c3a20175b0fbe3928e0284e8803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): ExcalidrawZ/Settings/SecuritySettingsView.swift:939-949 | ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift:440-450 | ExcalidrawZ/components/RecoveryKeyInputSheet.swift:177-187 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Settings/SecuritySettingsView.swift:939\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SecuritySettingsView.swift"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8903e7f3c63e95dfb1ac7277039ce1346ae66ed1f7448c289e06f78ce3fcb63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:96-106 | ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift:270-280 | ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift:105-115 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift\u0060 as WHOLE FILES: this scan already matched 4 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:96\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce77befe6ca28f7d5a5358771d2904fb5891f3fdc4b894d4d6918be1891c3ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:159-169 | ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:213-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift:159\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c76d9db3a842598aa824f74171a04a171064255ddf4662967c619acbf70c6fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:372-382 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:616-626 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:372\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a15cae66d7f0bd4aa3cc3c3401d14933a18ef01a7c263524533a0127d87593"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:18-28 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrOne.swift:21-31 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrOne.swift:18\u0060 calls \u0060move\u0060, \u0060CGPoint\u0060, \u0060addLine\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:16\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bf506184de42c2eb973405c4ebda24628f2098ef2c21013b9b1fb7668543810"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1702-1712 | ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1749-1759 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1702\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":1702}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf7728947ee5e9a06b4faa2c9cba90a0a89efb637ec9301566b0d3c30a0506b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:240-249 | ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:271-281 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift:240\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2677933eb19eeb3b9177891e47be013b911f27946e68f197696b3e4dbc3ea0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift:184-194 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift:288-298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8cdb47a13e8477f29a6b3e8a9daa654b1de1fb3953dad9f80803da0ed6053aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:126-136 | ExcalidrawZ/Store/LocalFolderState.swift:173-181 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c37fe7636f4f8955852402d95422dc1c33e5f762bcffdc51491e083baf6981e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift:56-66 | ExcalidrawZ/Sidebar/Temporary/TemporaryGroupContextMenu.swift:86-98 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift:56\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0463c02558720002fe63e9ad0f8822a633dd697ae41df1c56caeeacd40947273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/DateTimeTool.swift:21-31 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:80-89 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/DateTimeTool.swift:21\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/DateTimeTool.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1f54df25a1a4955146bfe257ee33608549800594c6e2e1ae15c25c8bd66a700"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:196-206 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:69-79 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:196\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bfe4b9e85bb673e3fdd56b072017035baa7908dc53e544e48e1675a354e936"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:99-109 | ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:140-150 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:99\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"7069ba08cc0d63eaa92678c7b96d01eaff42217d91a515331693ba7dfe18cf54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamElementResolver.swift:118-128 | ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamToolHandler.swift:183-193 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamElementResolver.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a81940b5e395681b0cd65951f55390c3401a86a6ea3c321e4197a051c11a4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:168-178 | ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:191-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:168\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"901fb2523eb1b412daeb3286d4fd797bac980714144e306385b67174c58b3d91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 13): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:104-113 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:151-160 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:302-311 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:110-119 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift:159-168 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:129-138 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:277-286 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:298-307 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:507-516 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:527-536 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:553-562 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:121-130 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:247-256 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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 \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:114\u0060 calls \u0060encodeIfPresent\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:537\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ad437c4013301d61f9e3d429edb1b917bd6e52c544389ca7576f0f7300432f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:337-346 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift:364-373 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:363-372 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:337\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3692842496b87ccf89f82898a4605486bd7ce31c8da462b97501964a572f855"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:287-296 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:309-318 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:414-423 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e8cf796ca65bea533bfa50cbb1114cd3d4f865c207b5e0a1f6b39c484ff299"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift:133-142 | ExcalidrawZ/Sidebar/Temporary/TemporaryGroupContextMenu.swift:36-45 | ExcalidrawZ/Sidebar/components/FileContextMenu.swift:405-414 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift:133\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"da85204e60275f5e8e6fed48b1fcb3fad398e5f8fd53fab2b52b34ce0f8b26b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:179-188 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:123-130 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift:197-204 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:179\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab423f70a8ae20c56c9058124460da3aba12590bb4871c26eb63fe9ae879617"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:195-204 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:598-607 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:68-77 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:195\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"956518bd78955fc5889ecb5a17c1d0a0227644c9c70194c7fa26434cee02f73c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift:324-332 | ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift:92-101 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift:324\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54c246aec40f0bfb0b705e16b91762a87e3a1b718d9ea4c5c58a78b76342324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:609-618 | ExcalidrawZ/components/NewGroupButton.swift:44-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift:609\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactBrowseRootView.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd1696836cc962f65422db3ca74cbf505103990890a74dd8302c0fdd58b4ce41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentProgrammaticSnapshotCommitter.swift:70-79 | ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift:213-222 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentProgrammaticSnapshotCommitter.swift:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentSnapshotCoordinator.swift:223\u0060 calls \u0060debug\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentProgrammaticSnapshotCommitter.swift:80\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentProgrammaticSnapshotCommitter.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ad3eee930a452c2af0c257ec4cc7f65b0023dba3da28cc78a9b6c31a16d5e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:14-23 | ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:29-38 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:14\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:13\u0060 calls \u0060padding\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift:28\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputStyles.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad35177af8ed99b96b15b13455255d2a9465f1e21ed77997ec3c706dad21b462"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BPersistence.swift:91-100 | ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:212-221 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BPersistence.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"f330a6aac350d249bbeca60f193a5a3bbf0cf1e2ddbd7f9f16be7641b93fec85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:293-302 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:288-295 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:293\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28e340078f1f5ce0387b71c280bc8a438ae63e6e307dd79942ea243ac35cb5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:305-314 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:226-235 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d5fddfb3538ba3f77b1af68a84c1a679941d9ba868dd7d4eeeaf7db9011f3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/CloudStorageFolderPicker.swift:176-185 | ExcalidrawZ/Persistence/CloudStorage/CloudStorageFolderPicker.swift:230-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/CloudStorageFolderPicker.swift:176\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060spacing\u0060 to \u006010\u0060 in one and \u006016\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageFolderPicker.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b74c30254bcb2777b9eb64d810f15433b34ab570726b0fb73dd666140ddbe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:148-156 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:263-272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:148\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac6f00181ba1f6812fd7b893b20822acf5fd833248a7893ea1dcdd1d2d3744c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:285-294 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:313-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift:285\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveDataMigrator.swift"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19af0f9ad376befde0567157cf93a6bec80958a7c27b06b33edd81608ddb1c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFolderRowView.swift:51-60 | ExcalidrawZ/Sidebar/Local/LocalFoldersView.swift:90-99 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFolderRowView.swift:51\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFolderRowView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cda809009873f834bc416b8ae30c3d8570a42c03fe63314573776738ab7b82e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift:200-209 | ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift:555-564 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift:200\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ed00a64b50652c4d0b861fc13e5df5de33dff921c75b22b8bde516cdc32852f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 11): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:105-113 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:152-160 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:303-311 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift:111-119 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift:160-168 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift:130-138 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:278-286 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:508-516 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:543-551 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift:122-130 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:248-256 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 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 \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift:102\u0060 calls \u0060encode\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:541\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca201fea109b84038ba811984b730092e045974f7925397b5420f7d418edadd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 10): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:699-707 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:709-717 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:719-727 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:729-737 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:739-747 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:749-757 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:759-767 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:769-777 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:779-787 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift:789-797 \u2014 all 10 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d2ef36c636a8b4f71c54ba92914b53427b0043873002077e7a2e092458c19b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:55-63 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:81-89 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:28-36 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BViewportHelpers.swift:134-141 \u2014 there are 4 copies across 3 file(s) \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:55\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:37\u0060 calls \u0060scheduleProgrammaticMutationCommit\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift:64\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BAICameraHelpers.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bbbe54fd33c72bc7ed912511d2b5eca10319e21eb147c766b2de3e3a42b973b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:84-92 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:96-104 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift:108-116 \u2014 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 \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BElementHelpers.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"092e6e89d95f2adbedc34de94de9814f570a8082fc0de75fdca42afc47638be0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): ExcalidrawZ/Persistence/FileStorage/FileStorageTypes.swift:123-131 | ExcalidrawZ/Persistence/FileStorage/FileStorageTypes.swift:136-144 | ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:343-351 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060ExcalidrawZ/Persistence/FileStorage/FileStorageTypes.swift:123\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/FileStorageTypes.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c71a059a708bb66499d2a2bac365843ffb86a5e295bfaaaff4461f4a67d0fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:211-219 | ExcalidrawZ/components/CloudStorageDocumentSyncIndicator.swift:95-103 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:211\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:210\u0060 calls \u0060foregroundStyle\u0060 and \u0060ExcalidrawZ/components/CloudStorageDocumentSyncIndicator.swift:94\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d13ba7738635ea06b4f4e241600146ee0ae060324c4eab2cb14a5829055626"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift:19-27 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BSkeletonHelpers.swift:23-31 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMermaidHelpers.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"294e19c2651b8c78be9e609c67bd166ae188541d1b63df3f579540874be2fd92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift:20-28 | ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_File.swift:18-26 \u2014 before extracting anything, compare \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift\u0060 and \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_File.swift\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift:20\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"f35819c028b331afad10fe14157fbb8ad31ecd68983d0261d986958e4f7b9289"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:273-281 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:270-278 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:273\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"633e02d134fcf1b50986c3203823142d16d31355737639fc8698d15a9944fbeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:57-65 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:78-86 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9a1fdb8cf5f6843b79f6862a10e8bae0c88a0d470638fe7fabf919fd4379d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:241-249 | ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:384-392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:250\u0060 calls \u0060warning\u0060 and \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:393\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a5b75b20ea9506f8dc31afe883169c8806081798d1539a953915ca53178655"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:319-327 | ExcalidrawZ/SidebarTrailing/AIChat/components/ToolCards/AIProposalToolResultCard.swift:314-322 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"9367cdc3705c0f7f0b5090ea0eaca4b40df6a2088b5b0978fcb4719af41e9e2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:59-67 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:113-121 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:59\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"3085f377bbe003b4e50bdf3ef077c70aa2ed75800a43020d7a8dec344ffa6c97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:336-344 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadCanvasImageTool.swift:128-135 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift:336\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c86b11ea5bae7b7db08a9a09e4edbb82b2ff198b1db1765b687a197c4ab3ba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:252-259 | ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:328-336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift:252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c03d1c229a7a1f4351fe54bfe6307601b6054feaf9f3ef6db422b39766628b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/ErrorMessageRow.swift:53-61 | ExcalidrawZ/SidebarTrailing/AIChat/components/PendingQueueView.swift:79-87 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/ErrorMessageRow.swift:53\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/ErrorMessageRow.swift:63\u0060 calls \u0060RoundedRectangle\u0060, \u0060stroke\u0060, \u0060opacity\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/PendingQueueView.swift:88\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/ErrorMessageRow.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a67c99ec5a968544c60cd12b64bca907196c656317d659fd11d19446a23ca1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:129-137 | ExcalidrawZ/Utils/Migration/MigrateToNewVersion.swift:122-131 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/components/SwitchAppStoreVersionView.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"344e2452b22538599f08fa551434e4c339633492566fd6fccd2c35297b590e9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPElementSanitizer.swift:117-125 | ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPElementSanitizer.swift:136-144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPElementSanitizer.swift:117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPElementSanitizer.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c9a39e7bb5409ce25e711391d269f6eb3bd586b6528911b441aca6d3ef3f713"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:304-311 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:331-338 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:225-232 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:304\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:312\u0060 calls \u0060setValue\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:339\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"df34428950eb760f3fa3a8a01e6c2efbd5fee55b477270ec06a58b79c2ee786a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/CompactRows.swift:93-100 | ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/ErrorMessageRow.swift:52-59 | ExcalidrawZ/SidebarTrailing/AIChat/components/PendingQueueView.swift:78-85 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/CompactRows.swift:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/CompactRows.swift:102\u0060 calls \u0060RoundedRectangle\u0060, \u0060stroke\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/PendingQueueView.swift:86\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/CompactRows.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dc2c8b43992128a77b3190c08ed7ab198f4c28fff6eec758fd2c63dd3120a4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift:10-19 | ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_File.swift:10-17 \u2014 before extracting anything, compare \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift\u0060 and \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_File.swift\u0060 as WHOLE FILES: 100% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/NativeRenderer/ExcalidrawImageRenderer_CoreData.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"11412ddac4bc751731e1b15c4b1a17aecc3980450dd7c4da67fdca5795d246ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:184-191 | ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:321-328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:184\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec50ca685d7c1b9413370ff440b0379e818805ed79f9de68c57efb396ebf82dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:484-491 | ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:543-550 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:484\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u0060spacing\u0060 to \u006016\u0060 in one and \u006020\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ff22c27b5a4ad52a486ed9a8607b4286b7a36cb96187b205e4e35d910ffff6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:11-18 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrOne.swift:11-18 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrOne.swift:21\u0060 calls \u0060move\u0060, \u0060CGPoint\u0060, \u0060addLine\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:21\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"65684c405bc837dd7a89842b4986d7d1ae41c709261789aafad99390f95e7017"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1137-1144 | ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1164-1171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":1137}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bda0ebd85a0ae4d0137ca220d056e68a807e7c217ce1816cb1c1795af02ca0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:180-187 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:216-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift:180\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphClient.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a773b568907ff0918e8f1560af7b610fd5b21c9d3981ddfc3325a7a5419af1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:391-398 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:405-412 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:391\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ed66edd10be9c9051eb25fd36eba3cef85c8fda4eaaed9622d316a77432509"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:145-152 | ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:166-173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"67c93b97895bd1404329dbd0073849b531a571ae63d285ae804d0570a5c87938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:136-143 | ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:679-684 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift:136\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa1c793e1b1d6afa7506c4e83cd8fb3a03c67d75b5ed6aa3a2041bf02e47791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Sidebar/GroupsView.swift:239-246 | ExcalidrawZ/Sidebar/Local/LocalFoldersView.swift:201-208 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/GroupsView.swift:239\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupsView.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dea01af718904cf88826ae75b7a7b9e8f5ae1f094e0be3d52733f58493b39e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:309-318 | ExcalidrawZ/Sidebar/components/FileContextMenu.swift:301-308 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:309\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4449083c44e96a243847e2526f66eab1c4ac25bde827683daec508c19a147e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:309-316 | ExcalidrawZ/SidebarTrailing/AIChat/components/ToolCards/AIProposalToolResultCard.swift:304-311 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"33a2fca1f2109fbe1b3ba6126de2c213e12099223432b76e6657ba18e117eb55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20138 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/Tools/CalculatorTool.swift:34-41 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/DateTimeTool.swift:43-50 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/FinalAnswerTool.swift:33-36 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/FinalAnswerTool.swift:33\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/CalculatorTool.swift:34\u0060 calls \u0060ensureAIEnabled\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/FinalAnswerTool.swift:33\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/CalculatorTool.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"104fa9b2a88b4c4b1af644b94810a63ce24d45b2f3854691116ec08b680440cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:74-81 | ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift:91-98 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift\u0060 as WHOLE FILES: this scan already matched 4 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:74\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d69562d411d2763b0b53c76d0f39e2f29173ea24e67e2eb92621577d879f2608"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Store/FileState\u002BAIChatSession.swift:391-398 | ExcalidrawZ/Store/FileState\u002BAIChatSession.swift:439-446 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState\u002BAIChatSession.swift"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaec3f2ed11e66af4911879d949b19bc52fb9e67a19955d0eb37b4dbd4b9e5c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:82-89 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:68-75 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:82\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21a76e6dac72b794050e0fa545a23191a3bac77986b98cc8c2c954f452573fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:151-158 | ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:197-204 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:151\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f1ce025316f8e4a3353f7d389a58cedf470da5bfed4b52878d3607559ebf20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/components/styles/AIAppearancePalette.swift:66-73 | ExcalidrawZ/components/styles/AIAppearancePalette.swift:85-92 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/styles/AIAppearancePalette.swift:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/styles/AIAppearancePalette.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"d186a15626f932e0742f03c4c74580309f4bc66231888869e2abf52091d38730"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:442-448 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:458-464 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:491-497 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift:442\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"834bb3a97fca8ccdaabf2f38bf3304e29991f51e0bfe1db8c5e08fe93bb7a20b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:287-293 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:338-344 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:390-396 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"622ddca53d24ae9312ada54f4e273fa5177f850020b04eb588c8cc71492c0b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:125-131 | ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift:296-302 | ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift:133-139 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift\u0060 as WHOLE FILES: this scan already matched 4 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. 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift:129\u0060 calls \u0060joined\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift:292\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af8c3d0a07a8e85746401336bcace6bd2300027b354aac856a25ae334477379"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift:586-592 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift:614-620 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd27e862c326a74c218ac7fbd54f914c14bef5972ae150a88863a7983b4be4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:580-586 | ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift:598-604 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/PDFInsertSheet.swift"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f148a632502e610b09cdd03fe595ca3e22fe6465da8a79c57f8bb100cb4cf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Viewer/ViewerMirrorSession.swift:64-70 | ExcalidrawZ/ExcalidrawView/Viewer/ViewerMirrorSession.swift:88-94 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Viewer/ViewerMirrorSession.swift:64\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerMirrorSession.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1034b7b50e905d69f4cba10cab8c2b03d489836a2d591f59fc547d4118e1dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:772-778 | ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:781-787 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3a199be81884a6c6088b7ca17e3fc22ad399e865751a699718bd38b073fa731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:966-972 | ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift:1078-1084 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa09a572e0e18e2c15de829d2ca64a109c6dd8daf3b1e6eeba964f84494ba43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxConfiguration.swift:18-24 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveConfiguration.swift:20-26 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxConfiguration.swift:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxConfiguration.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"248c0ed58bc23348f34fb6d5deaae8ac6b649c6be3537ce0e91ee428b60e1f7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:295-301 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:390-396 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd76837d6dabe599027d3e014b949c32b6df3ef17ccdb76c36a147ace855f506"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:345-351 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift:366-372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"9037235174cb6881a9f46f98f4bb29bd2e1c97d82b549211e4ef1284379fdc5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:398-405 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:515-521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:398\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0845127cd95e8e0ba37c00ca7da2d18298e6c01c350fc29770dedb3cea07bca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1072-1078 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1081-1087 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":1072}}}],"partialFingerprints":{"codehealthFindingId/v1":"6141666455e124b1e572c89d956dffddaba7e57a8bd2df6cc5697195248f4c3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/AIChatAttachmentMenu.swift:50-56 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/AIChatAttachmentMenu.swift:73-79 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/AIChatAttachmentMenu.swift:50\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/AIChatAttachmentMenu.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cb0c83ffeacaf4bb80c478824678338814b50244aaa6a36e039bbc520d65885"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Utils/Utils.swift:442-448 | ExcalidrawZ/Utils/Utils.swift:530-536 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/Utils.swift:442\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"4723a100862e01e0498887eee793c047c620abd1f4da968311dad6a53db00885"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:98-104 | ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:174-181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:98\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a8ded0db55f707713325a3101395d237a777ba9fd1966806b2e5ea305cddac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:111-117 | ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:129-136 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift:111\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/FlexibleSplitView/FlexibleSplitLayout.swift"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aaf8bc9b922befd57f0fee1bf40d44853b016d05b80abb90a66332e583955d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:128-135 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:207-213 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:291-296 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:342-347 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:394-399 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:660-665 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:128\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70e45e062c3236de1f6a77d0db13fec878e519338cae5eb4b984d7cdace8865"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 6): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:273-278 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:311-314 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:324-329 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:363-366 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:376-381 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:421-424 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:273\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:424\u0060 calls \u0060CGPoint\u0060, \u0060addLine\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:278\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ba2b6932417a90a5f047b4de42fcdbdf636d9718cc96f66486ce57c032c864"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:590-595 | ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:772-777 | ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift:781-786 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"a14dc2141925754b6954c0d0fe4116c87e5f4afb0d91a95a1e32733b62688d56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift:423-428 | ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift:450-455 | ExcalidrawZ/Persistence/Repository/FileRepository.swift:305-310 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"be448da558af3b135f47797bd34f6f790908f4508f6c0f631d832b747315efb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWelcomeView.swift:72-77 | ExcalidrawZ/SidebarTrailing/Presentation/PresentationWelcomeView.swift:52-57 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWelcomeView.swift:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u0060spacing\u0060 to \u006016\u0060 in one and \u006014\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWelcomeView.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7df897fa373b97711e7c495b6d86010e03233d2e2d45200b816d0ab455c136"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 6): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:222-225 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:227-232 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:234-239 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:240-242 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:244-246 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:247-249 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:222\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:227\u0060 calls \u0060CGPoint\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:240\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff0d5a1fbfdbadad2f34f69479cb8208788b682c7af759d3bd8f0a164a9924e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:66-73 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:160-165 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:66\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d3e0f95aaab75f81f0c73f43e7b83bf72e02a612666fefd314074f0058a89e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:125-130 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:258-263 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:125\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff9a2904fe1be4f533664065d47d3d4f416cc033bb87e01a07aaa5fc4bfa695c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:92-98 | ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:148-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:92\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"114114e66342927c6781f98363d31f52d3b7b668d04408ac3b9e5518dda8db7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:434-439 | ExcalidrawZ/Store/FileState.swift:1707-1712 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:434\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"213f12767cc7d529a77814c365a30f9c14954ce95e6d04f8551bf50954ade42b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:236-241 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift:291-296 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"5856c650af467f5e03b0ad48eafcd597a790b281c57585e7fec2cbfb5d99be2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView\u002BDiagnostics.swift:75-80 | ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView.swift:364-369 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView\u002BDiagnostics.swift:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/DebugPanel/DebugPanelView\u002BDiagnostics.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"3784dbd76e6e7e86991143e9b5b8cc24f4137ca66edd5b805edeac2b727e4764"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Utils/FileSyncCoordinator/OpenInPlaceDocumentSession.swift:83-88 | ExcalidrawZ/Utils/FileSyncCoordinator/OpenInPlaceDocumentSession.swift:99-104 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Utils/FileSyncCoordinator/OpenInPlaceDocumentSession.swift:83\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/FileSyncCoordinator/OpenInPlaceDocumentSession.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3d877943745135756479aa996a32850d7ef78925d410ac9fe7d1ee20a0980cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 16): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadBar.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityExactlyOne.swift:11-16 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:30-31 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootMany.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOne.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOneOrMany.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOneOrMany.swift:20-21 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadDiamond.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadNone.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangle.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangleOutline.swift:11-15 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:140-144 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:150-151 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:161-165 | ExcalidrawZ/Store/ToolState.swift:589-593 \u2014 before extracting anything, compare \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadBar.swift\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOne.swift\u0060 as WHOLE FILES: 84% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCardinalityZeroOrMany.swift:31\u0060 calls \u0060addLine\u0060, \u0060CGPoint\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:144\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6b9574fa0234ae6fdd84ad510b889b124df4218a4096a28bf4778b8231bafc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:176-180 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:176-180 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:120-124 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RenameFileTool.swift:102-106 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift:194-198 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift:176\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5a6ca4a6f46464ba932ebf2c09a830fc6d0a4963b8ce229cea1b3473bcaf95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:239-243 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift:280-284 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:325-329 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:239\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba0230cf78e0d01ad5c88f8cf07d4a66ba2fe55588653c12c632166e81d1e456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): ExcalidrawZ/Utils/ArchiveFilesModifier.swift:147-151 | ExcalidrawZ/Utils/ArchiveFilesModifier.swift:344-348 | ExcalidrawZ/Utils/ArchiveFilesModifier.swift:495-499 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0792c983af35fe7e79cc597f36354b072016973cdc2a289b927721564a7e56f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 17): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:22-23 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadCowsFootOneOrMany.swift:18-19 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadDiamond.swift:19-23 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangle.swift:18-19 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangleOutline.swift:18-22 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:148-149 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:200-202 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:225-226 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:228-229 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:234-235 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:238-240 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:268-270 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:272-274 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:331-332 | ExcalidrawZ/Sidebar/components/FileRowLabel.swift:397-398 | ExcalidrawZ/Store/ToolState.swift:594-595 | ExcalidrawZ/Store/ToolState.swift:596-598 \u2014 there are 17 copies across 7 file(s) \u2014 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 17 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadDiamond.swift:19\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadTriangle.swift:20\u0060 calls \u0060addLine\u0060, \u0060CGPoint\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift:24\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ArrowheadsIcon/ArrowheadArrow.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd338f7de29d76264ed21bd1b0da70fb0bd2bba53e2d165c1cca3db1d6f609ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 6): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:30-31 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:34-35 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:38-42 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:64-65 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:68-69 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:72-76 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:30\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"87df8d27014fc42158008de2016d7fd694be5bc74fce7a1db4d2452e308da27f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:145-147 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:153-157 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:168-172 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:153\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:152\u0060 calls \u0060addLine\u0060, \u0060CGPoint\u0060 and \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:145\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"f94484b7c53885c63d6e5205b54390cc7d1f965ea28b3d293de66398fac90686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxConfiguration.swift:25-29 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveConfiguration.swift:25-29 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxConfiguration.swift:25\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveConfiguration.swift:30\u0060 calls \u0060callbackScheme\u0060, \u0060URL\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxConfiguration.swift:30\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxConfiguration.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fad73e114f858fdd38b1090f1e88ec1556748fe7c9d68f076e88f83a9e43ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:270-274 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:374-378 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 100 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 \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:270\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f14ee787584de11a44eaf9e5b4ba994154ec7f2c1f560ce3647e73e57113bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:110-114 | ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:164-168 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift:110\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/1_ExtractMediaItems.swift"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"406fdf119875f5e1ac0b239adb7f634cdf7a91af6c79b42d4b8aa2ec69365c07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:136-140 | ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:251-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift:136\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 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\u0027 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 \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/2_MoveContentToICloudDrive.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a3e21e52b00896b376ede6efe959cfb3c9bf36b37f77d5ae777adfb00c097f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/PersistenceController.swift:243-247 | ExcalidrawZ/Persistence/PersistenceController.swift:249-253 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/PersistenceController.swift"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"58af79a8179dcb1debc59a3e409ccf07d5ec4396f56aae696666bba89693db78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Persistence/PersistenceController.swift:263-267 | ExcalidrawZ/Persistence/PersistenceController.swift:269-273 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/PersistenceController.swift"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"29173dd45b5371faa3cb74eadf9ce56a96d292a12e15acf787ac3d536858cf73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift:357-361 | ExcalidrawZ/Sidebar/components/GroupContextMenu.swift:543-547 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift:357\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFolderContextMenu.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"599bb92cf9e519f708c491abaf9b3c756a9491185d93535365053815be28b48c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1050-1054 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift:1058-1062 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"53aa0cda2af17065a280d98bc161de8d3cb43773a8534ae3687cf0d4bd36128b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:116-120 | ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift:125-129 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift\u0060 as WHOLE FILES: this scan already matched 4 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift:116\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa000dad90dffddb053409605865af3a97adee5314acceab335af80ac1cb663"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:451-458 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift:408-412 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 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 \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:451\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"465b0960f9329fad2e6416e5ad746e5583f03a2890ae685244279d7591d5cc47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:238-258 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:330-350 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 118 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c0d227118bc39a1d4babeb2d6d1721f3c392be46263d216b4284993d5d28fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift:307-314 | ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift:143-150 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"180cc2476afefec84953368db0d1a9a882b6110df90a6294c5f55cec01061043"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/CollaborationHome/CollaborationRoomsList.swift:64-75 | ExcalidrawZ/Sidebar/Collaboration/CollaborationFileRow.swift:40-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CollaborationHome/CollaborationRoomsList.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d0a4c0d51e5b96aebb580c174b4ab876289023aac251be9a22b27552da03af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/Components/HomeTipsSection.swift:192-200 | ExcalidrawZ/components/WhatsNew/WhatsNewSheetView.swift:538-546 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/Components/HomeTipsSection.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed6e01799f8884113fcfb2efa614cee3cfe7b43d443b9c33913bd54254e843c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ContentView\u002B/Detail/Home/FileHomeGridContainer.swift:57-66 | ExcalidrawZ/Sidebar/components/SidebarScrollHoverModifier.swift:56-64 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/FileHomeGridContainer.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"118a9248211871bb365bd300e6386de134bbf3eb57f1b1f7e8b48f8ac878b683"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:247-256 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:158-167 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f14f0dfb9be979c28735e221018c649d4b723aa9d3c1835f1d2053b138f2883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:259-267 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:170-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"7459a885a5f29fbf578137d9c79fb22487f331e1c22de05423c3f304295d60aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:310-318 | ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift:228-236 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift:310\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Collaboration/CollaborationEditor.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"0185ac132a105b30db717cbf63a7f870921aec912ac94903a795d25ec9ca0e4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift:400-410 | ExcalidrawZ/Settings/SecuritySettingsView.swift:414-424 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4c3c2006805ad0a6cf5540d14494be5663d2bf03ca60c68339a8dc626d3bd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BNativeEyeDropper.swift:226-239 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveMSALAuthenticator.swift:239-252 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BNativeEyeDropper.swift"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e691b836b76090f9b4b2a41eae72f395eecf499efadc12e9c5c98c8a939ec167"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:412-419 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:658-665 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"21162eaa3e16826c34e274b3e886c217d3efe1114de5dcfdc401465be71bbeb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:529-537 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:718-726 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff98d075b111bbe5bfdea9148def8edadf4fc526474998d56b5423072f8485b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:539-546 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift:728-735 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e33c4cedf69d2c52f37e04fda80a8eda8312124d050cdf4acbefe6b215fac0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift:803-809 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/AIChatAttachmentMenu.swift:240-246 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"401d884ec97c9dbb1b05066f5c0a0607d902c2abb60c8b45f0eeed95b0a5f41f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageProvider.swift:26-33 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageProvider.swift:21-28 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060authenticator\u0060 to \u0060any BoxAuthenticating\u0060 in one and \u0060any OneDriveAuthenticating\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageProvider.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e4a59acd600588186eddf7b16f2c5422bc514f691e4f225991b922e4663a264"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageSession.swift:71-76 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:69-74 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageSession.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a39b7af6d807fcc8c0f10a13e7a286aa624a76b79654d65438757a7417feb32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift:102-107 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:96-101 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:102-107 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:115-120 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e30bb381787851c5c4a305acd772916cc80b07ec6ae64800e0df107df9ad55a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCloudStorageProvider.swift:28-36 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageProvider.swift:40-48 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCloudStorageProvider.swift:24-32 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060authenticator\u0060 to \u0060any DropboxAuthenticating\u0060 in one and \u0060any GoogleDriveAuthenticating\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCloudStorageProvider.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"39bfab200a2013b4a3d575fab4e79fbf6dd4081895980eaf4f55b78a98dee1fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:103-107 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:109-113 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:122-126 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4f9bd6ab4c3530ee04641e657448ab6e48d4a37563e8910f3fa961888312eaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:109-119 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:115-124 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:128-137 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 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. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"6256cc5f7ecfe1ddfd8158e817e4db7509e4cbb36bc68d732ed630d3463a5336"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift:121-125 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift:126-130 | ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift:139-143 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 74 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe268cfaefb0061ea259751392b14cffb95bccb0fbb1da47d9decceaf3d1a9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift:221-227 | ExcalidrawZ/Persistence/Encryption/LockedContentUnlockSupport.swift:381-387 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"223feccfeb88537832052c6f6a01a39abfb32572576d995fed5f5ab0e2827355"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Settings/MediaSettings/MediaCleanupSheet.swift:577-582 | ExcalidrawZ/Settings/MediaSettings/MediaSettingsDestinationView.swift:38-43 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/MediaSettings/MediaCleanupSheet.swift"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"95994df6ce79dcd6cbf577bb7c883fce40bfe689841dbd9c3062d5321b6749a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Settings/SecuritySettingsView.swift:685-691 | ExcalidrawZ/components/RecoveryKeyInputSheet.swift:157-163 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SecuritySettingsView.swift"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"172452d408c216cf2f22a9745a5f6ecd31cd29c855b8f7a7b5ce90d5a5f31eb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): ExcalidrawZ/Settings/SecuritySettingsView.swift:928-936 | ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift:429-437 | ExcalidrawZ/SidebarTrailing/AIChat/components/AIEnableConsentSheet.swift:202-210 | ExcalidrawZ/components/RecoveryKeyInputSheet.swift:166-174 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060ExcalidrawZ/Settings/SecuritySettingsView.swift:928\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u0060spacing\u0060 to \u006010\u0060 in one and \u00605\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SecuritySettingsView.swift"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"5231bda07e04ad49b21c6be3e6bc6cfd98b1558e827da987c830a06acdc44bb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/Settings/SettingsViewModifier.swift:69-78 | ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift:257-266 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Settings/SettingsViewModifier.swift:69\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SettingsViewModifier.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a2933317924d3c90a7054b6487ec5d4d605e7f27ed8a0b269ac8a4228543dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): ExcalidrawZ/Sidebar/components/MissingFileMenu.swift:387-400 | ExcalidrawZ/components/PDFViewer/PDFViewerSheet.swift:80-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060ExcalidrawZ/Sidebar/components/MissingFileMenu.swift:387\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MissingFileMenu.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"6969155acbc2acca6b507608983bfbe612b62db8bf07dfd5ea0c1cb60f0887ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/Tools/CalculatorTool.swift:21-31 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/FinalAnswerTool.swift:21-31 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/WebFetchTool.swift:20-30 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/CalculatorTool.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8346a6a3b4e30163ca4c868879045ce98877ad33e183ebca568608672ada28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift:158-164 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift:105-111 \u2014 before extracting anything, compare \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 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 \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba967a07af3f354e0320f638b70e0b2d139ac8301a718179a31859f2e3dcae3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift:141-146 | ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView.swift:289-294 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54eab1f551eb283929f10e9040d9f738c35ed38459c8c8273e4ef9de40816c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:323-330 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:725-732 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:289-296 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"c90e53777ce62b6ecb448d91804350983b1d299c2e6c66a39a3d844911dc4fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:390-397 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift:734-741 | ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift:349-356 \u2014 there are 3 copies across 2 file(s) \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d188513becc25e3e6bb1f097be84d9c7d3988d9fdacbe4574556cfe1431fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/Library/LibraryItemView.swift:181-190 | ExcalidrawZ/SidebarTrailing/Presentation/PresentationInspectorContent.swift:58-67 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryItemView.swift"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e20acf94fec13e1d685665bf4d94bb49ad466f048f4641a8bc8f9dd5704ba6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/Presentation/PresentationSlideList.swift:176-183 | ExcalidrawZ/SidebarTrailing/Presentation/PresentationStage.swift:125-132 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/PresentationSlideList.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece52b271544efffd2a663bfae0301e5f2c3fc55adced957943722973507f4bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:64-80 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:50-66 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"4978998584f19228bfd524a586591fe42c8edf02e077dd1762a87fb52afb5473"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:107-117 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:93-103 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"7491b952bb67cd5d147b98c5c407b5af34f8ed62bf899f1ad5112fc2753bc357"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:135-143 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:130-138 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2a3f060e6d52d9c5da8951484f7fa50ccbabfc7577781e8e00ab30df38bc3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:326-331 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:320-325 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5e9241dff2bcec6d7ce7d81d7d52c7e10ca759cdcf278914df50a1ba5ee23b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:333-338 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:327-332 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"d258b20d356ab80211923852d37c352461343f7b7ebc3756478b75d60202ab2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift:340-345 | ExcalidrawZ/Utils/MathRendering/MathFunctionPlotWebRenderer.swift:334-339 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MathRendering/LatexMathWebRenderer.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f23b4102b43ecbfb70714e60d843b2a24a7c9f5794296f8384d511c3e7a57c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/components/Button\u002B/ToolbarCloseButton.swift:13-19 | ExcalidrawZ/components/Button\u002B/ToolbarDismissButton.swift:14-20 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/Button\u002B/ToolbarCloseButton.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"b29b2cae63c5c4e0d62d90b558fc2f7dffdca0ed341e4ed1848a5fe6fccc846f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift:173-182 | ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift:46-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"158c1851890bc3ca9129bdde0774981cc9bfdc640743c844f38c7ad10c667d5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/MediaItemSyncModifier.swift:36-53 | ExcalidrawZ/Persistence/FileStorage/FileStorageManager.swift:170-187 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/MediaItemSyncModifier.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"af472c0eb4b8242af60def8c7764324db92ed08cfc0e2a12bddfc6434e29e809"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/MediaItemSyncModifier.swift:89-95 | ExcalidrawZ/Persistence/FileStorage/FileStorageManager.swift:224-230 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/MediaItemSyncModifier.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"26f79ba69198852bb298bfc683d370e6dc882f1f3836dfc8a797819ce6aa7bbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift:277-282 | ExcalidrawZ/Settings/AISettings/AISettingsView\u002BLoading.swift:13-20 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputSheetView\u002BWorkspace.swift"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b77e0dc62f4c97588f147ece8f0ccf1c599352c2c2e38bc4bdd218c1fdd31ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift:22-32 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift:19-29 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveAPIClient.swift:23-33 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxAPIClient.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fae2eb535e5d0cb384e4db9afa5007d857c8db4c184e7d651d20965855b302d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageSession.swift:21-34 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCloudStorageSession.swift:20-33 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:19-32 \u2014 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 \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCloudStorageSession.swift:17\u0060 calls \u0060DropboxItemPathIndex\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:18\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageSession.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a62b9ba14baeedb198969d337a932c2e8e7fb76dcac6e600b9e144f448ed5db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:25-33 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:27-35 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:27-35 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060configuration\u0060 to \u0060BoxConfiguration\u0060 in one and \u0060DropboxConfiguration\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:39\u0060 calls \u0060filter\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:37\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"22071afca2f8f1634d4c9a12bb70aa3d580023acf59d4e42503b5d23883f6f99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift:207-213 | ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift:230-236 | ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveOAuthAuthenticator.swift:322-328 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b97c2018eda74db20a4524c9a29ec3b5f4d5aa28c171f4139c3efe706a1e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:76-88 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift:57-69 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0d6c7964b8c4b3fc743a091c20013e72a49f6bd1cd90a69795c73bef52a1e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:90-100 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift:71-81 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6787ae1c157f37ef8bb0274f8a03f4e34e445788408e9078ce2a69d56ad9c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:102-107 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift:83-88 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c2343b6d4f8b3a75f31ced0d1c4587ebd9e7880c743d48de317efbd9a277b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift:109-115 | ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift:90-100 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift\u0060 and \u0060ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageSession.swift\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCloudStorageSession.swift"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"32f6961be367dab4ef1f106d256786a91e169369f4383b9be72fd39209e3ad04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift:114-120 | ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift:415-421 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d0c7bc6c2979f5dfb3aece5b71bf02c2ce9c7a8ddaaf1d8de85eb3071b436d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift:122-127 | ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift:423-428 \u2014 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 \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7502f46aaa180b31e0472c1409a8b8e281e1f9bf2f2285500df7d2e8958d5135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:39-47 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift:86-94 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"011fe862b95f21a08b5fe9445214e9bad0a722e7364be8400e7c34c3aa01756c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift:361-366 | ExcalidrawZ/Persistence/iCloudDrive/iCloudDriveFileManager.swift:505-510 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/LocalStorageManager.swift"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d9545031a7c6295a271be80c8f7a327bb46f17fc7e5f46241bfe2209a61dd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:46-54 | ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift:206-214 | ExcalidrawZ/Sidebar/Temporary/TemporaryFileMenu.swift:101-109 | ExcalidrawZ/Sidebar/components/FileContextMenu.swift:57-65 | ExcalidrawZ/Sidebar/components/FileContextMenu.swift:231-239 \u2014 there are 5 copies across 3 file(s) \u2014 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 5 sites; resolving a subset leaves the remainder to drift apart. 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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060file\u0060 to \u0060file\u0060 in one and \u0060File?\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFileContextMenu.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"40f1c048f18c1d96ab51082a89f535f69645e84803972675d896cd78302b7338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/CanvasSettings/CanvasSettingsInspectorContent.swift:54-70 | ExcalidrawZ/SidebarTrailing/Search/SearchInspectorContent.swift:78-94 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/CanvasSettings/CanvasSettingsInspectorContent.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"942edc836a04a6c111372bc58284ead823424654354cba3b9fb3f693fb00315f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift:329-333 | ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift:360-364 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift:329\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"255df1b71517a85beb9462c2fc752f59b38e26299d43d5c2bbeb297be52140af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:265-269 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:306-310 | ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:358-362 \u2014 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 \u2014 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 \u0060ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift:265\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/DrawingSettingsIcons.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd03d980df689061a66abb51017b1891240b323dc78d81e685eafd9d2672ebf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift:87-112 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:438-463 | ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:179-204 \u2014 before extracting anything, compare \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 113 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 \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift:178\u0060 calls \u0060decode\u0060 and \u0060ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift:437\u0060 does not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c24d8be68990db86552d13e195e47528ce58a1d04724f49a2b6ed958948b9ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BResizeOperation.swift:38-43 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BResizeOperation.swift:46-51 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 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 \u0060item\u0060 to \u0060\u0026item.updated) return .generic(item) case .linear(var\u0060 in one and \u0060\u0026item.updated) return .linear(item) case .arrow(var\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BResizeOperation.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"2590512b5bf93fa00618f85492de6c3631da207caff12a2796b5cf2934e13192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:260-264 | ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift:318-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool\u002BUpdateOperation.swift"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"0871fdf2f8d124a6d6b7714707cd43c26304f7e5bb54967076aa39d2e72d53f0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AIConversationRepository (LCOM4 17): AIConversationRepository\u0027s methods fall into 17 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 17 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"8996b2cc31c2f270073cb0221ff77379f104f407bd6b4da361b956fe4ddc53a0"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ExcalidrawCore (LCOM4 9): ExcalidrawCore\u0027s methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a6277c7f184782b9e401822dd149e2f0dc1ae910a3c1c25b853eeecb76fcd8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PersistenceController (LCOM4 8): PersistenceController\u0027s methods fall into 8 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/PersistenceController.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e2fac16aa5c0347c5029a2c5fcfceac119a0d923a24846aaf71f886419a578"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AIChatState (LCOM4 6): AIChatState\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7661f2f2ee76e54e215ef90e2d2f1b049ea4c7616590c333f6c875843912e95"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ScreenAnnotationSession (LCOM4 6): ScreenAnnotationSession\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c543e1e699bb32d7196db0fc3f23945070fd6c8927880735deb37153f9b46c"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ExcalidrawMCPAppBridge (LCOM4 6): ExcalidrawMCPAppBridge\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc26bdcc1811f7c4dad5dddd0e570b381d7a43759245400bc35c78b59ddb4ab"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AppDelegate (LCOM4 5): AppDelegate\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/AppDelegate.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aca859d5fc6159b001ce8a8b86721e66ff7a143c5ad657932985b1e72d95fe2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AIChatPreferences (LCOM4 5): AIChatPreferences\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatPreferences.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c263d29c7476801cbc70fb5490531cc68e94aad546a43881b51cadd592befa"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: FileState (LCOM4 5): FileState\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b802124deef2d9ae4e5c26937470000d8f0f413ae4184d2c3fe5cc729af81f"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ExcalidrawIndirectScrollForwarder (LCOM4 5): ExcalidrawIndirectScrollForwarder\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f0184217bfa6c247787a0bf064340ac66427d2b4256f71b9419c7c366731bb"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: JSONValue (LCOM4 5): JSONValue\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMathImageTypes.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9d19ddccb4b5eb54f4961202056ccaf9469849b5d1b10d3c3f2d45d2b669552"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: LockedContentUnlockSession (LCOM4 4): LockedContentUnlockSession\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/LockedContentUnlockSession.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"3868d3737c9fdd6e7527ba14bb601a338224bd9a134549700ad0f08c79f6ca30"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CursorHostingView (LCOM4 4): CursorHostingView\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/CursorHoverView/CursorHoverView.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"46a2b608159c2f3d1df18383d5d050fb61dc2fce220afec58aedd52bb0a07701"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Coordinator (LCOM4 4): Coordinator\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c380f69825160c24274bdb5171dab23e184df67528719f7553385a633a5ff99"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: NSImage (LCOM4 4): NSImage\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/NSImage\u002BExtension.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"97932e3cd4e2c94399c1899f583576e64219b76d005f49713a7466c431f1f6f4"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: File (LCOM4 4): File\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/File\u002BPersistence.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"223fdf91d04644bcaccadd327fca936394b9c5a2ca83d924a2a6702a68859af2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: LocalFolder (LCOM4 4): LocalFolder\u0027s 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 \u2014 your repository\u0027s 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 \u2014 and which would otherwise dominate this list \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/LocalFolder\u002BPersistence.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0aca2899f8bcbdcca7a75cd7e5bec9a4bc27bd59278ac69720af6ca21994414"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPerformanceOfEncoding: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZTests/ExcalidrawFileTests.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"4628c98f5933a968730823db77416742c1b9ea09ea86b13521e782f409c61b70"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPerformanceBatchCreateFiles: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZTests/PersistenceTests.swift"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aecb0e44cf4c657a4ac58e42493b35d536dd445af66596eba0b9a4d46356174"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testPerformanceFetchManyFiles: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZTests/PersistenceTests.swift"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"828cadbead007293c8f6362de02e9da715ac38a61c983886e6b5350e57bdc9e0"}},{"ruleId":"D10","level":"error","message":{"text":"Assertions commented out: testExample: The test body contains commented-out assertion calls and no live one \u2014 it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZUITests/ExcalidrawZUITests.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d84eae6f87e24b3950239448af8e38012ec74e0e28e07ac7c45cd5db535942e"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testLaunchPerformance: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZUITests/ExcalidrawZUITests.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf354d52363dc35d2a7220485f7ce2aa73418f7dc7e12f97c017cb30549f802"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testLaunch: This method\u0027s body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure* \u2014 so verification routed through a helper of your own naming, through a base-class or callback object whose members hold the assertions, or through a harness that fails by throwing under some other name, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZUITests/ExcalidrawZUITestsLaunchTests.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"421a2549310c1c9d377268c59bbbc593de0bbb3813cbf1fdde6353290ef80389"}},{"ruleId":"D10","level":"error","message":{"text":"Test project verifies nothing: ExcalidrawZUITests: No conventional assertion call was detected in 3 of 3 tests in \u0060ExcalidrawZUITests\u0060 \u2014 the project as a whole, not one method. 1 of them has its assertions commented out, so this suite did verify conventionally and was switched off \u2014 it is not an approval/verifier harness."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZUITests/ExcalidrawZUITests.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f2f55b42e01fa7a243b384db4c57617a7693548bb6302525830541fb69b759"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: alerttoast: Dependency \u0060alerttoast\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060master\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44273290c7c5feab8addb80eefd66e360a26cf4eee19718eaab5feef599b8cd8"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: chocofordkit: Dependency \u0060chocofordkit\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f37384d785290c905c4146ed5240a583b2fb1033954fc3409db5426495c8d576"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: llmcore: Dependency \u0060llmcore\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"030cede7ac3b0825ade00d5da319055c1adab1539dabd7fabfcf5f74d26cfbe7"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: llmkit: Dependency \u0060llmkit\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060dev\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b4788bf24df482bdc47543a4da6d86dd9a3ab59b60109c0dc999f07cf3e9cc26"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: openai: Dependency \u0060openai\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060main\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"77447d0ea1e9d6180eb39d6d7c652bd0407b639f7af0224440c22f7071a9c899"}},{"ruleId":"D12","level":"warning","message":{"text":"Floating branch dependency: swiftyalert: Dependency \u0060swiftyalert\u0060 is resolved in ExcalidrawZ.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved against branch \u0060dev\u0060 rather than a released version \u2014 the project pins no immutable point, so resolving the packages again moves this dependency to whatever that branch holds at the time. Change the dependency rule in Xcode to a version requirement, or to an exact commit."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f70d752df42d34683749e1611a8313e04637aa3276c5f22a20db97fd6873bf21"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/Store/FileState.swift: ExcalidrawZ/Store/FileState.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in FileState.performActiveFileChange at line 669. 1 of those changes was a fix/bug commit, and the other 9 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/Store/FileState.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6ed5eed040ebd82fb0ee5d659b766c5078ea95d8de7a383b1dc43aedc9b443"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift: ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in FileHomeItemContentView.content at line 515. 1 of those changes was a fix/bug commit, and the other 7 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e215da9c28896aeee1bbf53b91bd34934155581b16cc63fd7e3d38507e5135"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift: ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ExcalidrawEditor.persistCanvasUpdate at line 1198. 3 of those changes were fix/bug commits, and the other 9 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf28a22ef0d2555b53c6786907151134975f1b32994a70126177dc6efe513d85"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift: ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in FileCoverCacheCoordinator.generate at line 839. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84106e181bef991964d011dc1737a43449ac7ec94e4cc901662493334226ccb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift: ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in CloudStorageDocumentStore.replayPendingMetadataOperations at line 2303. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":2303}}}],"partialFingerprints":{"codehealthFindingId/v1":"cab0d976fc89504addba0fadd638f5ae9ec0793324dbd9c31508d419289af5ff"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift: ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in FileHomeItemTransitionModifier.body at line 143. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemTransition.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"58ed4ed8075663ef0d5087bca7594dbdf6d53cc4518a80327db0939b351ffcf9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ScreenAnnotationView.body at line 42. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"237e036b7308e416ea49bb899c47aa4a50e5380518ceba8374be43af041f0149"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/Share/ShareToolbarButton.swift: ExcalidrawZ/Share/ShareToolbarButton.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ShareToolbarButton.performShareFile at line 145. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/Share/ShareToolbarButton.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ShareToolbarButton.swift"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"f061c5ab3e417eade9a08adbb7cc1e9332c564905784e9a4afd30b0cb2b8034b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/AppDelegate.swift: ExcalidrawZ/AppDelegate.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AppDelegate.scheduleTerminationSheetIfNeeded at line 121. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons \u2014 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 \u2014 a file this often edited pays the complexity back every time. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/AppDelegate.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/AppDelegate.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ae0f3246dab79f4e6bc6a76cb7f03652006fa6aeafd7cccdda2be44bc53c67"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift: ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in HomeFolderItemView.body at line 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"6928f6b5f8454b27485b6534ea221c1332826e8913b18d4c0ae2e7552a3c5f2a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift: ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ExcalidrawDocumentSyncController.load at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a0c5f64365f9df26308c642880f90277eb4a4d6fb379400c2e5f7a155f1af6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ScreenAnnotationSession.prepareCanvas at line 87. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSession.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88ae28793d2821413e7f887ff0095a8143ba0c36ada1d42c6e3242114377640"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift: ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ScreenAnnotationSaveConfiguration.init at line 225. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationSaveDestination.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a0163d39f935eb3f4ec27d9f451b07bd8034d3a61b96d1c64d1ae4203a7214b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift: ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is ExcalidrawWebView.keyDown at line 107), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201CFix SwiftUI update cycle when closing canvas\u201D; \u201CFix macOS canvas sizing and toolbar hit testing\u201D; \u201Cfix: prevent dropped library payload from navigating canvas\u201D; \u201Cfix: stuck loading when draging items onto the canvas\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac97e5921d9c4d520658742fc104da658052602e3c6abeeef8749e573b5b06b0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: ExcalidrawZ/Sidebar/Local/LocalFilesProvider.swift: ExcalidrawZ/Sidebar/Local/LocalFilesProvider.swift changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is LocalFilesProvider.getFolderContents at line 160), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201CFix editor recovery and document export compatibility\u201D; \u201CFix local file access and cloud refresh\u201D; \u201CFix local file/folder move operations (v2.2.9)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-20..2026-10-18, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-07-20 18:54:27 \u002B08:00\u0027 --until=\u00272026-10-18 18:54:27 \u002B08:00\u0027 --full-history --no-merges -- ExcalidrawZ/Sidebar/Local/LocalFilesProvider.swift\u0060: 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 \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/Local/LocalFilesProvider.swift"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"efc06f3f9a426a193aa8280691ffb39c0259b7f919011c69473af2843c3eadfc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Temp, change it next version. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/components/NewFileButton.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f38ed0314c65d33e2c1eb9f8cdb713b80f171f368a604fe0580250d3b36aa5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: add a localized key for this reason. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Store_Shared.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1ff018a8bc5c56ff388498ec49cd5580f54c06d25d4162a32ea4bd33c972ce"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: ///   driven by intent, not server phrasing. (TODO: route credits / \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatErrorPresenter.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"b772273d790fef1085882f7296ac82412f43d6d0420b6dc87c0c0fb3f80a58b1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: open sign-in sheet once an entry point lands. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatErrorPresenter.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55dc3a520c905f17a1def6172bcebd92b7a7b877edb976d0bede9f5ec1c7c88"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: localize once a key is added. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SettingsView.swift"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f932c36e184d57d2c5350248747828ccd2f207e5126fc52f0c80d697bc7d89f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: migrate to excalidrawZHelper \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53495c84806205baa494c101f08f5ed97f5a83608fc83cf12cec362d0255543"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: migrate to excalidrawZHelper \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"18276c31c3a3cfa6f0623e5f710ae6401ba346c5ee6a11a8cf2c4f29ba7bb8e0"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Not Good Enough \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/ContentViewDetail.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff5a768c66214384d47dd4482599a3f42ea128129264277663d115b1b1eea65"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 1 of 1 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is \u0060(repository root)\u0060 (152657 LoC, 1601 module-visible types across 116 directories). Review these for cohesion \u2014 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."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CompactAIChatInputOverlay.swift \u2194 CompactExcalidrawBottomToolbarContent.swift: \u0060ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u0060e8a956be\u0060 Polish AI chat input and prep 2.2.6; \u006086b02f2f\u0060 Keep compact AI input visible on approval; \u006056ac7683\u0060 Refactor compact AI chat overlays and AnimatedPresence \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfabc3a9c5e9bb4bdc658ecb190f133a0ec40b8eceff583aa709e9e5e24fd5a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ContentView.swift \u2194 ExportFileView.swift: \u0060ExcalidrawZ/ContentView.swift\u0060 and \u0060ExcalidrawZ/Share/ExportFileView.swift\u0060 change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u006055939e10\u0060 Refine macOS termination handling; \u006035f13eab\u0060 Fix share file sheet bug in macOS 14; \u0060c08b4d88\u0060 update i18n variables inserted in code \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d73f6f201a5b59df0b3436898327c3163db293633a8418b5d4bb0564cfbceb"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ExportFileView.swift \u2194 ExportImageView.swift: \u0060ExcalidrawZ/Share/ExportFileView.swift\u0060 and \u0060ExcalidrawZ/Share/ExportImageView.swift\u0060 change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \u2014 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u006035f13eab\u0060 Fix share file sheet bug in macOS 14; \u006015504394\u0060 prepare for iOS; \u0060429b7fe8\u0060 fix bugs \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Share/ExportFileView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa962d509e0cf62563edbfffea8b8be4a8bfc4d446c1f61b85392fb0ea3c240"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: CompactAIChatInputOverlay.swift \u2194 ExcalidrawEditor.swift: \u0060ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift\u0060 and \u0060ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift\u0060 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 \u2014 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; 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 \u0060e8a956be\u0060 Polish AI chat input and prep 2.2.6; \u006056ac7683\u0060 Refactor compact AI chat overlays and AnimatedPresence; \u0060d47af8bf\u0060 Add toolbar layout policy and use containerSize \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c65a5350bb3a2b4a1aeec8937e1a1bd4bb4224eb00ae3190179f1bd657cdbf3"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AIChatView\u002BMessages.swift \u2194 AssistantRoundView.swift: \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessages.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u006066ef93c7\u0060 iOS compatible; \u006092a6d0a2\u0060 AI chat: add invocation context \u0026 loading UI; \u00607c1112c1\u0060 Add chat scroll configuration and loading slot \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessages.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a113cd7cf01e1be9c520343e76a509e01d54fd08e3de54a55961391262b2a8f6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: AIChatIslandView.swift \u2194 AIChatView.swift: \u0060ExcalidrawZ/SidebarTrailing/AIChat/AIChatIslandView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u0060b3b156ce\u0060 Add native viewport insets and AI chat attachments; \u00608ce804db\u0060 Adapt inspectors and AI chat UI for compact iOS; \u0060d6650d31\u0060 Improve AI chat ticker \u0026 adjust tool output \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/AIChatIslandView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1171cbcc32ea9ea3f7066d9e41d94ce708ab1eee63bde95741e6855d8d2dc8"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: FileHomeItemView.swift \u2194 FileHomeView.swift: \u0060ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift\u0060 and \u0060ExcalidrawZ/ContentView\u002B/Detail/Home/FileHomeView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u00607f1e570a\u0060 Persist file covers and reduce file browser update work; \u0060d17656a9\u0060 Polish imports and loading behavior; \u006095dd3272\u0060 Batch file delete \u002B selection \u0026 UI refinements \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce85a46edeca160d0fd9d2468e445dabf68497fef435f637c31e99b266cf45d6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ExcalidrawEditor.swift \u2194 PromptInputView.swift: \u0060ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u0060e8a956be\u0060 Polish AI chat input and prep 2.2.6; \u006061b5c5cf\u0060 Improve AI chat UI, sync controller \u0026 file handling; \u00603783c790\u0060 Optimize AI chat image attachments \u0026 UI \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4343b984fe62d3e584f430f584c9bec8589a182ec4918a8e9738b0e34496dd3"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: ContentView.swift \u2194 AboutView.swift: \u0060ExcalidrawZ/ContentView.swift\u0060 and \u0060ExcalidrawZ/Settings/AboutView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u006035f13eab\u0060 Fix share file sheet bug in macOS 14; \u0060855af95d\u0060 opt paywall for non-appstore version; \u00604011869c\u0060 opt toolbar \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"644847b0a451cdc51007558a187e9fd4a506b029cdc6b1299b7ef2d55e99940e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: LibraryItemView.swift \u2194 LibraryView.swift: \u0060ExcalidrawZ/SidebarTrailing/Library/LibraryItemView.swift\u0060 and \u0060ExcalidrawZ/SidebarTrailing/Library/LibraryView.swift\u0060 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 \u2014 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). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; 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 \u00606f15ac84\u0060 Add library preview system \u0026 preview export helpers; \u0060a5561953\u0060 Add lasso tool, box selection \u0026 edit library UI (at that commit the files were still \u0060ExcalidrawZ/Sidebar/Library/LibraryItemView.swift\u0060 and \u0060ExcalidrawZ/Sidebar/Library/LibraryView.swift\u0060); \u0060c08b4d88\u0060 update i18n variables inserted in code (at that commit the files were still \u0060ExcalidrawZ/Sidebar/Library/LibraryItemView.swift\u0060 and \u0060ExcalidrawZ/Sidebar/Library/LibraryView.swift\u0060) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryItemView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"395ee020fbf140c77a143d13cd9315c1d5ef6b8dc042956c2e7757a48372d905"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: GroupListView.swift \u2194 LocalFilesListView.swift: \u0060ExcalidrawZ/Sidebar/GroupListView.swift\u0060 and \u0060ExcalidrawZ/Sidebar/Local/LocalFilesListView.swift\u0060 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 \u2014 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). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder \u2014 so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 \u00606a9af38e\u0060 Pause sidebar hover effects while scrolling; \u0060fbe356c6\u0060 Add sidebar scroll-to-active-file on iOS; \u006018c3cecf\u0060 opt sortfield \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupListView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df169c0402619ac0e30f965307fb71a1426d5c9910a3d678a046b556c63d6e5d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawBoundElement.id: \u0060ExcalidrawBoundElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElementBase.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c2f25ffba8edadce33cbb55b28997ca10b1252064e87e1b634cbeabd245851"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileLocalizable.fileID: \u0060FileLocalizable.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/File\u002BPersistence.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"305503ac04a3297c10d64c9cf0249dfc5cc69c9f3f26659f2923eb72e87faa61"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileLocalizable.groupID: \u0060FileLocalizable.groupID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/File\u002BPersistence.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef68bde8a09e43d493777387925fc17b97b4943381041847999ba05cbd4cfbe"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileRecord.id: \u0060FileRecord.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/SpotlightDelegate.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c461fa210405fa9d65fba5b0e2e20d3a9e66264a6419384925e2143396d3542"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AccountEntry.id: \u0060AccountEntry.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/CloudStorageSettingsView.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f1037ae66eab12ed7433a09553854ad430d5e11f843cc6fd328add2b7484c9e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FolderChildren.id: \u0060FolderChildren.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/GeneralSettingsView.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc8a64950291c0ae3e9e38e6ddba7fba4417836a51ae88b14ef7ac75a3493f43"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: RecoveryKeyResetRequest.id: \u0060RecoveryKeyResetRequest.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/SecuritySettingsView.swift"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"6928ab001de99c93f311d3ffc62dbbbe06c643c6a4dd17ef59ce2ac9afcd9b33"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: EditSession.conversationID: \u0060EditSession.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"90b3ff5980d79acefbb34e32433e5a60666d18785a722699e45d6008dbb79e4f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: EditSession.userMessageID: \u0060EditSession.userMessageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"52cb0e4c60059fc5e572e10f1d23a119a0f6e2f4073a8a3114a5ea43efa1e364"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: TransientError.id: \u0060TransientError.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"57199f16efaf4c3af4b8ecd910749c84caa7324c1c97a533b641aa84667f362a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: TransientError.conversationID: \u0060TransientError.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c2325418f85066013eb9a6e361a1e913a848374e8dc1ad58e9ac9019460779"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: TransientError.userMessageID: \u0060TransientError.userMessageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e5128aaf8cafa880a5f476d6437c45d0038f313ae89707ff9029d185c47fe6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: TransientError.retryModelProfileID: \u0060TransientError.retryModelProfileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3cc38cd3c0693d8ff55c91deb36694425ca6f3c6db4c4bc140c5daa42d99546"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CapturedCanvasSaveTarget.id: \u0060CapturedCanvasSaveTarget.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"567f64024594e7536567796ac309fd96e3746093e1d682067cdb60c1acc492cd"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatSessionState.conversationID: \u0060AIChatSessionState.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"faeb166ed81385ff31ed1f8c70ceb438ccc9c5b82734e09ef18f001bf80b1f62"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatSessionState.userMessageID: \u0060AIChatSessionState.userMessageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"e828cc64ab45eb0c488fb747ef9215ceb32fa11773827c1cae08479b32439fe2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatSessionState.preCheckpointID: \u0060AIChatSessionState.preCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbfe7dd841c3237fe253e1cefd8335e8478f0620e085fd09165dfbdf5af4f345"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedContentAutomaticUnlockRequest.fileID: \u0060LockedContentAutomaticUnlockRequest.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/LockedContentStateStore.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"08035c329d6df596b18d30b412ad70c80385331083df3af3be3f102fdad050d9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ManagedFileReference.fileID: \u0060ManagedFileReference.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/LockedContentStateStore.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"2359f349e40de5f38b2360d2c2b42ffae70714b46e20585443d118e09a2b9960"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SubscriptionItem.id: \u0060SubscriptionItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Store_Shared.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"1088ef856d65cabfc48a6315bdcf3c8c93521136845d82b9d494c6fd3c58aecb"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SubscriptionItem.yearlyID: \u0060SubscriptionItem.yearlyID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Subscription/Store_Shared.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d440566dad1cb8b891e2535eb4a330fea952dc4277341200353f561e568a1e1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FailedFileInfo.id: \u0060FailedFileInfo.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea213eccdde2fe4f5f28fc2dd8e7bfde5915792ff87d30c90220891deb43d055"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ArchiveFileSnapshot.fileID: \u0060ArchiveFileSnapshot.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ArchiveFilesModifier.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6e28fa24c48fb826dd044c9881c300b3ad7f0182a19e757dc168b9fd181dbc"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: IdentifiableError.id: \u0060IdentifiableError.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Error.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"71bbfdc8731ba1e37d2ad6cfa0b93537fd9cf0d72cd10a42eb5e5b50cf4d7e4f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Secrets.oneDriveClientID: \u0060Secrets.oneDriveClientID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Secrets.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c8dcb74929cb61bed9f11b98c15f395cce01107cd566fa10bd5aa3116f5035"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Secrets.googleDriveClientID: \u0060Secrets.googleDriveClientID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Secrets.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb67d0f85fd5c662f9d00be0fc7d2878c1360e37b2ef74fa2e4708cd1808a66"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ActiveStorageFileReference.fileID: \u0060ActiveStorageFileReference.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"d158068f34e6de069e1b1c65814c21ba96548d4e364a891f40e4f8b4a5cf0723"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LoadingOverlayCover.fileID: \u0060LoadingOverlayCover.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditorOverlayModifier.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b440e67d0e765ef171ef97c740845fa17bf7efd0224e553b2344b8f79da88b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SyncIndicatorEvent.presentationID: \u0060SyncIndicatorEvent.presentationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/IndicatorOverlay.swift"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"46b7899e01cbd07b8cb2c837d0e824810a1faf4a96bc8d456fc1e5b4f7aa8d52"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDocumentLoadCompletion.fileID: \u0060ExcalidrawDocumentLoadCompletion.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockOverlayModifier.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef35a0a34a2f091f453680fb9651c2e82b38a40433984c99c33d8e9aae4be4af"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileUnlockRequest.fileID: \u0060LockedFileUnlockRequest.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9f5196601f09f40f73bdb8d2a406e753b3a60ad853c2fe5957e2b6d6c5e3df1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileUnlockTaskID.fileID: \u0060LockedFileUnlockTaskID.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2394b7ef9de69f6e82e620661ea795314535b1a18df83f9161083b4c6967d99"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DocumentLoadStateMachine.confirmedFileID: \u0060DocumentLoadStateMachine.confirmedFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"fddef8df0047e81dfc673d9b5af5195875ffc9569b429bfaeb8e9f7d6659e26b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Request.id: \u0060Request.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"4125e517410c3724a74c4b973f8c6e506e3dfb48891478a9cfb7703fb028fa23"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Request.fileID: \u0060Request.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"408642fa1187424183616e632290d44a13739a41155f56509f23c4889e6b4b50"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDocumentSyncController.currentLoadedFileID: \u0060ExcalidrawDocumentSyncController.currentLoadedFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad60ed6ca5b3cb166093532e1f716f09ffaf26fccd0ad3f92d8232a343331c6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: StateChangeSuppression.fileID: \u0060StateChangeSuppression.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawDocumentSyncController.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"13e89b3b4ab240fe0a536002101315b3c3ff0a13866f63b8568daf9a5c798c91"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: StoredViewportState.fileID: \u0060StoredViewportState.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawViewportStateStore.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df54c0fb1f2ec0d768838ad36c19791d48556f1434d4ec707708311b3fce968"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ViewerLocalConnection.requestedFileID: \u0060ViewerLocalConnection.requestedFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"258eaac00f597d6b7695867fb64518cd12734b6c03c4b85413b2d2e8ac4dd075"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ViewerLocalConnection.awaitingPresentationSessionID: \u0060ViewerLocalConnection.awaitingPresentationSessionID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa2fb5e105218170fc60858122da5ed9089460580a008703f87f9ac21f8304e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Binding.id: \u0060Binding.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf103bddb475202251f91e68875a9cb95b62c55b806643f8e6bbebe8a496083"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Binding.fileID: \u0060Binding.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalConnection.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3464d3f57a910c70a7e94b0cbd9c5ff4ec65dc47d897b796a167cbd2351782b3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Peer.id: \u0060Peer.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalRelay.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db8352fd5bbd5345c19d5479832bb0120a5eff702747dd4f00937f06041cb7f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ViewerLocalSocketHandler.sessionID: \u0060ViewerLocalSocketHandler.sessionID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Viewer/ViewerLocalRelay.swift"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a44536c636ad7ac13ac741f92f32d9174836ec0d8b807e5fecd9b38e99a80b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CheckpointPreviewSource.cacheID: \u0060CheckpointPreviewSource.cacheID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverCacheCoordinator.swift"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5d02de550de8f7b6648c2d8b56260d8ddfeffecd0baff206545cbb7f9e6536a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFrameLikeElement.id: \u0060ExcalidrawFrameLikeElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a87ebde19a222824d64bada780e004b5d1f02905e728f0af523af57fb3e50e1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFrameLikeElement.frameId: \u0060ExcalidrawFrameLikeElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFrameLikeElement.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e96249408190b9d5b4c91f269877ff596474b01097cca50975a28475a4e98d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFreeDrawElement.id: \u0060ExcalidrawFreeDrawElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc98c3474f6b13ead4a1fabac3485043b838d62b46f845bba0d67f1f4ae890c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFreeDrawElement.frameId: \u0060ExcalidrawFreeDrawElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdf739fab2fae949d6d2d998e08f986490eedd0c35da84921157e58e0ea6c489"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDrawElement.id: \u0060ExcalidrawDrawElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e755ddce18d50a7a40e777b2acc79480da971ed931b48ca742cd69979cd6fd5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDrawElement.frameId: \u0060ExcalidrawDrawElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawFreeDrawElement.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f1dc42e822a43d7a786eecdfb46f708984dd90b60c565768a2818c4452d680d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawGenericElement.id: \u0060ExcalidrawGenericElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f139400ff550aeac91bbbed3e2282beb22b91b19da4e043a6868ecf0c17299d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawGenericElement.frameId: \u0060ExcalidrawGenericElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawGenricElement.swift"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c51edbc198ad83eddd1f3cf9afe90def8d14c5221187b0a92044eb529fddf4"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawIframeLikeElement.id: \u0060ExcalidrawIframeLikeElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3184146926270f2ed33053ca37ea320c46c74200aa0e2fbc91073dfdee5b08"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawIframeLikeElement.frameId: \u0060ExcalidrawIframeLikeElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawIframeLikeElement.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc4480a5f1945a160a6ac680560685413f7325eb4478e9d597d6b4c2755ed06"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawImageElement.id: \u0060ExcalidrawImageElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2897a53dd11ebeb15fb355b1c69762d2d418d130cce472495619714583cba48"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawImageElement.frameId: \u0060ExcalidrawImageElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"218055ecacb37d45136cd271966defa68e94618d23633521c48e6837398ebaa1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawImageElement.fileId: \u0060ExcalidrawImageElement.fileId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawImageElement.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3f7025fa27e4195f3cff3b725f9e20330fc5df890945eb114f3eedcd90fc94f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FixedPointBinding.elementID: \u0060FixedPointBinding.elementID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"340d9d40ebc6e4d7d48db3a04c7967e727cbd6a6c483ee06178fff8b1229e799"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LagacyPointBinding.elementID: \u0060LagacyPointBinding.elementID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"cae0cdba4ec12fc922b9ee43a2979ffe51f1427f5df3f32cb6b04ce10e880899"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawLinearElement.id: \u0060ExcalidrawLinearElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec714448ab84f927a498166941db8eb7fbb1db2ef283837fe4ca04e9b4978d18"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawLinearElement.frameId: \u0060ExcalidrawLinearElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d9bbf68067192ea2c15069c04b1b559f96ba181ea95f1ecaff6812f9314e6e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawArrowElement.id: \u0060ExcalidrawArrowElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb05ce782aeea578712c119f52de390edbc4ff70ffe55c6700eeca8cac453d5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawArrowElement.frameId: \u0060ExcalidrawArrowElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawLinearElement.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"2465359fc3da7c9ce5af202060c48ce48e32ceb5f4b008c2854067202b549e84"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPdfElement.id: \u0060ExcalidrawPdfElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ccfbb59ee54fbbbf8978182c7c4d33a8f43b06db0dd5e0b20867a5d6e9b988"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPdfElement.frameId: \u0060ExcalidrawPdfElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1133459dc8ea40541cf5a2ea3b567f438386b0ed602303282bcb9115cdbc6c7a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPdfElement.fileId: \u0060ExcalidrawPdfElement.fileId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawPdfElement.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"55d9445de4c1abf9e5ee1419672721f5e6dfca4f2fb68287844815f73d280729"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawTextElement.id: \u0060ExcalidrawTextElement.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca242f10f010ad1cd0587119d386d0735a3cdfc23d60c6c4cf5284c7943bca86"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawTextElement.frameId: \u0060ExcalidrawTextElement.frameId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawElements/ExcalidrawTextElement.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea9d0a30db5fc574a5633c074fe519135354fad480fc954d2bee50ddf6eaf82a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFile.id: \u0060ExcalidrawFile.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"4259ac267573755f08e10cad27e711c0e094543d472d7a5e28254e3c3df593c1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawFile.roomID: \u0060ExcalidrawFile.roomID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe1128e7bcd2ba34db5e24e3c3b5c1b1f3162025502565cff4d853b9ad777d09"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ResourceFile.id: \u0060ResourceFile.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a2cd3f68c338979fefd474e7a083ea13e2e080d24051b98de2721ce725cb98"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MetadataMutationKey.locationID: \u0060MetadataMutationKey.locationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageDocumentStore.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"014ad430cd21070cddec61e5875f9da960b53dd183a03817eb283c82229225ce"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageFolderPickerContext.id: \u0060CloudStorageFolderPickerContext.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageFolderPicker.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b829a9d4df494aad7ad037b835f8ec1daf853f3b53ee3480c5a9ee6fe476b4a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageMetadataOperation.id: \u0060CloudStorageMetadataOperation.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageMetadataOperation.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b56c35acad9b55816e3753d1aa4935b33adbd201f5a6d2c03bad1ac640a76cb"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageLocation.id: \u0060CloudStorageLocation.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageTypes.swift"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f3d90e50de358980ebc39bacea4917855fcfc8c2653a97fdeef26f8f5b82ea2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageDocumentReference.locationID: \u0060CloudStorageDocumentReference.locationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageTypes.swift"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9823799ee75540417a28bd5b6f2bc5329daa304f76df6d433cb3e108bd28f8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageDocumentReference.id: \u0060CloudStorageDocumentReference.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageTypes.swift"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb8b678edad4f70f756125aa6a7137967c7aa8578e4740c2658bcff0e511238"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageDocumentReference.activeFileID: \u0060CloudStorageDocumentReference.activeFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageTypes.swift"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce7d78897aa1045c057b261f7ce016d99e4b24670a166549414224de6fbe4848"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CloudStorageFolderReference.id: \u0060CloudStorageFolderReference.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageTypes.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"12ef8b0569e2d56f2a846ac690c6dcd2a2e0295433ae578f468ccb484192355c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: EncryptedBackupEnvelope.keyID: \u0060EncryptedBackupEnvelope.keyID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedBackupService.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ab5bb60b81a70e464c0742a9385d73b9cd1fa3b4b0943424136ef5865a0814"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: EncryptedContentEnvelope.contentID: \u0060EncryptedContentEnvelope.contentID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf7b70362711810288e9c6fca156931ed7b104b5459d84e5af694f2d16e6c05"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: UnlockedContentKey.contentID: \u0060UnlockedContentKey.contentID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/EncryptedContentEnvelope.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c747a3818893ad8fc89a51d0e25e78d3321d244e9f98901098afa0de71214e3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileStorageICloudStatusMonitor.monitoredFileID: \u0060FileStorageICloudStatusMonitor.monitoredFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/FileStorageICloudStatusMonitor.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"9804b455e35995b1f375bee0fead8531a603a1ccc47efd4d7c3fdd6790594462"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileChangeEvent.fileID: \u0060FileChangeEvent.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/FileStorageManager.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed639c3a77b41db283d591ca381f78a37ffa90dd325561d759c601c85f44279"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MigrationFailedItem.id: \u0060MigrationFailedItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationState.swift"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f862c2b9f0e086f1e77bf8626c6277038b51c570c81f2f6ab043df67f9bdd9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MigrationItem.id: \u0060MigrationItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Migrations/MigrationState.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb78571c7b095571a82e455f9965967e876a0192f27cfe8b06d70d7c237d0e08"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PersistedFile.fileID: \u0060PersistedFile.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIChatAttachmentRepository.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b050f5cc56dbb991b38fef29caa31638859674e6c6f4f03d771a0a7b13de8fc0"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIConversationFileScope.id: \u0060AIConversationFileScope.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"70539e350f04bc0961a14a05e787a6120f5fb97c9dff40d3a3b1a90aad86094b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIConversationSnapshot.conversationID: \u0060AIConversationSnapshot.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"878cc8daf1121f176a52375983bf15d7540ef5dcac463113af966f353e0dba20"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIConversationSnapshot.fileScopeID: \u0060AIConversationSnapshot.fileScopeID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6232bf6d8a9802417f0def96a4ba91aad13f1aa04156d42e39198580e7ac161"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIConversationMessageSnapshot.messageID: \u0060AIConversationMessageSnapshot.messageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8911687e616b139c169603c7f4eb2b2a1ae2cf17494cc40e2c5119e95547c2d5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIConversationMessageSnapshot.toolCallId: \u0060AIConversationMessageSnapshot.toolCallId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIConversationRepository.swift"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd8c690481aa9c05ed038ef51e44c71a9547fd1c5011bc0705464ff4d278f4e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIMessageCheckpointLinkSnapshot.conversationID: \u0060AIMessageCheckpointLinkSnapshot.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"caaf6b71bff4fefb64fd5ecca05dcd9d124e058a9fbb8a5949b9df74188cf750"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIMessageCheckpointLinkSnapshot.messageID: \u0060AIMessageCheckpointLinkSnapshot.messageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c14b5fec39df422c66ccb3f1292d0582b67dc2ea6aa085624f326373f157a6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIMessageCheckpointLinkSnapshot.checkpointID: \u0060AIMessageCheckpointLinkSnapshot.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd7aaf3cdf8bea6f522be5dc4e99daff464a5e55b78c657cb2d1601b0d3bb0db"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIMessageCheckpointLinkSnapshot.fileScopeID: \u0060AIMessageCheckpointLinkSnapshot.fileScopeID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/AIMessageCheckpointLinkRepository.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"25f467623e0ecd6ddb2d17dfc22ba7fb25d5cb01052f14e62d40418dc7f4e063"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: RawCheckpointContentSnapshot.checkpointID: \u0060RawCheckpointContentSnapshot.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/CheckpointRepository.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b14426fd8c6e89f5e8de8a0f65647284baa9a6440e066e3a0693bea43f84c9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileSummary.id: \u0060LockedFileSummary.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0142b3c36ca34fc23ddb2140e9dad093a7878aad29cbb6b0b2ba0095450b59f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileSummary.fileID: \u0060LockedFileSummary.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3814e5d38ef50f3b2b8da77df6b2294265a618d084a11661fd7fd89b0af0db2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: RawFileContentSnapshot.fileID: \u0060RawFileContentSnapshot.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"6068b4b10690976382363065ad97773d4df1b586512c98ae6f1dc1369ad897eb"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DeletedFileStorageInfo.fileID: \u0060DeletedFileStorageInfo.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository.swift"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"567fa31c80e247c488937f7db6e89db3a98cbfbb350c74e9aeda42cb6fc64e8c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DeletedCheckpointStorageInfo.checkpointID: \u0060DeletedCheckpointStorageInfo.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository.swift"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"803d269a192686274981afc777e0509795c8f91a058a918e0e3d7a6ae29c41d2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MediaCleanupCandidate.mediaID: \u0060MediaCleanupCandidate.mediaID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"582954d9d0098bf1452c5108e7b77293822b1c8b0a0acd3d58af4e1125ff0a88"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: StoredContentSnapshot.contentID: \u0060StoredContentSnapshot.contentID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"e656dc5e331db8be59a3f4d05a544e9d8aa3b77ef4f1d90f05188fa50caa0573"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MediaSnapshot.mediaID: \u0060MediaSnapshot.mediaID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f9a31503b4d9072152d511ebf6b3c32264cf41a1a7b7620e8f895925c2b2f5e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MCPServiceModeFeature.id: \u0060MCPServiceModeFeature.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/AISettings/AISettingsView\u002BMCP.swift"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68b99ee6f453f42004449bffa7a1e30d24b42a0ea85c2eeabcb9201a4e174fd"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileAccessRequest.id: \u0060LockedFileAccessRequest.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a2d95a9f90a6db492cfa613aeaf9c9b448f7e6391d321c95cb781b56f9c5d1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LockedFileAccessRequest.fileID: \u0060LockedFileAccessRequest.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/LockedFileAccessSheet.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd008efa81ba96df085747a300109c356c7ea28fbc19e0926308ecb42c5fd3e7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CheckpointRecoveryData.id: \u0060CheckpointRecoveryData.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MissingFileMenu.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f520728985989bb7237f2ad0b5d272c01061ad031a27fb6319ab960e76a39bb"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: TreeStructureChild.id: \u0060TreeStructureChild.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/TreeStructureView.swift"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb571c592a1556b421b1a96426f8124fdcc1ffcc1d7919d9d0d7953fe254be6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatIslandProposal.messageID: \u0060AIChatIslandProposal.messageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/AIChatIslandProposal.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"de10312317da22defc371a94f1c74cdf87802f7ba9fc95c9e03aacbc8628b1b4"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawAITransactionMetadata.conversationID: \u0060ExcalidrawAITransactionMetadata.conversationID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/ExcalidrawAITransactionMetadata.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5ca182bd319045438630ddb4e4684237b4fbc9526cc99c53f1a33dc7a44f1f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawAITransactionMetadata.userMessageID: \u0060ExcalidrawAITransactionMetadata.userMessageID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/ExcalidrawAITransactionMetadata.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"5068cc6a004c634d716a82461cfea55b39c962785095d65e7568615e9403c73b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawAITransactionMetadata.agentID: \u0060ExcalidrawAITransactionMetadata.agentID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/ExcalidrawAITransactionMetadata.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc87d8188fbb385fe856be908178ce93256875ddab9e0a23d89fbdfe032714d3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawAITransactionMetadata.modelProfileID: \u0060ExcalidrawAITransactionMetadata.modelProfileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/ExcalidrawAITransactionMetadata.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c43b079aacfd2732613aaf5debd77e6605bcb5c81b48c69bcaa4199a34bb17"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawAITransactionMetadata.fileID: \u0060ExcalidrawAITransactionMetadata.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/ExcalidrawAITransactionMetadata.swift"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"801a8f69bcfb168c4e140fe51423ec3eaece948eba7b24d07756a1efba52de49"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileIDProbe.fileID: \u0060FileIDProbe.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/LockedContentAIGuard.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd7ec0de360d0bc394be7e556add66ea2d93b715e46bfdbbc1eb8235b3821ce8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawLibrary.id: \u0060ExcalidrawLibrary.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryModel.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"583d484b3979c0c509701e33186a301038774b5ec69db11c0551ca8c4d98dd2d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Item.id: \u0060Item.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Library/LibraryModel.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2e1564d50fd3701e7e51e52b11960498a75163d5cc2b5626f6a50b47197185"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Page.frameID: \u0060Page.frameID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationConfiguration.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c25e6dd46bc49bd31e61b85b06baa84e23afae3b900e74d6f5af7f02ee1bd7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Page.id: \u0060Page.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationConfiguration.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"042ff31b55c94b9f3dff8b86b5a29edad373c686dbf98ad33c33b56d81652778"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LoadIdentity.fileID: \u0060LoadIdentity.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationModel.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"793443e7a8084a4bcd23046a2103bd1ccd390f009f2c9123b963a72c24f058db"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPresentationSlide.id: \u0060ExcalidrawPresentationSlide.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationTypes.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"a66acbd43f03f446e30ef207d6c8d446e52057490d436af4129d00393cd25ae0"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPresentationSession.id: \u0060ExcalidrawPresentationSession.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationTypes.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"63121e6190fb8fac1b57912500b951a8fb0df685847e4cf1e364b8c9a53fe82d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawPresentationSession.initialSlideID: \u0060ExcalidrawPresentationSession.initialSlideID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/ExcalidrawPresentationTypes.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"41461e94eae6a47581df7384675ddb4bc7fc35eb6d367665b39f104e55ba3b1e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LoadTaskIdentity.fileID: \u0060LoadTaskIdentity.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Presentation/PresentationInspectorContent.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a994bd42b673d984d6ed7500ced472ce20c9b9e9733111519b6a7d08479221a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileStatusDeliveryState.fileID: \u0060FileStatusDeliveryState.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/FileStatusObserver/FileStatusObserverModifier.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3fd9b93cb75771a083e171214797f78d325ffb80ce9e9d14c3debb74e8451ea"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileVersion.id: \u0060FileVersion.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/ICloudFileKit/ICloudConflictResolver.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e64f40f557bf87b1e5bc75b7f0f78b813371053c86a8144cdc41c5465e3835b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileHomeNativeTransitionProbe.fileID: \u0060FileHomeNativeTransitionProbe.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeNativeTransitionBridge.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ef91022e1013ced5898cbd620a146f38061821e5c2ad77ab782d3db47c82741"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ProbeView.fileID: \u0060ProbeView.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeNativeTransitionBridge.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1013686b19d0e67feed712633fcf98481a3e455eac3ceaa1eb5be69dd396d61f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Request.id: \u0060Request.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeSheetPresentation.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ddb1824a8f05d78141b49f58d465acb8d71332c34e0ad8cbf109cd01b7043b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: RecentlyFilePresentationKey.id: \u0060RecentlyFilePresentationKey.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/HomeView.swift"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1e390149a4c9523ea224573ed341db7dd369d795cb2e20d56a6ba5789cbbbeb"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileRefreshKey.id: \u0060FileRefreshKey.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/HomeView.swift"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde6744ab7ec8884191acbcf8739ea3ac071ceed034ba42e73db4601ed769945"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileHomeNativeItem.fileID: \u0060FileHomeNativeItem.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/MacFileHomeGridContainer.swift"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"b508ac7adbe2f9eee5ad265950b63d59b985dcdead441b0c79592836890cf8f0"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PDFDropInfo.id: \u0060PDFDropInfo.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":1394}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb0fabad3f66da23f9a6637898972558a13d17227704cdd9f28f80208e8f508f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PDFViewerInfo.id: \u0060PDFViewerInfo.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":1404}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f93d9bbbf14bb7a621f9c3d8497c0f1def1d4b0c748786f429d1204e7ab9009"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PDFViewerInfo.fileId: \u0060PDFViewerInfo.fileId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawCore\u002BScriptMessage.swift"},"region":{"startLine":1405}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f3f5e2e241c3d6a93b5cefbe6c35535fa5019338b2c62fcdbe715d0e9a5f77"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LoadFileResult.requestId: \u0060LoadFileResult.requestId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawWebActor.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"db800f597ba0d306e60b82511bf5a78bce3df8f3ec218c5644afffbd20d13ea8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LoadFileResult.fileId: \u0060LoadFileResult.fileId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/ExcalidrawWebActor.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"97765d8c8d4ea096432c96f09a39c2d678454174f1eb3bb7223f0742c4e8389f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDocumentAppStateSnapshotSaver.latestAppStateFileID: \u0060ExcalidrawDocumentAppStateSnapshotSaver.latestAppStateFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df998541e9f300a90e0e8fce1a0ed0ec442443f7d14df8c66cac512fad62833"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawDocumentContentSnapshotScheduler.pendingFileID: \u0060ExcalidrawDocumentContentSnapshotScheduler.pendingFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentContentSnapshotScheduler.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"129a00e462f05a555bf58cbb2a83ead46c2151e71f1ff9d1c0b72c8c6da8a7d6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CommitState.expectedFileID: \u0060CommitState.expectedFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentContentSnapshotScheduler.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f775791b097af3f9088aed15d49f0cb807b1753a7c378b4a14279573e094c1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PencilTipBubble.id: \u0060PencilTipBubble.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ApplePencilToolbar/PencilTipsSheetView.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c10fd995ea3fbcfc2fb4b31b9af902ba2bde0685a3040c03c89d25cc774698"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: BoxConfiguration.clientID: \u0060BoxConfiguration.clientID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxConfiguration.swift"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"6975adf6dcd70ea0800afd3cf24174426744c1aab1034d62fc04d7a0885eb255"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: BoxCredential.accountID: \u0060BoxCredential.accountID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCredentialStore.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4a1c42e2989926ab2b0bdcc4d0c16f8de0f5c76401ca9e63624194ac779d1cf"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: BoxItem.id: \u0060BoxItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxModels.swift"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9ba627a40512ae3114606131fd7fb430afdae647f724a65d10cd5e9c9c6acd"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Parent.id: \u0060Parent.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxModels.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b735a659c92b519303fed92c5514566eed47f88dea2e1eaef53b7c2d0c9ce03"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Entry.eventID: \u0060Entry.eventID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxModels.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d05504d0f250630e8f321bba3acbad0698ca7063fb655bd1a9545ad1227aede"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: BoxUser.id: \u0060BoxUser.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxOAuthAuthenticator.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5583337ee26fed0854671dd48c1e55dbe5ea5b2c9312584fa025244924cef3b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DropboxCredential.accountID: \u0060DropboxCredential.accountID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxCredentialStore.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e811c2f35b0b4d2a14cfb0230271e39c0e2d4d793f10f419a28dab0ce7388b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DropboxFileMetadata.id: \u0060DropboxFileMetadata.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxModels.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e5b6eef523f0eafa51e03889673f3622ad690356cc692aa0ebc7c9e7702f4d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DropboxFolderMetadata.id: \u0060DropboxFolderMetadata.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxModels.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"6882a8812d46f7ff7361ac198bce0cf1401793355e15c50f004f65fdc9b2b3f9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DropboxCurrentAccount.accountID: \u0060DropboxCurrentAccount.accountID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxOAuthAuthenticator.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"65c576073572900215dfbc9282aed072ba6045e05ecf9d555c7196a181b5b4bc"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: GoogleDriveConfiguration.clientID: \u0060GoogleDriveConfiguration.clientID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveConfiguration.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7767fe04452bd55827a7664f2b8a3feb24e57cd3dce2d160ed52fc896fb9d1c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: GoogleDriveCredential.accountID: \u0060GoogleDriveCredential.accountID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveCredentialStore.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"140bccbc88cd42c3a5c42ef17fe48144202871294eac296902ae1cf865f11269"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: GoogleDriveFile.id: \u0060GoogleDriveFile.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveModels.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1a4f49bb99f655290fa40168794cd2a9422963dd8469a2cf22a1a7bacd0aed"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: GoogleDriveFile.headRevisionId: \u0060GoogleDriveFile.headRevisionId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveModels.swift"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa74ac7992049a1bbb2a04cf1d2a0fc3f5ade041bb0589d6ebd821df49262eab"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: User.permissionId: \u0060User.permissionId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/GoogleDrive/GoogleDriveModels.swift"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6261c9160aa312681933826dc37e576b9615fa3ae613fcf2e3f2c911541fc3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: OneDriveConfiguration.clientID: \u0060OneDriveConfiguration.clientID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveConfiguration.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e73f8acb42ed29f66542b8062796686024243ed755eb0efc3e35d73d587e43e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: OneDriveDriveItem.id: \u0060OneDriveDriveItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphModels.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"792629889f30a0afd03369dd1e140e3a432e9b06fecc7ba272e68ba7c147ab71"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ParentReference.id: \u0060ParentReference.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveGraphModels.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea7739cb31a202faf437aefff0798851d2ae4fec47d6a8320907ca8929bac41"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: WebDAVCredential.accountID: \u0060WebDAVCredential.accountID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVCredentialStore.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"608f3b62cc2505cb380bda79e8ca579e32604200d995065661fb9c460b092cf6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SyncEvent.id: \u0060SyncEvent.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncModels.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee83ca3d1ea2fdd04175d6f395d8fb63eb0349592f63da3b262f01d00eb9d644"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SyncEvent.fileID: \u0060SyncEvent.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncModels.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"d86b11a06304ff2d472e5517254ccb4f618e177161cb1371865f17f2ab5e4d1b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SyncFileState.fileID: \u0060SyncFileState.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileStorage/SyncCoordinator/SyncModels.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"4026ed824a44dab76cfbd0c8ea7b8bdfdcc0aaa1154bef4295c09585a2572b4d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AICameraDirector.sessionID: \u0060AICameraDirector.sessionID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a46343fd1a563bab5f3afbfc65982c879b3687e6d2a4fc6c13d9833d5893911f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DebugSnapshot.sessionID: \u0060DebugSnapshot.sessionID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AICameraDirector.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e53370f6f51d0e2fb0d9ba398e38e1ba8b121f571c3cd2735074966e64619d7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AddContext.currentFileID: \u0060AddContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6257e41f941a6e38fa197929714f2fe109605d50c8005991d447bc36d45ad89"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.libraryID: \u0060Params.libraryID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23623f5a6bc8bf106d54b22f2ac5b931a036e9945b561f06c5024a3a0bff56d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.itemID: \u0060Params.itemID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AddLibraryItemToCanvasTool.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"253d12556938da1bb3c5c276c9b64c758e57610e04953b6e46d2c089dba74ec6"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Input.localFolderID: \u0060Input.localFolderID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AppContextTools.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"987f592ade89ecbc2421d37fbbcfa84195b06fb7ba1edd06fbc1a6802b2fc9c5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExportContext.currentFileID: \u0060ExportContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ExportTool.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d52eebaed4ae7a95d75061c70d996143b315d08be92920b32f2867139644e7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileEntryCandidate.id: \u0060FileEntryCandidate.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListAllFilesTool.swift"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96013e99e4728cf1c793790159d90ad3e99a78af1fe6b73835308b628b4da91"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileEntryCandidate.groupID: \u0060FileEntryCandidate.groupID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListAllFilesTool.swift"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a69a816ab0315621656d7cff53a6c84e518bd105e31a3a5ef487ddcc1c0d6f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileEntry.id: \u0060FileEntry.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListAllFilesTool.swift"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba58384f10135477b7da52d4000735d8f3964ce299931e495f190c75f948f43"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileEntry.groupID: \u0060FileEntry.groupID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListAllFilesTool.swift"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c152e4eee9cc970833f823139eb8c0cfd9ed3a97461a09336a7f0d30701982"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LibraryEntry.id: \u0060LibraryEntry.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibrariesTool.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab87eeef8770f24c7cf314efa28f96e5a9c55af88cfeb40ee866550d73bf610"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.libraryID: \u0060Params.libraryID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListLibraryItemsTool.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff79a22aee2ee6368eb6972ae72ed77373da9212118b18c93552e179383e3c61"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.fileID: \u0060Params.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec5347e429a34e1fc0460ae2dbb4107c52075f911da00526fa3a3246f3f6c2c2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Output.fileID: \u0060Output.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbfe2bb8101866a29558e1ce5fa9b38bb13dfdb68ed4ffa4807e1cb7df468ef5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CheckpointCandidate.id: \u0060CheckpointCandidate.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e9130b0ebe22ac3917921a9b3fa2f81aea967e71ba5f4bda35dab89bc2aca8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CheckpointEntry.id: \u0060CheckpointEntry.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3956206704cb139a40291648904d751382990d275ab770897e25cad82086603"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.libraryID: \u0060Params.libraryID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1e5a9fbbd9283dc89d6fdd7ae7e9904a4305d8dcd8ca404ef075c0745ee135"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.itemID: \u0060Params.itemID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryLibraryItemTool.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd606dcc2f5caafa243ac08d6982035df8b50c620c62dc4f0174f5cb5a18662"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ReadCanvasImageContext.currentFileID: \u0060ReadCanvasImageContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadCanvasImageTool.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed75d60c0858ec47b9e912fcd9f14f7e8e4090bbe9292cfd0e469e94e2c3ef5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: RenameContext.currentFileID: \u0060RenameContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RenameFileTool.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e21eb28be1cab4469f732ca53219648e8bda935c7690ec603caca55388946c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.fileID: \u0060Params.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RenameFileTool.swift"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a78f0eb794c9d0b298d2671696e58a6b351beb1a4a59b124486c5a9be7903aa"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Output.fileID: \u0060Output.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RenameFileTool.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a9e837478468aee90b38b4fbdb09ed59ad63d0cbbc9bfdfbbdca0f2d2875889"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.fileID: \u0060Params.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"768d6e801a243bcffbc42e248972e99edfe9865b3530f63e9ae6c7d46b097eb3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Params.checkpointID: \u0060Params.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a877bb5844d01d9f22a6cbe4f06abe609eeac1e955dee7d5869e4ca27ce953"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: Resolution.fileID: \u0060Resolution.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/RestoreFileHistoryTool.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2197388b5279862669aca5079beee0e3590e75bc1b10599be30e899f15a8e0b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PendingQueueMessage.id: \u0060PendingQueueMessage.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PendingQueueView.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca2912fab7652358f25ded494b4e2ec47ab779db6c5dae367fa89485956c8cc"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ApplyResult.targetFileID: \u0060ApplyResult.targetFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"64275f052df266d8a83d79cfb13db3175e3ceeaf43a20742b5df937a80970a5c"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ApplyResult.preCheckpointID: \u0060ApplyResult.preCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df2e7a08f41b12f8f89376875ec4f28c34082c952945dcc9f7313186c350758"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ApplyResult.postCheckpointID: \u0060ApplyResult.postCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f7467988ae1cde4f1673493889874de6ae7e78ef59ceb172edd0fb9ab426099"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MutationCheckpointResult.preCheckpointID: \u0060MutationCheckpointResult.preCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"f19c9d90e8410cddfe7a361659352ad0d190517f36c0da8a4a7816544324c7b8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MutationCheckpointResult.postCheckpointID: \u0060MutationCheckpointResult.postCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"31ac9b3f8edff9586a4cf1f875920234b63c86611e1193b793a1b3e50c7f99a9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CreateFileRequest.groupID: \u0060CreateFileRequest.groupID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d83d6aaa291278fdb45d10ecbd50332670577e5eee6bafc8715d736388e2d36"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: CreateFileRequest.localFolderID: \u0060CreateFileRequest.localFolderID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"756097e90cfe9770fa6d89119a9d7dc9ae47d9b4dc61d672b74423cdf7458200"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ApplyRequestKey.targetFileID: \u0060ApplyRequestKey.targetFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de8bd38b9230d5069c2c897aab34e5bb6bcdbb5ded0a852a435a40fa12d10f8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ApplyRequestKey.clientUpdateID: \u0060ApplyRequestKey.clientUpdateID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"625a2373ef5489cbc7282363461136b8a4305249b55004c643a68cacadd15e74"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PublishedDiagram.appPreCheckpointID: \u0060PublishedDiagram.appPreCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d4bc0cbd9e5cd68ced4c99ae82afb3ccda65f5cb2aa44752875ba1c67cecf0"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PublishedDiagram.appPostCheckpointID: \u0060PublishedDiagram.appPostCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPOptimizedTools.swift"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddd9cac846fe47a0a7a8c5f8e7608d0a0c99260fa5de702f37e764418c4bd3c2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawMCPDiagramSession.id: \u0060ExcalidrawMCPDiagramSession.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPDiagramSessionStore.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c8d26798963839f272c9d55c6f2c018e42e3a66551bcedeef9bd3f6461016d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawMCPDiagramSession.checkpointID: \u0060ExcalidrawMCPDiagramSession.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPDiagramSessionStore.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e716ebc7c8aed6c8948fa7c245877f1392c25955f9a373b9b56e11a2a9f5b2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawMCPCheckpoint.id: \u0060ExcalidrawMCPCheckpoint.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Runtime/ExcalidrawMCPDiagramSessionStore.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b6206a069fdf90de4564a89ad6e1f4ab5a72ef5d90e0909a314c49548005dc2"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawMCPCheckpointNotFoundError.id: \u0060ExcalidrawMCPCheckpointNotFoundError.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamElementResolver.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1195dce748d80f1a4a90bc1c363498997f4e7f5fa072fb20f4e3fc98349a2501"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExtractedElements.restoreCheckpointID: \u0060ExtractedElements.restoreCheckpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamElementResolver.swift"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"b02acda9f883883918887217caa6aa2f6e8a16bb18d59ae6f871fa089c3c7670"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PublishedDiagram.checkpointID: \u0060PublishedDiagram.checkpointID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/UpstreamCompat/ExcalidrawMCPUpstreamToolHandler.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1d2dc71d7eb6dbd05f55e3847a04356d946fabb373996be0fc7d85b889c9c90"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawMediaFileDecodeError.fileID: \u0060ExcalidrawMediaFileDecodeError.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BMediaFileTypes.swift"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef45b4d78d0ade63b23d561eaaf7a48b7a5d1f4f24dcf41d2ffceb2c0ce0d879"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SearchResult.elementId: \u0060SearchResult.elementId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BSearch.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"43467eed86240fd1a8af4a43234d82549da9a04212de3c274305f6d03f07157f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: SearchResult.id: \u0060SearchResult.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BSearch.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf536dd124de90e2acfe4ee7445d3c36ca0a6a4ceb6f594c0fe74ac2dec5584"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MathSnippet.id: \u0060MathSnippet.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputTypes.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0ce5c383b559d7c55d8c9c1a0d893d1aafe2e05ea090f040b0033fdf3f8c07"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MathFunctionExpression.id: \u0060MathFunctionExpression.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputTypes.swift"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc59bca590691b77048c2a0337d0792a9ea21901a97cf6eea160e60e44759a7b"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MathSnippetSection.id: \u0060MathSnippetSection.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputTypes.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3d7b86a756eb2a09fe6ce8c19e64774013c5c38dd51559aee987b59164299a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MathTemplate.id: \u0060MathTemplate.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MathInput/MathInputTypes.swift"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"14f1f8c5dca341b4d34346830bbe34463651456e76c8b5b9950e6ecb5c369529"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AdjustElementsContext.currentFileID: \u0060AdjustElementsContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c8c6c19d5c053293973e076aa309d2643ff5ad9b65dc092ba656aabab0186a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LatexInsertResult.elementId: \u0060LatexInsertResult.elementId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c3ed251ea933f8039012b6398ff103d215779b566ca1c61fd754e774d0ab64"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: UpdateOp.id: \u0060UpdateOp.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"d22ed2ba15cbf59cb455257c1fd4439cd4d4689aa845f84f23a7f2b6d50a5e3e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MoveOp.id: \u0060MoveOp.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdc2f27f7ea290e4b6c064508874027245c3a2ce36e8b0122fc1ce87960f0d39"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ResizeOp.id: \u0060ResizeOp.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1eb1d8e76f240e08554a566f0a9c7101bc4bc91b8588358009cfb81ad7cee5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: DeleteOp.id: \u0060DeleteOp.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"9169acaaaafdd7eb4af5e375ad90f3f513552d9f6b0daad768ec548d99918859"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ElementSkeleton.id: \u0060ElementSkeleton.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"413442495ba709565f844a8d234b53b3ed3f5f4c7b05733e7eab909bde9d8419"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ElementSkeleton.fromId: \u0060ElementSkeleton.fromId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bacad683afa59e8f0f16d86ab0b1fe57d9bb714e7e6d0518eecdf87b6357943"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ElementSkeleton.toId: \u0060ElementSkeleton.toId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":763}}}],"partialFingerprints":{"codehealthFindingId/v1":"003e256aadaac433f7a9d3d5ba6835c182e28c2ca1aa7223562e8aefecfda1d5"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ElementSkeleton.containerId: \u0060ElementSkeleton.containerId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"180cd54d373ae61b1cae14b7f814b9d3ce6cf5a162dbfbe85b118531c2de8299"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PlaceHint.relativeToId: \u0060PlaceHint.relativeToId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"1caac7916a63d4f1c99d7a2e8c7e1c0cd4426266939ca43d0155129c72f679c1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ParentBinding.parentID: \u0060ParentBinding.parentID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/AdjustElementsTool/AdjustElementsTool.swift"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b85e6aa647d9f7e244621cb5ce738863a313b2e2417ffb5e37efbb97fea6d8"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: MathContext.currentFileID: \u0060MathContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/InsertMathTool/InsertMathTool.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5789b0e4841c13d3a30f26233924ed640f7f2b0faca9d16429a0c5f247829a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: InsertMathToolOutput.elementId: \u0060InsertMathToolOutput.elementId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/InsertMathTool/InsertMathTool.swift"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"d07cd7639180948ecc1db1a95bc38614d216f553849964b7164b4adf2953bed9"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: InsertMathToolOutput.fileId: \u0060InsertMathToolOutput.fileId\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/InsertMathTool/InsertMathTool.swift"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"568a0dbb726a66c30300b1565acc47d0d2d25f1217c7e7c8be859d31ff069a6a"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: NavigateCanvasContext.currentFileID: \u0060NavigateCanvasContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/NavigateCanvasTool/NavigateCanvasTool.swift"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa4123a69ae505fd5cef91037791212e762edfcd2c110d772c96c704cec6755f"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ReadFileContext.currentFileID: \u0060ReadFileContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ReadFileTool/ReadFileTool.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e24552034734b57659ffa2d64836d7d737d20f1234f3dc8d5fc1460e471c514"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatRetryModelProfileUnavailableError.profileID: \u0060AIChatRetryModelProfileUnavailableError.profileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"d176d7308bf2a44215964f98efeff4d37e39021791253c864ccd15b371dc3824"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatRetryModelSelection.profileID: \u0060AIChatRetryModelSelection.profileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BActions.swift"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"af7d07ca5acab8021c7c9f37734e24e5847205c4239270814deaf3c762a88688"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ChatScrollRowModel.id: \u0060ChatScrollRowModel.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/ChatScrollRowModel.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec65b2f1ccdaf8c5fd9a0113cc46234460d9c4e9455bc252abb64e220cbcfa7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ChatAssistantLoadingSlot.id: \u0060ChatAssistantLoadingSlot.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/ChatScrollRowModel.swift"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d379055080ab914c6caad040421988be037bd222e6c25b042f9b1144e1afb4d"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: NativeChatRowSnapshot.id: \u0060NativeChatRowSnapshot.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/ChatScrollRowModel.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c3e1a92c4aecccd577fdbfe19fa064f529d8d99a78bce808e6364c91544bc4"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ChatMessageWindowState.scopeID: \u0060ChatMessageWindowState.scopeID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/ChatScrollRowModel.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd4a0ce7ca2320a52c439d7a43adaaef9d4fb238b6b8794bce09a6c3440ca77"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ChatMessageWindowState.oldestLoadedGroupID: \u0060ChatMessageWindowState.oldestLoadedGroupID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/ChatScrollRowModel.swift"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1c8514bd5d9caf5fb9b398a941923a34f0353a0e8ab48c996bfd5018800cff"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ChatTableCellView.rowID: \u0060ChatTableCellView.rowID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2340eeeb14841a0a654a894b69a409e62568c06410181e4962fabb4a2f0164"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AssistantRoundTableItem.id: \u0060AssistantRoundTableItem.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"163abea09106a690ed8e24800aa5d09ffcbb3530889d634fe422d704dcf86afa"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AssistantRoundTableAction.id: \u0060AssistantRoundTableAction.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e979bdad08d62d759e3c07b88d1b3bad5d00325ee263aa6a337d1cbf43fd1fd"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AssistantRoundTableAction.sourceID: \u0060AssistantRoundTableAction.sourceID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b20f141f692358c9b19cc5ed1329e5053c5911fee6502dbcc9cbcac51e6ca8e"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawModelProfileOption.profileID: \u0060ExcalidrawModelProfileOption.profileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/ExcalidrawModelProfileOption.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"f57c9e7b43a8537845cca3f6b8b1ec4b60dbe0bbd86732d053d473418f0bd2d3"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawModelProfileOption.id: \u0060ExcalidrawModelProfileOption.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/ExcalidrawModelProfileOption.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"207956a570c3602824d2586a3b70c55347107c1c78d45ecdc6b025e205b53bb1"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: PendingPastedImage.id: \u0060PendingPastedImage.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BImagePaste.swift"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e628335b3d703bf5558c71caf3a7a7e8221b4fc5498ed4cd6411a44e93889a7"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatImageAttachmentReference.id: \u0060AIChatImageAttachmentReference.id\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BImagePaste.swift"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b21d3e4da62449a884e3d81c37bf0afafb03eac9b93dce8fe78e7bd90c9c465"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: ExcalidrawChatInvocationContext.currentFileID: \u0060ExcalidrawChatInvocationContext.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b700c30a3af125cf628547fdb7fa9a448f132c51089fe7629938d1a1b536427"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: AIChatInvocationPlan.currentFileID: \u0060AIChatInvocationPlan.currentFileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView.swift"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a633e33226d6e394a40303a5ff72fae7e220627b997564cbaea15b5f6ccdf97"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: FileCheckpoint.fileID: \u0060FileCheckpoint.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/FileCheckpoint\u002BExtension.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"db2fc3201dc5eb0636e1f0c3f53fda5b8edc1f8dfe46b526637104173afeaa30"}},{"ruleId":"DM2","level":"error","message":{"text":"Raw-primitive id despite a typed-id idiom: LocalFileCheckpoint.fileID: \u0060LocalFileCheckpoint.fileID\u0060 is a raw primitive id while the repo already defines typed-id wrappers \u2014 an inconsistently-adopted typed-id idiom. Give this identity its own typed id so it can\u0027t be confused with another entity\u0027s id or a plain value."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/FileHistory/FileCheckpointRepresentable.swift"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"574d4898c4dcce779031626395590281d6416b19a6f5bcfd60fca995cbe031c2"}},{"ruleId":"DM4","level":"error","message":{"text":"Anemic domain model: String: \u0060String\u0060 is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) \u2014 the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/String\u002BExtension.swift"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebc56e3b98ec6f4bcadda567d4bdb2994fdf5996da75316f15f89de6328f2ba1"}},{"ruleId":"DM4","level":"error","message":{"text":"Anemic domain model: Group: \u0060Group\u0060 is a data-only reference entity whose behaviour is DELEGATED to a foreign utility (static methods that take it as their first parameter and hold its logic) \u2014 the anemic domain model. Move the behaviour onto the entity so it enforces its own invariants rather than being driven from outside."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Group\u002BPersistence.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b77109643a98352d81e99ff659c9e612c2b9f1362ff039e86b9bbcf12a5ea6d"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!animated || hoverSuppressed || !hoverAnimationsEnabled\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift, ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cdaa7816966c0d4b415b64c9afc1ad0ba1feed53020b44736211a75fe1a39ae"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!hasActiveFileForAIAccessControl || !canToggleAIFileAccess\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BActionBar.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BCompactIOSFloatingInput.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BActionBar.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"87f83a776c1fa4c346ad14077f4d8908ebdd351fe61725ad3296302d60398178"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!isAutomatic || !isSilentAutomaticUnlockError(error)\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift, ExcalidrawZ/Settings/SecuritySettingsView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/LockedFileUnlockView.swift"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e56b3e58da82b4941312e6b46c7fdc0963764365cc13317f7b7b2386440abad"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!isStreaming || (!hasFinalCall \u0026\u0026 hasToolCallsStarted \u0026\u0026 !text.isEmpty)\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundTableRows.swift"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"799bfcb3f6ab3e0da579d71fdd1b0c524543b01135a26f3d4af0b2a65c89cc9c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!suppressed \u0026\u0026 pointerHoverState.isInside\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift, ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef6ea320f9a9a0f6a78a72d62144adc6439e89d71f9c9095092516500eccb51"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060$0.providerID == account.providerID \u0026\u0026 $0.accountID == account.id\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/Persistence/CloudStorage/CloudStorageConnectionStore.swift, ExcalidrawZ/Persistence/CloudStorage/CloudStorageSyncService.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageConnectionStore.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"342998a5bfb9fbe62c97888e38fc7df1b16fc457d4c11bf2f462f055d8e8ba08"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(isStreaming \u0026\u0026 isPinnedToBottom.wrappedValue) || isProgrammaticScrollPendingToBottom\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3d381ecefce744159de6d5152caebf37530e0143b3a4586dc9643c93d102e5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060NSEvent.modifierFlags.contains(.command) || NSEvent.modifierFlags.contains(.shift)\u0060 appears character-identically in 4 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Home/TemporarayFilesHome/TemporaryFilesHomeView.swift, ExcalidrawZ/Sidebar/GroupListView.swift, ExcalidrawZ/Sidebar/Local/LocalFilesListView.swift, ExcalidrawZ/Sidebar/Temporary/TemporaryFileListView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/TemporarayFilesHome/TemporaryFilesHomeView.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"b335b5661db57c13eaa6368fc7d656bf6a86e46c66534f2e757f20e1666c0565"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060adaptsToDarkMode \u0026\u0026 colorScheme == .dark\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ColorPicker/ColorButton.swift, ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ColorPicker/ColorButtonGroup.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/DrawingSettingsPanel/ColorPicker/ColorButton.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"80872746871744950da28ea5f155fe3e56c55a7a81b91b00b8d31a01302b1628"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060attachedWebView !== webView || webView.superview !== self\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift, ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationWebView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawWebView.swift"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fd2c4b12f10484a998d4aefaf5be52d98b104b4c86d4edbafc9fbc3f64bb0b6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060compactAIChatIsGenerating || layoutState.isCompactAIChatReplyTickerVisible || layoutState.isCompactAIChatReplyStartPending\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatEditorOverlays.swift, ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatEditorOverlays.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"46eb5d04b32c6aa73a28ac9d393f56b81593a412816a1ee08c94a0c8a880f79a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060content.role == .assistant \u0026\u0026 streamingMessageIDs.contains(content.id)\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/Messages/AssistantRoundView.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/StaticGroupsView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView\u002BMessagePresentation.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"65419f9c08b77b303bf63f9178c7909092e0b9d20d7a840ce37c1f3ed2f1530c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060disableInteration || !fileHomeItemTransitionState.canShowExcalidrawCanvas\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactExcalidrawHomeView.swift, ExcalidrawZ/ContentView\u002B/Detail/Home/ExcalidrawHomeView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/CompactIOS/CompactExcalidrawHomeView.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"41aee37613ad012a445f997d424006564078900dde3e2cdc7dc226b6e2606caf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060docHeight \u003C= visibleHeight || visibleMaxY \u003E= docHeight - pinThreshold\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatStackView.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatTableView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/ChatScrollView/NativeChatScrollView.swift"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"558b46500e642437a24d12531b8c3ca9b104af6ddd87904ed7006abebea3d466"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060fileState.isAIChatConversationLoading || fileState.currentActiveFileIsInTrash\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift, ExcalidrawZ/SidebarTrailing/AIChat/AIChatIslandView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce14a26f5eddfc8fa5d7c19ba0e888e00e2bdc3080a312098e630bec015037db"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060fileType == .excalidrawPNG || fileType == .excalidrawSVG\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift, ExcalidrawZ/Sidebar/Local/LocalFileRowView.swift, ExcalidrawZ/Store/FileState.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be6fc9970c8598d9808b3e4ffe6062da1030635620a1b0565cb91481c05c8b7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hasActiveFileForAIAccessControl \u0026\u0026 canToggleAIFileAccess\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BActionBar.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BCompactIOSFloatingInput.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/components/PromptInput/PromptInputView\u002BActionBar.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"853bca0e3d994bdf803ca4d205a76381d233f8df8eba326267eb3eef9696d22f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hoverAnimationsEnabled \u0026\u0026 !hoverSuppressed\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/Sidebar/GroupListView.swift, ExcalidrawZ/Sidebar/LinkedStorageSidebarSection.swift, ExcalidrawZ/Sidebar/components/SidebarRowModifier.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupListView.swift"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a075a6cf36f8955e61c6033dae124672dd361b6e8e12b6d5749c3851b491fb3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hoverEffectsEnabled \u0026\u0026 !hoverSuppressed \u0026\u0026 isHovered\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift, ExcalidrawZ/ContentView\u002B/Detail/Components/HomeFolderItemView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Components/FileHomeItemView.swift"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"6144725f540d3d60ed896069fd85e56c81394a9f039d3ee15da6be0439a05eb4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isUnlocking || !systemUnlockAvailability.isAvailable\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/Settings/BackupsSettings/BackupLockedPreviewView.swift, ExcalidrawZ/Settings/SecuritySettingsView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/BackupsSettings/BackupLockedPreviewView.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"af20acb7cd021a58226963fb6e6b84e7585b3d8bf8ea0eef8f562a08c5ea0127"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060layoutState.isInspectorPresented \u0026\u0026 layoutState.activeInspectorTab == tab\u0060 appears character-identically in 3 files \u2014 ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift, ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawToolbar.swift, ExcalidrawZ/SidebarTrailing/ExcalidrawTrailingControls.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/CompactExcalidrawBottomToolbarContent.swift"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"f302975dbd3f96619f913d4e553b9e2fe7ff2a3507559330891e37b9df4a0cf5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060llmState.pendingApprovalRequest != nil || fileState.isAIChatConversationLoading || fileState.currentActiveFileIsInTrash\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift, ExcalidrawZ/SidebarTrailing/AIChat/components/AIChatView/AIChatView.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/CompactAIChatInputOverlay.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"f816e749e64c33baaea636713efd7fc18acf4b7a17cd687f9d566eaaa8a5ccc3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060operation == .createFile || operation == .createFolder\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift, ExcalidrawZ/Persistence/CloudStorage/WebDAV/WebDAVClient.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Dropbox/DropboxAPIClient.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e748639e249d4536df9cc2bbd0bf816f0d556ddcb65e56eab9b616312ddf6c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060preCheckpointID != nil || postCheckpointID != nil\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift, ExcalidrawZ/Utils/MCP/Optimized/ExcalidrawMCPLLMCoreToolAdapter.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf85b016415ecb99ee051fe8158f90f6d97708701ebd839e9fc969c69dd86cec"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060preparingProviderID != nil || !connections.connectingProviderIDs.isEmpty\u0060 appears character-identically in 2 files \u2014 ExcalidrawZ/Sidebar/LinkedStorageAddMenu.swift, ExcalidrawZ/Sidebar/LinkedStorageSidebarSection.swift. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/LinkedStorageAddMenu.swift"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"b23f1a454f4bb9b14098f148406c41a5c82b533f3b77334b4b537cbb6280f1c4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"bed7ecb939448c9da301b1766b5056a514ab042ce1a3d81306dc4953e17b99f5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/Utils.swift"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b20481c3392fc02c87ad180e201ddf0f28fb89200ed0596eeae332ade6ab85"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/MCP/Bridge/ExcalidrawMCPAppBridge.swift"},"region":{"startLine":1647}}}],"partialFingerprints":{"codehealthFindingId/v1":"185b280df531c0745b732f7d396d872a4cd865365980c682aff2a888bf7038c8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/FileSyncCoordinator/FolderMonitor.swift"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"4823d13ae1a0e89f073267a9dde71f7cdff01156cb0ee3b1ff288b823cbddc6b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Utils/FileSyncCoordinator/LocalFolder\u002BFileSyncCoordinator.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"076a01466d38a1d4163b4928fa25dba0843515c3514a58c1981b78a3e55bd625"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AIChatState.swift"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdca99d5474f1972f0ca7ed0583d94c6eca2bbaf2dfeb1223b997267466ed617"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/AppPreference.swift"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ceed70dd2a63ab134d7299814d3c06326ad4e2fccf047ff4417d2c29e2150d8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/FileState.swift"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"af28963c361cb9392967a47765f45be5f222851770c9938add6fe4e23ea9769b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/ToolState.swift"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdfa30e89918f6804b4bc43b0213005d29223123504c8293c01984b0e6cc0424"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Store/ToolState.swift"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"74fad1089922eefad473816d64c3f7e61c07940603462829051beb975825d92b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/Search/SearchInspectorContent.swift"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"decaf8de8b6359aac7ccbe1e400b046350aa92afb06139a4035fe83c0588e15b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/ListAllFilesTool.swift"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3724bac882df12463ab925cf5e3fd49571d2cbe148501e2e0db3357906be59"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/SidebarTrailing/AIChat/Tools/QueryFileHistoryTool.swift"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"4890d4e6d4ab4c7ba56376dc6d9b4854a2028110b0f30f659bc3303ee85c5502"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/GroupRowView\u002BDragMove.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"723520f75a0ba679f7d6df488fa763b9d381cb86c87c07389a8de5341e06c66a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/FileRepository\u002BLockedContent.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"86aa9a1462d02e01f8c061084a684515f474c74986d6e78d1bb0ffdee97b21ab"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"03487a4e5deb2cf627272027adb9c9f03cc49efb80b0c9a0b717246d44536837"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Repository/MediaCleanupCoordinator.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e22537903a37717c05a816cc48ad4315d9e2abe50140522e0ea25e8c61385c6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/Encryption/LockedContentUnlockSession.swift"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc74211df3c2e19bc41bf0ac9e6392bbe8d6ffd26457c2e3dab698749750f917"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/CloudStorageSyncService.swift"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ef97fd1cf2defeb64ecd15bc4674097cac49786eab3f03d1b1ae07e6677fc8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/OneDrive/OneDriveCloudStorageProvider.swift"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bb0babb4f19fe662837b8b7bd04d732230282230e1e12f51a9164d19482e66c"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Persistence/CloudStorage/Box/BoxCloudStorageProvider.swift"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c906fff0ca8fab9a94d222dede11cbe96699b2dd8467972c0dabba8c217fb15"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Models/ExcalidrawFile/ExcalidrawFile\u002BDocument.swift"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde3157ec8c8311048bcfdc207676350790e06744be3c0c8671bd88f3f67f779"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawImageDecoder.swift"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7873b8c975f15a68b84218f27bc62560f291a6ba1588d044059d36f13af2fad"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawPNGDecoder.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"40689ce493d640cbb794fe200d756bcb8e883791d69c60bf6c318f05dba832d3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Extensions/Excalidraw\u002BImage/ExcalidrawSVGDecoder.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c4cfd28e21bff2a1e68c57a662b15233d7cbcee7947367ca43f2b683e47f5e"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/components/FileCoverDiskCache.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"f915584ed430a919edaaeb6554ccc3d61a6d3fffac8fefd1b6b6aa5ea8411275"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/ExcalidrawEditorToolbarModifier.swift"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae487bb272a2840eb756b7aee717b05784c01ed7449cafb1b643fe10a7d7ee84"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Toolbar/components/MermaidInputSheetView.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"0390c41facbf6fbffe6331fd11f7a93fc9e4d1a0ffd0af50cf03ed1d022175c3"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd248ef384ff056fef73ca8f9031dafa9b7e7fac71f5842022f91341a5ed35e7"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab2e981d00715a87ac23a0fa8bdf4416fb9423d890c3f001099355699e36a45"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/ScreenAnnotation/ScreenAnnotationView.swift"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"603df03bef3f60a17b3f8f1d5e26387e68e1ca7df643bb491ea982bbac359e04"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentAppStateSnapshotSaver.swift"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf8b96566a970076b5684a07c95925684a7166e8cc6ed16e690ac55f3bff0b6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentContentSnapshotScheduler.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e13fd64bf580752ff783aa6696734f2493827350b0dbf04d87cd0edc2cdfc3b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/Snapshot/ExcalidrawDocumentProgrammaticSnapshotCommitter.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"78437675d41bb5087cfc6fba583d44d297243a88cabb96a8bb7108cef4901b0d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BExportHelpers.swift"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"756e895e45c8827d2d472006fb9224f1789eba5d4739fb27fd9e9051126333b6"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCore/Helpers/ExcalidrawCore\u002BSaveStream.swift"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"addc1a0cb3d2157b73c3e595935c14da34653a93e0a2752423540bfad5f660da"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BFileStatusObserver.swift"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0b624185865a303757758f85bc959234d66af1805088ba3ad7a0a2b40ddfff"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/ExcalidrawEditor\u002BiOSSync.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"8deccc9ced472f6241778896b9894430968a3d998703f787a12d424942f1b76b"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Editor/IndicatorOverlay.swift"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3a5aa75ede3c1e1d9e74710c818c53c20537d796047f660cf5575c49d016e4"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Debug/DebugInfoView.swift"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ffed6c14c138ddf5cce283fb301256d73530981cd94cab33c93189ab689fa1a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ContentView\u002B/Detail/Home/HomeView.swift"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f1fa02a7ceef893ba25d59bc4e35a2205d92e10988ec7af037d7634eaf4469f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060addedFonts\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). 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 at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Settings/FontsSettingsView.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a354b1483c4f1e8b7412ff0c34b565758998d0c777924452d39ae4d63e4145a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060addedFonts\u0060 turns every thrown error into \u0060[]\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). 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 at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawCanvasView.swift"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"8922af6a3b3c9831e0ae7b9ee291ca8a45c7fdf870c6d59b634f58a64883f344"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060previewRevision\u0060 turns every thrown error into \u0060\u0022none\u0022\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). 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 at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/ExcalidrawView/Engine/ExcalidrawViewportStateStore.swift"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cca7cd69e538400e26fd325904aeee565bb8ffef46c1cb2661a392e1466aeb4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060filesCount\u0060 turns every thrown error into \u00600\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). 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 at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MoveToGroupMenu.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3f6f32b32c060305897e5d8df4931e7b32a152a4d7135501e1986dc6da161c7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060subgroupsCount\u0060 turns every thrown error into \u00600\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the error or let it propagate (\u0060throws\u0060). 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 at the \u0060catch\u0060, \u0060guard\u0060 or \u0060??\u0060, or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"ExcalidrawZ/Sidebar/components/MoveToGroupMenu.swift"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3fb33677dc8f4695286cf2f595f9817acf8655b3ad13e2b6db8c2f5e579137"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":0,"secretScannerRunsExcluded":0}}}]}