{"$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":"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"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":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"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":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","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-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"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":"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":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"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":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"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":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"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":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"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":"ClaudeCodeView.multiColorPreview (cyclomatic 82): ClaudeCodeView.multiColorPreview has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent 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 file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Claude Usage/Views/Settings/App/ClaudeCodeView.swift holds 3 of the 23 methods over the threshold \u2014 including the worst \u2014 and 89 of the 251 points over it (35%), 2.9\u00D7 the next-largest file (Claude Usage/Shared/Services/ClaudeAPIService.swift at 31). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbf530d29af44af64411de7a932c35e93eebfa9092bcaa522e7b3e10566f27ef"}},{"ruleId":"D1","level":"warning","message":{"text":"StatusBarUIManager.updateMultiProfileButtons (cyclomatic 43): StatusBarUIManager.updateMultiProfileButtons has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"02262f564a8a79e135338d0d68c08c4210632b179fbf94df17b4a387fab4dc32"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeAPIService.parseUsageResponse (cyclomatic 36): ClaudeAPIService.parseUsageResponse has cyclomatic complexity 36 (threshold 15). Of this number, 35 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c6432ac6ec3ec5c4d20de0de2ca7f56e8a75314738e743864a524cf5277dfa"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeView.generatePreview (cyclomatic 34): ClaudeCodeView.generatePreview 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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Claude Usage/Views/Settings/App/ClaudeCodeView.swift holds 3 of the 23 methods over the threshold \u2014 including the worst \u2014 and 89 of the 251 points over it (35%), 2.9\u00D7 the next-largest file (Claude Usage/Shared/Services/ClaudeAPIService.swift at 31). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e6bbb4a30e36480291e1eff68827aa5066b46e64351e1c75fae5563713dd52"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeSyncService.ensureFreshCredentials (cyclomatic 29): ClaudeCodeSyncService.ensureFreshCredentials has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d39b7b3b5d68074044cbe98221e08df4d67b787b95ae9b0dc32322508e14b8d"}},{"ruleId":"D1","level":"warning","message":{"text":"SmartUsageDashboard.body (cyclomatic 28): SmartUsageDashboard.body has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c57b2c38e950f838a35a006c9c830bfa02f09f94ec0fe09827c119fb64f6cc9"}},{"ruleId":"D1","level":"warning","message":{"text":"StatuslineService.updateConfiguration (cyclomatic 28): StatuslineService.updateConfiguration has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/StatuslineService.swift"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"4105f5ba28d6af53dbc005591f4e14a19e3761294eff7224401a365b65ba4867"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarManager.refreshUsage (cyclomatic 25): MenuBarManager.refreshUsage has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1201}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af1b0b933fbb7e71611fe4026794121b0f0ba82a013efea69e40c86f453bb7f"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeAPIService.fetchUsageData (cyclomatic 25): ClaudeAPIService.fetchUsageData has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"8efd38d629400ee56f51d695f35df9fcb29009a020cb62d5e31646ee1de79387"}},{"ruleId":"D1","level":"warning","message":{"text":"ProfileManager.activateProfile (cyclomatic 25): ProfileManager.activateProfile has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d0b56c9713f4350cbcfd367f3a22a037b0ff473c3787fd0cd782ac2dfed451"}},{"ruleId":"D1","level":"warning","message":{"text":"KeepAwakeHeaderButton.body (cyclomatic 22): KeepAwakeHeaderButton.body has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b7de3c4f50017ed2458f30852dedf8ddca6cb24560dfae4e2779ca0dffc1b24"}},{"ruleId":"D1","level":"warning","message":{"text":"NotchSessionStore.apply (cyclomatic 21): NotchSessionStore.apply 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":"Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e2e5fab6708234b18ce583587784837be2ac16b47c6a1e673738fdfad077b8"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarManager.refreshAllSelectedProfiles (cyclomatic 20): MenuBarManager.refreshAllSelectedProfiles 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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b05b95689e807b27eb28f00e61ae1eb72d079c25b63e9c907592cb7c70db998"}},{"ruleId":"D1","level":"warning","message":{"text":"KeepAwakeService.reconcile (cyclomatic 20): KeepAwakeService.reconcile has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/KeepAwakeService.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12bdc77571145c384fb885f7fedd2e9174102b0a095d3e11e41eb43367eec74"}},{"ruleId":"D1","level":"warning","message":{"text":"CLIAccountView.body (cyclomatic 20): CLIAccountView.body 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":"Claude Usage/Views/Settings/Credentials/CLIAccountView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c22c1e4a664f32c11e9ecd664b9efb7e3e027f895b4894d918ce7c1c9a4d309"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeSyncService.resyncBeforeSwitching (cyclomatic 19): ClaudeCodeSyncService.resyncBeforeSwitching 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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d5d66491d3f56ec8b1cea9dc96ac59b46eba938d2490cce977c66a908e1b48"}},{"ruleId":"D1","level":"warning","message":{"text":"APIBillingView.body (cyclomatic 19): APIBillingView.body has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7af7fdff5b71608b2f7eec35d4596634792e8d463aaf2698812589baa6c67145"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeView.body (cyclomatic 18): ClaudeCodeView.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. This file is where this pass\u0027s cyclomatic complexity CONCENTRATES: Claude Usage/Views/Settings/App/ClaudeCodeView.swift holds 3 of the 23 methods over the threshold \u2014 including the worst \u2014 and 89 of the 251 points over it (35%), 2.9\u00D7 the next-largest file (Claude Usage/Shared/Services/ClaudeAPIService.swift at 31). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef9cbef0245c7d24f181c5e12ebed95b7c92336c047381e773fe199de6fbc29"}},{"ruleId":"D1","level":"warning","message":{"text":"MenuBarManager.togglePopover (cyclomatic 17): MenuBarManager.togglePopover 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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"0df1f30f30a9e45a2f6e56dbfb4d1db7620fc315264d1cdf529832e4666152d8"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeSyncService.readSystemCredentials (cyclomatic 17): ClaudeCodeSyncService.readSystemCredentials 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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"0060acede1e57b5a97a1971c48b0cf5c3cace85b3285e43f52788b8b7818db86"}},{"ruleId":"D1","level":"warning","message":{"text":"NotchHookInstaller.checkStatus (cyclomatic 16): NotchHookInstaller.checkStatus 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":"Claude Usage/Shared/Services/NotchHUD/NotchHookInstaller.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ffba577f4b60abf02b4fcbc4e1aba56e319784cc16b33f2235f3c0efd67e079"}},{"ruleId":"D1","level":"warning","message":{"text":"PersonalUsageView.body (cyclomatic 16): PersonalUsageView.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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1afd09b8baa6d146633d25f3ea15f2a6311def48e983ae6fbd83628ec32719b"}},{"ruleId":"D1","level":"warning","message":{"text":"AppearanceSettingsView.body (cyclomatic 16): AppearanceSettingsView.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":"Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe1237cecef85a8f821bcc62f225b2a33fd37b918daa9b9de4fda6c81526443"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeView.multiColorPreview (cognitive 112): ClaudeCodeView.multiColorPreview has cognitive complexity 112 (threshold 15). Drivers by points: if/else 30 (48 pts), boolean chains 41, ternaries 14 (23 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"491f203b61cf2cb111cfd603b5e8dacb6e0681efdf750335d58ae8b33e8afcd0"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarUIManager.updateMultiProfileButtons (cognitive 94): StatusBarUIManager.updateMultiProfileButtons has cognitive complexity 94 (threshold 15). Drivers by points: ternaries 23 (66 pts), if/else 11 (19 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 52). To reduce it, split the body into named stages: move each independent 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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"76edd416b43aa41a568c9cccbfd2157708cb9d618a94f946720a80e7e9ce082b"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPIService.parseUsageResponse (cognitive 76): ClaudeAPIService.parseUsageResponse has cognitive complexity 76 (threshold 15). Drivers by points: if/else 27 (66 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 41). Of this number, 75 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"f88c61a14454194c1c5d3cf035c8236252bc5da10bb38f958a72208bdd09a768"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeView.generatePreview (cognitive 62): ClaudeCodeView.generatePreview has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (33 pts), ternaries 9 (23 pts), boolean chains 6 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe00e8db840b6990df4abf75bd5ff26c1a1e153da8862b3674f3d083369759a"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeSyncService.ensureFreshCredentials (cognitive 57): ClaudeCodeSyncService.ensureFreshCredentials has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (36 pts), error handling 5 (16 pts), boolean chains 5 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"00903f2a4300200af751803307126047c30874eb7d5dea3a979b5805d7526853"}},{"ruleId":"D2","level":"warning","message":{"text":"NotchHookInstaller.checkStatus (cognitive 41): NotchHookInstaller.checkStatus has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 3 (9 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/NotchHUD/NotchHookInstaller.swift"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"dddb0c93e46cbfd2eb4b8bb0c7a34850448e99b783844db5bf18bf84cd0b49a0"}},{"ruleId":"D2","level":"warning","message":{"text":"CLIAccountView.body (cognitive 40): CLIAccountView.body has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), ternaries 4 (8 pts), boolean chains 3 (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":"Claude Usage/Views/Settings/Credentials/CLIAccountView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"8904e04711599fb5f040d157f8eae3afb11c131e877cf686895d2bae7d761fd0"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarManager.refreshAllSelectedProfiles (cognitive 39): MenuBarManager.refreshAllSelectedProfiles has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (27 pts), error handling 3 (6 pts), boolean chains 5, loops 1 (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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fef3a1336e65c173c8ae4c3315894d667a91a1e5df1b993270dedf73f9dce5"}},{"ruleId":"D2","level":"warning","message":{"text":"ProfileManager.activateProfile (cognitive 39): ProfileManager.activateProfile has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (22 pts), error handling 5 (12 pts), boolean chains 5 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"9da55c982d63b7964e144abf316b30182dfc2e4b9eadb637e9759529dde7a793"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPIService.fetchUsageData (cognitive 38): ClaudeAPIService.fetchUsageData has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 5 (13 pts), boolean chains 8, error handling 1 (2 pts), match/switch 1 (nesting depth added 16). 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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"68e5fb21e5ae379a6732eea8c91b09696a5f53d177ef43be359bafd1e5757d28"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarManager.refreshUsage (cognitive 37): MenuBarManager.refreshUsage has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 7, error handling 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1201}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb82feb8f8a5abae299c4dbe05a81b5122de39cb783e74e10471a97b50078466"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPIService.fetchAPIUsageData (cognitive 35): ClaudeAPIService.fetchAPIUsageData has cognitive complexity 35 (threshold 15). Drivers by points: loops 6 (21 pts), if/else 5 (10 pts), error handling 2 (3 pts), ternaries 1 (nesting depth added 21). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"682c98813c7387ea282b035879ce158837b7016dd3c3f994a30feb244f85dad7"}},{"ruleId":"D2","level":"warning","message":{"text":"SmartUsageDashboard.body (cognitive 33): SmartUsageDashboard.body has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 9, ternaries 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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"956e38f3f547a1727bedfbe32d2f12105afa494adc2467eb0d8b17aad561780b"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeView.body (cognitive 29): ClaudeCodeView.body has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 5 (8 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f4ad3e223659aa645b21261b307413abfcdc9d4906062fa83808a16df5e6a0a"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoStartSessionService.checkProfile (cognitive 26): AutoStartSessionService.checkProfile has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (20 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 13). 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":"Claude Usage/Shared/Services/AutoStartSessionService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"487f93771e93534873da78da0fdf6813232917a8092dc1e093afbf1b3f19213c"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarManager.togglePopover (cognitive 25): MenuBarManager.togglePopover has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6 (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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"966019a2fe8ba237a4e98d00adbc1def5042d8a37fb139e9117bc4591fe46786"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeSyncService.resyncBeforeSwitching (cognitive 25): ClaudeCodeSyncService.resyncBeforeSwitching has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 6, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"e44117e7e5fa9434a625f4a8f68c84a55ca1be399ed94130e5b528f4395a1389"}},{"ruleId":"D2","level":"warning","message":{"text":"StatuslineService.updateConfiguration (cognitive 24): StatuslineService.updateConfiguration has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 23, match/switch 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":"Claude Usage/Shared/Services/StatuslineService.swift"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"5116b88fadce1a31a24a4a3bd335433adb28816415faacf4ce318f986f9321ba"}},{"ruleId":"D2","level":"warning","message":{"text":"KeepAwakeHeaderButton.body (cognitive 23): KeepAwakeHeaderButton.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 7. 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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"7165cc676ec9c93454493e3d5baf1b479b71b8c0fae408bf8c02eb822e96f4cf"}},{"ruleId":"D2","level":"warning","message":{"text":"KeepAwakeService.reconcile (cognitive 23): KeepAwakeService.reconcile has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 12, if/else 7 (10 pts), ternaries 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":"Claude Usage/Shared/Services/KeepAwakeService.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c80a598531b092b3a2eaa2f1920dfe8449075fbe02a43810f57c98a0995ee94"}},{"ruleId":"D2","level":"warning","message":{"text":"APIBillingView.body (cognitive 23): APIBillingView.body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 6 (8 pts), boolean chains 1, match/switch 1 (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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa7afbcae72bde02410e50f5df5600beb2cb07c2142cd6f669e3691470379f8"}},{"ruleId":"D2","level":"warning","message":{"text":"ProfileStore.loadProfiles (cognitive 22): ProfileStore.loadProfiles has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 1 (2 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":"Claude Usage/Shared/Storage/ProfileStore.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"60af4a26ee72b59462128a91b3221fc5db809f6374d108a51c39a0a3ae9d8703"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarManager.setup (cognitive 21): MenuBarManager.setup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (21 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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"289877e1ff9bc936a90d4383e0f7c5a53e56c2d923d36d2463dd4c6fa0b870d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeSyncService.readSystemCredentials (cognitive 20): ClaudeCodeSyncService.readSystemCredentials has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, 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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1bcca942e50e32957ade4bf81e1b2e004d2a89eac96a3361ef76d92d59b9cfa"}},{"ruleId":"D2","level":"warning","message":{"text":"NotchSessionStore.apply (cognitive 20): NotchSessionStore.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, ternaries 2 (4 pts), match/switch 1 (nesting depth added 7). 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":"Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ada09c1489b3f6e7159335131b722f102025d2c4a427ecbd728871f370ed54"}},{"ruleId":"D2","level":"warning","message":{"text":"MenuBarIconRenderer.getMetricData (cognitive 18): MenuBarIconRenderer.getMetricData has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 4 (9 pts), if/else 4 (6 pts), match/switch 2 (3 pts) (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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"28504a9933bd838cfc3b47114de962aa847764eb44f3de1e26891ae540851722"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarUIManager.updateMultiProfileConfiguration (cognitive 18): StatusBarUIManager.updateMultiProfileConfiguration has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"4850a92985adf0970cf7a4c564e82da0909a99941cc6728094ca992382bde7b3"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPIService.getAuthentication (cognitive 18): ClaudeAPIService.getAuthentication has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), error handling 2 (3 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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"aae2876a0a0e6dd973ebee34afe078f025edf972e4bf04c0da322409f3a8fd4c"}},{"ruleId":"D2","level":"warning","message":{"text":"HookHTTPParser.feed (cognitive 18): HookHTTPParser.feed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/NotchHUD/HookHTTPParser.swift"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"1567487891daeb698580a69e8ddbdda3d958ef71d61ae758eb06cc3e542d409d"}},{"ruleId":"D2","level":"warning","message":{"text":"AppearanceSettingsView.body (cognitive 17): AppearanceSettingsView.body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 4 (5 pts), boolean chains 2 (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":"Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a04858a5e0391dfafde384e63e5f413e2295da3b6f3c9ca1807b679605e284c"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusBarUIManager.updateConfiguration (cognitive 16): StatusBarUIManager.updateConfiguration has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, ternaries 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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2728fc0dc2da84884070a50840e77d7b22934b553c2fdf0faafa2e492ba92c3"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeAPIService.fetchAllOrganizations (cognitive 16): ClaudeAPIService.fetchAllOrganizations has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), error handling 3 (4 pts), loops 1 (3 pts), boolean chains 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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83d252865b99445f1cde274c7d050b9ae17f8e06e6a039cdab41aa32779a7cf"}},{"ruleId":"D2","level":"warning","message":{"text":"ProfileStore.saveProfiles (cognitive 16): ProfileStore.saveProfiles has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Storage/ProfileStore.swift"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c76e33b59d3753030ebcb6444cadcbee346fe9703dc8db37488ffbb1cef11e"}},{"ruleId":"D2","level":"warning","message":{"text":"PersonalUsageView.body (cognitive 16): PersonalUsageView.body has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (8 pts), if/else 6, 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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf637c673844cf964d25253226bd50aeebf135239892f991ea73e3305457b722"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SharedDataStore: TooManyMethods \u2014 105 methods. The bar is 30 methods; this is 75 over it, 3.50\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":"Claude Usage/Shared/Storage/SharedDataStore.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3379fe11270d73794d6e72a1b4ddfc5eb56c78b1402c156c1cad693315541e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MenuBarIconRenderer: ClassTooLong \u2014 1031 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 631 over it, 2.58\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"7311ef30150486d93fce01d2bf0bc02d3da11dd759b0abb5ad4811087bc74f64"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClaudeCodeView.body: MethodTooLong \u2014 body runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.48\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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c4cf5273db67b8aec12ebd13c4abb4444f65718e3777cd2d4ea105797da015"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MenuBarManager: ClassTooLong \u2014 975 significant lines (blank, comment-only and punctuation-only lines excluded), 63 methods. The bar is 400 significant lines; this is 575 over it, 2.44\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"de3c2c9593c33b53783e7ae4618030ab9932fa0a941b7e22f8b3bde6a5c04503"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBar/PopoverContentView.swift: FileTooLong \u2014 1212 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 712 over it, 2.42\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd87d3c5d0053db8cedd73d4fe54c692c7631146840eb9779f84b20405f32dd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/StatuslineService.swift: FileTooLong \u2014 1086 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 586 over it, 2.17\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":"Claude Usage/Shared/Services/StatuslineService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ae53fcb81c450151a7013be246da2a764d4c213f10d9f89acacd600d3669ab"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ManageProfilesView.body: MethodTooLong \u2014 body runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17\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":"Claude Usage/Views/Settings/App/ManageProfilesView.swift"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"412a08bc32c1252201c42c6d8e84829b9286240afed8e9dfaa00e9fc02c5929a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MenuBarManager: TooManyMethods \u2014 63 methods. The bar is 30 methods; this is 33 over it, 2.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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"3825ec7475d67b1bc916548f5fb2405b5f6626e20267ac7ae0c0f37460c84c3d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClaudeAPIService: ClassTooLong \u2014 829 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 429 over it, 2.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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"392b723129277721e34d31f2e94f0099f30d0af599f4d11cdfb873cdfa509dd8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBar/MenuBarIconRenderer.swift: FileTooLong \u2014 1032 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: MenuBarIconRenderer (11-1489). The bar is 500 significant lines; this is 532 over it, 2.06\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"323a5dd704634ad7271b3d62801b6ecf5efb954c0c706d71ea9050aae56df53a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: MenuBar/MenuBarManager.swift: FileTooLong \u2014 1028 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: MenuBarManager (5-1831). The bar is 500 significant lines; this is 528 over it, 2.06\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fd0f44b2f03f3265778d67a138a5bdd46548bad999b3fb045de904c9db81e64"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CLIAccountView.body: MethodTooLong \u2014 body runs 186 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 86 over it, 1.86\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":"Claude Usage/Views/Settings/Credentials/CLIAccountView.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"386d2a39a23c0b5a276e8c6fd705f73781a3eb1f4d8ca33bafe8c85da3f6079c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClaudeCodeView: ClassTooLong \u2014 727 significant lines (blank, comment-only and punctuation-only lines excluded), 13 methods. The bar is 400 significant lines; this is 327 over it, 1.82\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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe08774fe98bd2ed94d8e8f277cd09782ffdc41eeae1d3cc0f03453ff3638bd"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DataStore: TooManyMethods \u2014 52 methods. The bar is 30 methods; this is 22 over it, 1.73\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":"Claude Usage/Shared/Storage/DataStore.swift"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"e163488475447267cb400dfeb5f87a040c5e2f5e5b13fab125ac68c33ad33447"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ClaudeCodeSyncService: ClassTooLong \u2014 689 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 289 over it, 1.72\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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c505e9d174cd3110377e41cb549fb35b51370b2bed37c187c1695065810f48b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/ClaudeAPIService.swift: FileTooLong \u2014 830 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: ClaudeAPIService (4-1369). The bar is 500 significant lines; this is 330 over it, 1.66\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abccd195f9e4eb659ff454371e3b6ab67df660b52f54c071c74df329ebe4012d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GeneralSettingsView.body: MethodTooLong \u2014 body runs 157 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 57 over it, 1.57\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":"Claude Usage/Views/Settings/Profile/GeneralSettingsView.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"00542f0c27f5cb6a0301b58bd42ad4f7f460dd51aaac6643bfc830e3c65d1211"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/SetupWizardView.swift: FileTooLong \u2014 775 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 275 over it, 1.55\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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4851b96a06842939211eec549e554284fa8279deadf629d2bd68d5e8c8caf13c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: App/ClaudeCodeView.swift: FileTooLong \u2014 767 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: ClaudeCodeView (11-1081). The bar is 500 significant lines; this is 267 over it, 1.53\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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"433e4e15ab28e358d9034812606d729535de75a0c4a7e1841132fa743dcab6ca"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AppearanceSettingsView.body: MethodTooLong \u2014 body runs 144 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 44 over it, 1.44\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":"Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"414efd7647d22a83b6aa1244cba98583104cd1f038bcba01fd9afcb2c9255799"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Services/ClaudeCodeSyncService.swift: FileTooLong \u2014 713 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: ClaudeCodeSyncService (13-1344). The bar is 500 significant lines; this is 213 over it, 1.43\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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c6d8d9293ff829138af52402361340b3f35e3c21b8c9597a758e5ecc66c57c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Views/SettingsView.swift: FileTooLong \u2014 700 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 200 over it, 1.40\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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1600ae60fba2498678a0546ac7bbdb4f04a3291cca539cfbc80aff2befb62c47"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: StatusBarUIManager.updateMultiProfileButtons: MethodTooLong \u2014 updateMultiProfileButtons runs 138 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ffdabfaee0fed502284b6da54917a9d31c48be73f16b6d16348ee6605ed43f"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ClaudeCodeSyncService: TooManyMethods \u2014 40 methods. The bar is 30 methods; this is 10 over it, 1.33\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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"f20001a42b51bfdce183ea786320c79bb44ba437b34b968ba0bc71a2a72c62be"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AboutView.body: MethodTooLong \u2014 body 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":"Claude Usage/Views/Settings/App/AboutView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"66af0bd7782dff06085eb7c1004004aac0266e52cc68d3308110c543cf401667"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ClaudeUsageWidget/UsageWidgetViews.swift: FileTooLong \u2014 639 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 139 over it, 1.28\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":"ClaudeUsageWidget/UsageWidgetViews.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"743d89c5829d6c39c5db9912f9a80ba2fdc93a56a398126554ee44b49e9ec4db"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SmartUsageDashboard.body: MethodTooLong \u2014 body runs 123 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"652a83181b9a6160a66cd3b8318682e5b48f8255b9562e87270115d937d6d17a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClaudeCodeView.multiColorPreview: MethodTooLong \u2014 multiColorPreview runs 122 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d46ae8232ed20364b04eb06d599f7a85f41af3f1787e37e23ce536e170bba9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: APIBillingView.body: MethodTooLong \u2014 body runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"875a9b6c397523cb0d64ae5743efa2f494ba8a30df4b1a7de5b31ccacc9617a6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: StatusBarUIManager: ClassTooLong \u2014 472 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 72 over it, 1.18\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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b69c0df1aa242b98b17be0c6568af93e769feb7d454db1d398946b6c8ac1a8b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClaudeAPIService.parseUsageResponse: MethodTooLong \u2014 parseUsageResponse runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b4f237f3fe62c74910a479ec8d02cccae9cf0a708c80f6ea82711394d65f27"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FeedbackPromptView.formContent: MethodTooLong \u2014 formContent 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":"Claude Usage/Views/FeedbackPromptView.swift"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8b3607f19f12fbc763712dd99f9c3957ae8b8328b210d2bcf7058c37283f01"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuBarManager.refreshUsage: MethodTooLong \u2014 refreshUsage runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1201}}}],"partialFingerprints":{"codehealthFindingId/v1":"7885a026e3e5ef95866afa537b95f883c91dbb728156633067b050d9c9c66320"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuBarIconRenderer.createConcentricIconWithLabel: MethodTooLong \u2014 createConcentricIconWithLabel 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":917}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab32cc490dbcf53b64c203ee415b95b7177310e93e7f1505d42937f4d01e51d9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuBarIconRenderer.createImage: MethodTooLong \u2014 createImage 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"a84ef25e5d908bfeb4e84eb1e43adea839dcf07111e19ed705ce3e7d0ef6d44d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuBarIconRenderer.getMetricData: MethodTooLong \u2014 getMetricData 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1c477d6433f3b8c07a39af8ce5110c05f452b7538bc0ad4ef64ba6065272165"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EnterKeyStepSetup.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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ee14bbf770fe271a3d28d6dbea954669e1b57de9521eef718bf4daad8bdee78"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MenuBarIconRenderer.createConcentricIcon: MethodTooLong \u2014 createConcentricIcon 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"306f5c7018bd69b67d065065a6d6935f015f042124bb5ea7c1dc4256d5c2c47d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Credentials/PersonalUsageView.swift: FileTooLong \u2014 503 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3 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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d17fb340ff83f1201aa21cd9626594a8f42c2ae4f9b43aceb76bd26c18559b"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (110 shared lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:42-214 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:41-185 \u2014 These two members are variants of one another: 110 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a8d25b4e0670bc0ca24f3d02ea0d976466724a5f102f16dbd891fc7c03bcfc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (109 shared lines): Claude Usage/MenuBar/MenuBarIconRenderer.swift:779-913 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:917-1057 \u2014 These two members are variants of one another: 109 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"317371750f0cc6dfa799996152d1222195c25fa7079b7dd4023884b3a5ffebb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (98 shared lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:282-413 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:256-387 \u2014 These two members are variants of one another: 98 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"389e76d3b47550f26d8b2d045fd1b1a0cf6d66c5d3aeb4ca324c9577bb66d421"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (97 shared lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:574-685 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:591-702 \u2014 These two members are variants of one another: 97 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4f4db2117c3aefc3e812ef692c6db7bd0a0284befa9ae1ab7b98fd475aa625"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (62 shared lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:445-563 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:460-580 \u2014 These two members are variants of one another: 62 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"b643e344559f89481416f4fbd4af5a18c5aff80dd6cfe294bedb40d7495467bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (41 shared lines): Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:16-97 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:32-169 \u2014 These two members are variants of one another: 41 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":"Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa229aa7e4c43f432c86122c5d2b5c91abeddd1c2d4e2a8a11b45cc4dceb216d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Claude Usage/MenuBar/PopoverContentView.swift:31-70 | Claude Usage/MenuBar/PopoverContentView.swift:72-87 | Claude Usage/Views/SettingsView.swift:10-47 | Claude Usage/Views/SettingsView.swift:49-63 | Claude Usage/Views/SettingsView.swift:67-104 | Claude Usage/Views/SettingsView.swift:106-120 \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"df06e398454b30e317846431766ee8ba775bb35ee810a8ff9b3d002e25a98cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:240-245 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:751-756 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:439-444 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:211-216 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:768-773 | Claude Usage/Views/SetupWizardView.swift:839-844 \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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed5080f42402a72bc9806f9df55bd091a12261be16500052304ff9ebb2ca5f27"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:389-414 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:416-452 | Claude Usage/Views/SetupWizardView.swift:507-532 | Claude Usage/Views/SetupWizardView.swift:534-570 | Claude Usage/Views/SetupWizardView.swift:778-837 \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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92dc8c4786822ccc82af6fb83c705985ee7736349f392611930d7afe8733393"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:880-888 | Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:890-898 | Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:914-925 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:428-436 \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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"a57e84d32be3449aba5af29236c9d768a79cd95ea293bb0c63842a059c6d4873"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): Claude Usage/Views/Settings/Components/UsageCharts.swift:71-150 | Claude Usage/Views/Settings/Components/UsageCharts.swift:194-274 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:238-345 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:462-592 \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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e55b2fd2f9b9bc15dab143870898d7d754f28337ea3c7508361f5120f94f68"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): Claude Usage/MenuBar/StatusBarUIManager.swift:75-123 | Claude Usage/MenuBar/StatusBarUIManager.swift:220-274 \u2014 These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c4e68ca08982e5f038e0c5ed5fbb443db2179b588e4bf3938ee6bf7f5d7671"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (58 corresponding lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:692-749 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:709-766 \u2014 These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca59de0104719e5931951b0ceac88621a702a90b0b4e4e7886010e6f3d28154"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:1688-1735 | Claude Usage/MenuBar/MenuBarManager.swift:1778-1824 \u2014 These two members are one piece of code written twice and then edited apart: 47 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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1688}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4ad5db71d8d5c652acb92be2e723a03e0b637e97208695872286e25b06a2ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:1512-1556 | Claude Usage/MenuBar/MenuBarManager.swift:1559-1599 \u2014 These two members are one piece of code written twice and then edited apart: 41 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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1512}}}],"partialFingerprints":{"codehealthFindingId/v1":"b696070c6511808665966cff905410509d977f51c72461984899134b0cb8b034"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:13-42 | Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:81-111 \u2014 These two members are one piece of code written twice and then edited apart: 30 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":"Claude Usage/Shared/Extensions/Color\u002BExtensions.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff17f0053ac4a42624f2be4462ab7edd3338eb02c177625072ccd909339e1f94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): Claude Usage/Views/SettingsView.swift:855-884 | Claude Usage/Views/SettingsView.swift:962-993 \u2014 These two members are one piece of code written twice and then edited apart: 30 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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b00608180472b8e683724e757b1b82859e90e3287d1e3b9a21806886331fbe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): Claude Usage/Views/Settings/Components/MetricIconCard.swift:144-179 | Claude Usage/Views/Settings/Components/MetricIconCard.swift:188-213 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Components/MetricIconCard.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f39f9b7c59ec8747d519b109d22f0d98a9dc59cb36fe828c8b719b67965b4af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): Claude Usage/Shared/Services/ProfileManager.swift:378-402 | Claude Usage/Shared/Services/ProfileManager.swift:405-429 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9062aa5ce367494886332d6b2fe462a6dc22b61d7e3618fd7cbd1b975b40d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:247-273 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:218-247 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"a679808137a996579256bc35cf32e7634e976a0405c06bd115f335b8752968e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): Claude Usage/Shared/Services/KeychainService.swift:103-128 | Claude Usage/Shared/Services/KeychainService.swift:413-433 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Services/KeychainService.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebd50e999646de3a82219edb1c881b98728a5bc41c83bcb2f60d02ad82cedda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:434-473 | Claude Usage/MenuBar/MenuBarManager.swift:1168-1199 \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"33caad5153803f36260038a9f4d6ec1d7b6feff8de076d8dd9e00dcc3d4763ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): Claude Usage/Views/Settings/App/ClaudeCodeView.swift:824-845 | Claude Usage/Views/Settings/App/ClaudeCodeView.swift:848-869 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"34a56f24c3a6dfb49af4bb3400c2e4d7d6ec087d26d2e72fbe66348847daa0ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:961-981 | Claude Usage/MenuBar/MenuBarManager.swift:985-1004 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":961}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b052a542515414ba7bab1a7c8c4cc76ac9b85be468fccaa18020bff87e7a2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): Claude Usage/Shared/Services/UsageHistoryService.swift:182-199 | Claude Usage/Shared/Services/UsageHistoryService.swift:202-218 | Claude Usage/Shared/Services/UsageHistoryService.swift:221-237 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/UsageHistoryService.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16e76c1dcd82a908ef734311fbf230fcc14d8c673807da8395926954daab01f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): Claude Usage/App/AppDelegate.swift:201-228 | Claude Usage/Shared/Services/ProfileManager.swift:577-610 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/App/AppDelegate.swift"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8e435aae46a76a8261d618d93f6b45cd4949e37b78bfa922ebd713325d00a70"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:45-58 | Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:61-74 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Extensions/Color\u002BExtensions.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f13d1123faeae32e714341849c784d052d787d1876cf347d02ac5d6eb5e5cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:1637-1665 | Claude Usage/MenuBar/WindowCoordinator.swift:108-133 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"556af27d6bb759673d695546518fe9b9aca207dd8a73ba94dc0cda77938563f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): Claude Usage/Shared/Services/ProfileManager.swift:434-450 | Claude Usage/Shared/Services/ProfileManager.swift:458-474 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"96755b1ee9c72ed7151a3e1d57a4d71d4c3aa16206378036778ef0971fd12562"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): Claude Usage/Views/Settings/Components/ThresholdIndicator.swift:14-32 | Claude Usage/Views/Settings/Profile/GeneralSettingsView.swift:336-358 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Components/ThresholdIndicator.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cfffb969a312fd7381356b23802be2c0988467ed2a305aefd854529b9ef286c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:35-51 | Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:54-69 | Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:72-87 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e80254ecbf91156656e10c945f8cfe2b29ed9142784b47f2adc5a9fee04f455"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Claude Usage/Shared/Models/MenuBarIconConfig.swift:317-339 | Claude Usage/Shared/Models/MenuBarIconConfig.swift:389-414 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Models/MenuBarIconConfig.swift"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c099fd7928eeafc993adc9862165788613610d9680a476502d28de3a1419bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:343-372 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:374-396 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Credentials/CLIAccountView.swift"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc2ab8c4e50c888175514406e41da4958e95af2c9a8503a6eba87357e89ad18"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift:103-118 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1207-1232 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"03624ac614bab4ac0cafb2c51a3c2ad51cfda33f9c3bedffd82f21146b9ae1c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): Claude Usage/MenuBar/PopoverContentView.swift:106-114 | Claude Usage/MenuBar/PopoverContentView.swift:493-502 | Claude Usage/MenuBar/PopoverContentView.swift:536-544 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a49eec28a424b748b2fa22814c47790e4d8c233b56c2c6c4533923a81feeee7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Claude Usage/MenuBar/PopoverContentView.swift:855-861 | Claude Usage/Views/Settings/App/KeepAwakeSettingsView.swift:284-290 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c41ada023d7ad0d53f3cd10918e07f869888f3c5e2f76713b5431901bba4472"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Claude Usage/Shared/Models/APIUsage.swift:66-74 | Claude Usage/Shared/Models/APIUsage.swift:152-159 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Models/APIUsage.swift"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c70d37b3567f71e5e54825344ecd627e3e844d3219f13797ef935d841101cc58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 12\u002B corresponding lines): Claude Usage/Shared/ErrorHandling/AppError.swift:245-256 | Claude Usage/Shared/ErrorHandling/AppError.swift:258-269 | Claude Usage/Shared/ErrorHandling/AppError.swift:273-284 | Claude Usage/Shared/ErrorHandling/AppError.swift:286-297 | Claude Usage/Shared/ErrorHandling/AppError.swift:301-312 | Claude Usage/Shared/ErrorHandling/AppError.swift:314-325 | Claude Usage/Shared/ErrorHandling/AppError.swift:327-338 \u2014 These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/ErrorHandling/AppError.swift"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"65d3f8430ada32feb1cacf8918ebd0b3d8ea5ef3e68e31a59bbb1580f74bf1ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Claude Usage/Views/Settings/App/ClaudeCodeView.swift:800-809 | Claude Usage/Views/Settings/App/ClaudeCodeView.swift:812-821 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1a97ac604920034a7b18aeab5f549700d9ba2c604682f8152d7e1ecbbd7acd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Claude Usage/Views/Settings/Components/UsageCharts.swift:55-63 | Claude Usage/Views/Settings/Components/UsageCharts.swift:178-186 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c176f965a09f71c7d6cfa1ed3efe51fc73b388055c5e4a16787066fd47048c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 11\u002B corresponding lines): Claude Usage/Shared/Services/ProfileManager.swift:484-494 | Claude Usage/Shared/Services/ProfileManager.swift:497-507 | Claude Usage/Shared/Services/ProfileManager.swift:510-520 | Claude Usage/Shared/Services/ProfileManager.swift:523-533 | Claude Usage/Shared/Services/ProfileManager.swift:536-546 | Claude Usage/Shared/Services/ProfileManager.swift:549-559 | Claude Usage/Shared/Services/ProfileManager.swift:562-572 \u2014 These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3dbfbe50a533b933d9554802fe3223b0542a1c783e5d0a0a0d4a0063d5139e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): Claude Usage/Shared/Storage/DataStore.swift:185-202 | Claude Usage/Shared/Storage/SharedDataStore.swift:500-517 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Storage/DataStore.swift"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4dab099c5bac1de5e68c33716addc41e2ad95b2f42cf678eed83d23610fbfbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:737-745 | Claude Usage/MenuBar/UsageRefreshCoordinator.swift:101-108 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f69bf5fd507292b8d02026630459e36742d372602de96a4ad5cad0f4d2c87d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): Claude Usage/MenuBar/PopoverContentView.swift:848-853 | Claude Usage/Views/Settings/App/KeepAwakeSettingsView.swift:277-282 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdfe29e23793f6e95c76eb7bed77f0022977e2fd09c60f2d6ba6de8c83d1924c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:408-432 | Claude Usage/MenuBar/WindowCoordinator.swift:23-32 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcf6541b7163a678eba2470aa83a05723d816047e0ee2ab16e053cafad8a8fa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:777-786 | Claude Usage/MenuBar/UsageRefreshCoordinator.swift:110-118 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b65fb3014288c43f2d245e34cc88f77e1c90c03845f00bf64694e9ee8c61446"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): Claude Usage/MenuBar/MenuBarManager.swift:669-679 | Claude Usage/MenuBar/WindowCoordinator.swift:167-173 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc2d09bd7b1a7c331f142093b79c8326494a7d8a498486590509851cdace18d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): Claude Usage/Views/Settings/Components/SettingsCard.swift:18-28 | Claude Usage/Views/Settings/Components/SettingsComponents.swift:18-26 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Components/SettingsCard.swift"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ef1cca080400052997cdff140ac4370435bcddf577ec5f80c877deb1758547f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Claude Usage/Shared/Models/MenuBarIconConfig.swift:78-87 | Claude Usage/Shared/Models/StatuslineColorMode.swift:24-35 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Models/MenuBarIconConfig.swift"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4fc4a15a47131934d026a1e08127fc3b6151ae3ded8f0b13c08ad21107e9a36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): Claude Usage/Shared/Models/MenuBarIconConfig.swift:100-109 | Claude Usage/Shared/Models/StatuslineColorMode.swift:50-61 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Shared/Models/MenuBarIconConfig.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"624bc5fbbc63c03d0ac899a9c5787db393610e7e70f5620d3f504a39a18255ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:235-238 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:206-209 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed61f10c2b92e20c539a8d411a9d2dc13a81230f662dde704fc55e59bfeea68a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (60 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:626-685 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:643-702 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:626\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"00f0b14f0b48db150091e1ca5eabb0f527d8f8aa53277a1db95d0fe01f837d67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (56 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:299-354 | Claude Usage/MenuBar/PopoverContentView.swift:375-430 \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 \u0060Claude Usage/MenuBar/PopoverContentView.swift:299\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"52626220218e849adeae2332d0ab9919d3772bd33ea3a3280b01920578f12964"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201344 lines \u00D7 5): Claude Usage/MenuBar/MenuBarIconRenderer.swift:637-642 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:851-894 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:896-898 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:995-1038 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1040-1042 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:637\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. 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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e6761c9ebeed2b1472e761beb6eb4d836c84e2d8d93ca93855e403903277be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42\u201344 lines \u00D7 2): Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:302-345 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:551-592 \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 \u0060Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:302\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":"Claude Usage/Views/Settings/Profile/UsageHistoryView.swift"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a3c37fdb919eba948bd3e375677811d9a4c38536bf1ec975ea009e5cdf0ada"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (46 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:804-849 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:948-993 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:804\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc98cb7db64f224e05a01e07d0955c2a6ef217091e5e7d83749a0ac6f3e9b40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:132-171 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:103-142 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:132\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1e6e291e58aec448107bfe60957f390155c7cc26e3bc985b1260e591f27d9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:517-556 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:532-571 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:517\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"8861873c9e89ed9554029dfa26bd53e21f34e5fd53ddb1bf4cc998e0ecb84e2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): Claude Usage/Views/Settings/Components/UsageCharts.swift:113-150 | Claude Usage/Views/Settings/Components/UsageCharts.swift:237-274 \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 \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:113\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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2454c860c99d5c0f460efa918e6fb7166050dd96e409ae4ad7f2ae65ca7213"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): Claude Usage/Shared/Storage/DataStore.swift:251-286 | Claude Usage/Shared/Storage/SharedDataStore.swift:561-596 \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":"Claude Usage/Shared/Storage/DataStore.swift"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"45316c0394758e820ad480e71b9e0af6372b27e59432307a6790f0e922413067"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201340 lines \u00D7 3): Claude Usage/MenuBar/PopoverContentView.swift:31-70 | Claude Usage/Views/SettingsView.swift:10-47 | Claude Usage/Views/SettingsView.swift:67-104 \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc7d423c32574fa8780a7ed7a2e05e6ac5f7822811ffc40e3799a797ffb06e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:100-130 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:71-101 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:100\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"78cbefa9cab29a20a85e44474772c8b9233b9ed1fb0d379ff2b99504ce1091ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): Claude Usage/Views/Settings/Components/UsageCharts.swift:71-99 | Claude Usage/Views/Settings/Components/UsageCharts.swift:194-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 \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:71\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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"96096a6b10d914e6df93d33d2195187213b73694aa93bbadc5bb25d0e6cdf0f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:384-413 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:358-387 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:384\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fb875b688e698d0545cb87f2f529fec61cfa03ee8606197f8afdc6b4837c21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:416-443 | Claude Usage/Views/SetupWizardView.swift:534-561 \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 \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4af244d7b154b583bd0df24e0de5df1aba134b8e13a5b86eafa9c44307ffc26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:182-208 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:153-179 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:182\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"c16686cdd85ac7584e94492a6697ace3a434e7d09ad55dc969d580c03271ae15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:312-334 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:286-308 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:312\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"37968759b7bce42b49c0472e2df24bb491c99276e8ffd727bab9e64098558c57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201321 lines \u00D7 4): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:396-414 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:432-452 | Claude Usage/Views/SetupWizardView.swift:514-532 | Claude Usage/Views/SetupWizardView.swift:550-570 \u2014 there are 4 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 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 \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:396\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2932b6c02a311236af8d9180a14219e2c3366734b6cffa16329ee148e00b309"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201321 lines \u00D7 2): Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift:103-116 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1207-1227 \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 \u0060Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift:103\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, \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:1230\u0060 calls \u0060logWarning\u0060 and \u0060Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift:117\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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BParsing.swift"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"03958227668a2a1be9e2df263a50bce7d8235876ffcb5db9586cefb0086cf57b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService.swift:1259-1279 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1308-1328 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:1259\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"35e96a612d6118d4885ed029a90b138c087e2c66291b3e95e94cd1aa95ded33b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): Claude Usage/Views/Settings/App/LanguageSettingsView.swift:53-72 | Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:77-96 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:146-165 \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 \u0060Claude Usage/Views/Settings/App/LanguageSettingsView.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 before the matched lines, \u0060Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:75\u0060 calls \u0060Text\u0060, \u0060font\u0060 and \u0060Claude Usage/Views/Settings/App/LanguageSettingsView.swift:52\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":"Claude Usage/Views/Settings/App/LanguageSettingsView.swift"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"df5f182a8b7fb61a54b37da21f77bb615481d05986e72481b5830d60a4c265f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Claude Usage/Shared/Models/ClaudeUsage.swift:107-126 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1181-1200 \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 \u0060Claude Usage/Shared/Models/ClaudeUsage.swift:107\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":"Claude Usage/Shared/Models/ClaudeUsage.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9854197058fa9a47c59103901b4865695e815d69ecbb812514033c310cc9c0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService.swift:352-371 | Claude Usage/Shared/Services/ClaudeAPIService.swift:666-685 \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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"74acd56e131cb3da8de01077983e430380db31571eaef355d71153bf5dd54b7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): Claude Usage/Views/SettingsView.swift:857-874 | Claude Usage/Views/SettingsView.swift:1003-1022 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060Claude Usage/Views/SettingsView.swift:856\u0060 calls \u0060Button\u0060 and \u0060Claude Usage/Views/SettingsView.swift:1002\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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"140c3ee145ef37cdf6c07d4007a1cdd9ab586c620213ae89b8fe1e90b478ea5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:578-595 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:595-612 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:578\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5eb3d0783be6f97a0fd0e2731a1e869e91a5fa94bf95600fff3523d5c142e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:282-299 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:520-537 \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 \u0060Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:282\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":"Claude Usage/Views/Settings/Profile/UsageHistoryView.swift"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"13160860d2fe775a1e60933a12563c5ad7272ada880df9d052c95323746d07ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:1101-1117 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1122-1138 \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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4bb12aa9d175f0b469e70a9756b62a4cd26eaa3dc4cad926ba78752e29dc64e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Claude Usage/MenuBar/MenuBarManager.swift:141-156 | Claude Usage/MenuBar/MenuBarManager.swift:443-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 \u0060Claude Usage/MenuBar/MenuBarManager.swift:141\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"613c547f1a5a2bada65b7df99a48df7247c92052a5a5a74a57f99c973eafdd37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Claude Usage/Views/Settings/Components/ThresholdIndicator.swift:14-30 | Claude Usage/Views/Settings/Profile/GeneralSettingsView.swift:336-352 \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 \u0060Claude Usage/Views/Settings/Components/ThresholdIndicator.swift:14\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, \u0060Claude Usage/Views/Settings/Profile/GeneralSettingsView.swift:354\u0060 calls \u0060Toggle\u0060, \u0060toggleStyle\u0060, \u0060controlSize\u0060 and \u0060Claude Usage/Views/Settings/Components/ThresholdIndicator.swift:31\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":"Claude Usage/Views/Settings/Components/ThresholdIndicator.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c419b2e080a8196e2cba8fd0b22bccfa1920a3b9408d06c146b40790a57c22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Claude Usage/Views/SetupWizardView.swift:152-168 | Claude Usage/Views/SetupWizardView.swift:1045-1060 \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 \u0060Claude Usage/Views/SetupWizardView.swift:152\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 \u006024\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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e5373115c79dc22b720293a06de291ae148c660b97b59f17ab0866d3f4ea7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): Claude Usage/MenuBar/MenuBarManager.swift:144-158 | Claude Usage/MenuBar/MenuBarManager.swift:446-461 | Claude Usage/MenuBar/MenuBarManager.swift:1175-1189 \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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2134c3de38e299f8ef264b486cc43ddc1dfd8338e25514ae3b15e88fa7e2f3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): Claude Usage/MenuBar/PopoverContentView.swift:72-87 | Claude Usage/Views/SettingsView.swift:49-63 | Claude Usage/Views/SettingsView.swift:106-120 \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"faedd04d6fb4ba1b38232204f9e77c37420b6ae107f60b32543e2f0f8a87a318"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): Claude Usage/Shared/Services/ClaudeAPIService.swift:323-338 | Claude Usage/Shared/Services/ClaudeAPIService.swift:648-662 | Claude Usage/Shared/Services/ClaudeAPIService.swift:745-760 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:323\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e68dfa24319704ee3873b3441885e46ae26074afaa44123d032c19c682ece738"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:780-795 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:918-933 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:780\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc2acf4b10adeb7f1c13d52ab800db3bde7e7faaad3c92394bdde383a27e0ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:1549-1564 | Claude Usage/MenuBar/PopoverContentView.swift:1704-1719 \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 \u0060spacing\u0060 to \u00604\u0060 in one and \u00603\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":1549}}}],"partialFingerprints":{"codehealthFindingId/v1":"136440c6727867bc285c020b2c02c43f6dbce73e0cdd48d4278d3a582511cf8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:345-360 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:319-334 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:345\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"58434ea8d3580715e1dc77fbc6da5ccad680af936ef78aac4eac9effe0924c0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 3): Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:22-36 | Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:93-105 | Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:191-202 \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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d8e312ddc56fb84c8aab611cc4e8acf9ff37dbd70ae0e5f4d1668778c87117f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Claude Usage/MenuBar/MenuBarManager.swift:1710-1724 | Claude Usage/MenuBar/MenuBarManager.swift:1803-1817 \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 \u0060Claude Usage/MenuBar/MenuBarManager.swift:1710\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1710}}}],"partialFingerprints":{"codehealthFindingId/v1":"56a4cb1f05a2d4f4cfb3e7dcdc90ba6841b43deb6ff2ab8774ad511d7735a587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:13-27 | Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:82-95 \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 \u0060Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:13\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":"Claude Usage/Shared/Extensions/Color\u002BExtensions.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6caec5042ca7f7e2eaff9ae247e22e4349aa56c5010e90a0b05502a0e8bbb41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:16-30 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:32-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:16\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":"Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"5405b1dbf870fbc97156bda33b303750971503b00441397dcceb1448079ff015"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:363-377 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:337-351 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:363\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"0272144a6da062625ed32de672e39d25aacf1bba868bddb272d82d468249cbf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:603-617 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:620-634 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:603\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a161c8e6b13c27ecffbfaa9c01d540ad85c39482d30e265162499cc397a939f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): Claude Usage/MenuBar/MenuBarIconRenderer.swift:829-842 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:874-887 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:973-986 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1018-1031 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:829\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"43cf122b01f48211ceb58ae1d22de8df2370167019438c0dbdec1d9c0d23718f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:1142-1155 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1344-1357 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:1142\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"305f11bcd3bf8dd2d0d5de0e9e9957c388deb941d8456340fbdc426a53004907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): Claude Usage/MenuBar/StatusBarUIManager.swift:82-95 | Claude Usage/MenuBar/StatusBarUIManager.swift:231-242 \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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ffc5e13cf19e12ef3a1893cd1ac65d8b580f393a2ed75ec368fa569310bd41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Claude Usage/MenuBar/StatusBarUIManager.swift:638-651 | Claude Usage/MenuBar/StatusBarUIManager.swift:677-690 \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 \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:638\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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f4baaa6419a009128f8470a27cf7e6bffd6e558555741163a189f66ffe6b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Claude Usage/Views/Settings/App/ClaudeCodeView.swift:832-845 | Claude Usage/Views/Settings/App/ClaudeCodeView.swift:856-869 \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 \u0060Claude Usage/Views/Settings/App/ClaudeCodeView.swift:832\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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fb38ea7a6b889e4b8baa130974fdb58932d0332ef725db4d9a120b0e017226f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): Claude Usage/Views/Settings/Components/UsageCharts.swift:122-133 | Claude Usage/Views/Settings/Components/UsageCharts.swift:246-257 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:280-291 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:518-529 \u2014 there are 4 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 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 \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:122\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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a536f5883aadf9b34c468dec6436374226291f3e9ca6d99a5688df82907afc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:445-456 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:574-585 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:460-471 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:591-602 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:445\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"befbb4571eac184d69023076e0f3aee583a2b7715d59e3d85f23edbb1a674a7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): Claude Usage/MenuBar/MenuBarIconRenderer.swift:625-636 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:840-849 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:984-993 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:625\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"348e7165982a4282d4ad7bb872e824eff2f86acbecbcd0ccc7fee586b1b7fb22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): Claude Usage/MenuBar/MenuBarManager.swift:966-975 | Claude Usage/MenuBar/MenuBarManager.swift:990-1001 \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 \u0060Claude Usage/MenuBar/MenuBarManager.swift:966\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3a3830d673c60436c4233c49dd87f342499829b42672e5a377be4f0130672c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:552-563 | Claude Usage/MenuBar/PopoverContentView.swift:1437-1448 \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 \u0060Claude Usage/MenuBar/PopoverContentView.swift:552\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 \u00602\u0060 in one and \u00601\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 before the matched lines, \u0060Claude Usage/MenuBar/PopoverContentView.swift:548\u0060 calls \u0060VStack\u0060, \u0060ProfileSwitcherCompact\u0060 and \u0060Claude Usage/MenuBar/PopoverContentView.swift:1436\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a193664d3f8c4faa4d550eed137a51785054cfee2d4b3bb27ea9807cbdb6c3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:1299-1309 | Claude Usage/MenuBar/PopoverContentView.swift:1759-1770 \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 \u0060Claude Usage/MenuBar/PopoverContentView.swift:1299\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":1299}}}],"partialFingerprints":{"codehealthFindingId/v1":"d77bfb4dacc81bdb48a83038b1f2845fdd3849217d321243801af8c6ec9a5415"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:124-134 | Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:173-184 \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 \u0060Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc73c586892004aef47f4f45f179e05c9277ed9d82a1c32adaa9d1d421aa75b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService.swift:531-541 | Claude Usage/Shared/Services/ClaudeAPIService.swift:602-613 \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 \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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a1379e2125faf1ba46b00f91c4cc4a8f36d1fae19708d0f27795e0b3f93315"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Claude Usage/Shared/Services/NotificationManager.swift:291-302 | Claude Usage/Shared/Services/NotificationManager.swift:321-332 \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 \u0060Claude Usage/Shared/Services/NotificationManager.swift:291\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":"Claude Usage/Shared/Services/NotificationManager.swift"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"13c302a865b58aef18aec835b9e43d10aad87a3ff95d61a2decd1a348e7c95ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:42-53 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:41-52 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:42\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9f236adc503cd8fbd6ee11132eb0bbbea782d359f30ec106aa7915216c7a30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:259-270 | Claude Usage/Views/SetupWizardView.swift:356-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:259\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, \u0060Claude Usage/Views/SetupWizardView.swift:368\u0060 calls \u0060frame\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:271\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee48aa6ff8e6b6527d71dc6796ecd1b0b3fa08baf3e5e59cfa23bc705ec365b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:272-283 | Claude Usage/Views/SetupWizardView.swift:370-381 \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 \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:272\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c0a7e7e57c9dfb416a3fbf2055abd867dd2aaaaae2a0911308347f4f480ac3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 3): Claude Usage/MenuBar/StatusBarUIManager.swift:82-92 | Claude Usage/MenuBar/StatusBarUIManager.swift:231-239 | Claude Usage/MenuBar/StatusBarUIManager.swift:311-320 \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 \u0060Claude Usage/MenuBar/StatusBarUIManager.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. 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, \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:241\u0060 calls \u0060logWarning\u0060 and \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:320\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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb57fa75acc63f8c657e29e5fb2fabd0248ebd36810c009282414ef19925e439"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:101-111 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:181-191 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:72-82 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:101\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"e72230694cb4a383b85cec58ea0f126dc78ccf6507f8e26c24bf45d2866b3983"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:70-80 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:92-102 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:110-120 \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 \u0060Claude Usage/Views/Settings/Credentials/CLIAccountView.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":"Claude Usage/Views/Settings/Credentials/CLIAccountView.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"104625ddfdedcb8248fa61a44513c5119adc1a4423251647600d68ba0d74480a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:427-437 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:678-688 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:438\u0060 calls \u0060withAlphaComponent\u0060 and \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:690\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92919ab2c3f13aa77b457eb0fe1f7260eb6e0d2e8aa1011945ab3e5ce8763cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:1252-1262 | Claude Usage/MenuBar/PopoverContentView.swift:1807-1817 \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 \u0060Claude Usage/MenuBar/PopoverContentView.swift:1252\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f8be13749e77cec64c34b99929751a07ba374f3a5bc991ee49ebda8380698a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:179-189 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1302-1310 \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 \u0060Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d0ffd04006fffb8a45ccdc94ddc5a10b9e43efc34f8ccffe03f7c5b9ab5df09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService.swift:983-993 | Claude Usage/Shared/Services/ClaudeAPIService.swift:995-1005 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:983\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fdbd48f5bfe2baaeb6bc477ec06c078824921c84a823bb1176a66eaa1caf324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Views/FeedbackPromptView.swift:77-87 | Claude Usage/Views/GitHubStarPromptView.swift:90-100 \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 \u0060Claude Usage/Views/FeedbackPromptView.swift:77\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":"Claude Usage/Views/FeedbackPromptView.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0245aa8405957a1d9cbe0f633d100e96284dd02e54474e6731547a8b27387767"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Views/FeedbackPromptView.swift:115-125 | Claude Usage/Views/FeedbackPromptView.swift:153-163 \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 \u0060Claude Usage/Views/FeedbackPromptView.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":"Claude Usage/Views/FeedbackPromptView.swift"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29663810de3c7a163ff41e596a594a4a787145d6d78bed6f0b8b698f9943321"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Views/Settings/App/SupportView.swift:46-56 | Claude Usage/Views/Settings/App/SupportView.swift:61-71 \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 \u0060Claude Usage/Views/Settings/App/SupportView.swift:46\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":"Claude Usage/Views/Settings/App/SupportView.swift"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9abe8c104be919ac09af9b9f1952df494f5603fe20dbdb8b47554405fd9e9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Views/Settings/Components/MetricIconCard.swift:158-168 | Claude Usage/Views/Settings/Components/MetricIconCard.swift:202-212 \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 \u0060Claude Usage/Views/Settings/Components/MetricIconCard.swift:158\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":"Claude Usage/Views/Settings/Components/MetricIconCard.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae918a1d1815121d2224cba77d4404e99e07fc0406216b89b1267a97538ddd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:347-357 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:629-639 \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":"Claude Usage/Views/Settings/Profile/UsageHistoryView.swift"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bfbc890f659bc7328aee091cf1857535ab267ffa328a02e9b27a309a737213"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:527-536 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:652-661 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:542-551 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:669-678 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:527\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ee2cb715a8e969e9a3fc84f976cfae66179eb294493bf6155917533573cebb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:586-595 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:605-614 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:603-612 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:622-631 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:586\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"990a888f5c1abe7eb57a19517bbd4d73b9944048935bd6e12d611e73bc418793"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:48-57 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:69-78 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:99-108 \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 \u0060Claude Usage/Views/Settings/App/UpdatesSettingsView.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 \u0060spacing\u0060 to \u0060DesignTokens.Spacing.small\u0060 in one and \u0060DesignTokens.Spacing.iconText\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":"Claude Usage/Views/Settings/App/UpdatesSettingsView.swift"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"7946f43b20e8a3617c04cef077c87c5eaa4752b8431922fc13cf084adce7faf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/MenuBar/MenuBarManager.swift:1570-1579 | Claude Usage/MenuBar/MenuBarManager.swift:1613-1622 \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 \u0060Claude Usage/MenuBar/MenuBarManager.swift:1570\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 \u0060previousUsage\u0060 to \u0060ClaudeUsage?\u0060 in one and \u0060APIUsage?\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4049c6d0d36f154e4332aed86941b9e9941df4d07b903a65991dca13d32953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:1264-1273 | Claude Usage/MenuBar/PopoverContentView.swift:1819-1828 \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fac98c16fb57ef44012e38d41ceea2826e1a112b7ae6fa61467a3fee1edffd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:129-138 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1254-1261 \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 \u0060Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:129\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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa4e08e22fbf1bf3ccc389a19daa10fa3d48135e9b3ac81abd043b0d4487975a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/Settings/Components/UsageCharts.swift:501-510 | Claude Usage/Views/Settings/Components/UsageCharts.swift:517-526 \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 \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:501\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, \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:515\u0060 calls \u0060HStack\u0060 and \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:499\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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"d026e29c942b83fc2a467b91e0a19c2ce41608727c0fd64623a10870c8991a9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:476-485 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:491-500 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:476\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"5551d1373c7aa8d224feaa551a40bad7df658b1f288c547e1b1610acb96b4c4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:152-161 | Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:294-303 \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":"Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf07d6770105deb418047d3d721551ed2a68258bdd4e85a59d0e1ccdcc013b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:359-368 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:641-650 \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":"Claude Usage/Views/Settings/Profile/UsageHistoryView.swift"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"52454e8aa5f7e2b4a32ff78fbb0bff4110f12ff1898019e45dbf02d8172a2f47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/SettingsView.swift:404-413 | Claude Usage/Views/SettingsView.swift:420-429 \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 \u0060Claude Usage/Views/SettingsView.swift:404\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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2385c98bd75212bb1359bee598a669778b9d5c9809dfbdc3a124711b5d8bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/SettingsView.swift:984-993 | Claude Usage/Views/SettingsView.swift:1019-1028 \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 \u0060Claude Usage/Views/SettingsView.swift:984\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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"71aa7b136927779acdaf5ba35427a1a1b20a5c7a152f98fc2f8344cbaf46e4b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Claude Usage/Views/SetupWizardView.swift:1005-1014 | Claude Usage/Views/SetupWizardView.swift:1148-1157 \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 \u0060Claude Usage/Views/SetupWizardView.swift:1005\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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a3210637a7933226767086de71d4e90405cf0f7cfce50b370161a21b8da0af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/MenuBar/MenuBarManager.swift:1528-1536 | Claude Usage/MenuBar/MenuBarManager.swift:1571-1579 \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 \u0060Claude Usage/MenuBar/MenuBarManager.swift:1528\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, \u0060Claude Usage/MenuBar/MenuBarManager.swift:1570\u0060 calls \u0060log\u0060 and \u0060Claude Usage/MenuBar/MenuBarManager.swift:1527\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1528}}}],"partialFingerprints":{"codehealthFindingId/v1":"0987b7adcd11c3fb7b754739ffd87c4a8e30220c07da7805dd2ac628140ab61a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/MenuBar/StatusBarUIManager.swift:254-262 | Claude Usage/MenuBar/StatusBarUIManager.swift:327-335 \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 \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:254\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 after the matched lines, \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:262\u0060 calls \u0060sendAction\u0060, \u0060logWarning\u0060 and \u0060Claude Usage/MenuBar/StatusBarUIManager.swift:335\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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbc85125c3201d22b49e5a180daa71171e8105a8fa74139bfa367e6d88e47ad2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:50-58 | Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:66-74 \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 \u0060Claude Usage/Shared/Extensions/Color\u002BExtensions.swift:50\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":"Claude Usage/Shared/Extensions/Color\u002BExtensions.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a49719279487ccf1319316cac812e062ae0b272dcb4bbcf5965ce088ce46999"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Views/Settings/App/DebugNetworkLogView.swift:310-318 | Claude Usage/Views/Settings/App/DebugNetworkLogView.swift:330-338 \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 \u0060Claude Usage/Views/Settings/App/DebugNetworkLogView.swift:310\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":"Claude Usage/Views/Settings/App/DebugNetworkLogView.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fff6d216a235cc4527002a452b8abf9e0857bdbccec12143fa8ade58b7e731f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Views/Settings/App/ManageProfilesView.swift:304-312 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:252-260 \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 \u0060Claude Usage/Views/Settings/App/ManageProfilesView.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, \u0060Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:262\u0060 calls \u0060VStack\u0060 and \u0060Claude Usage/Views/Settings/App/ManageProfilesView.swift:314\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":"Claude Usage/Views/Settings/App/ManageProfilesView.swift"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2a68391482d27323b45ec931d034e35c581e768cc42861cb199d99db1453d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:265-273 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:239-247 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:265\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"3211095335a084814f1bf34d1ce729bf22db20ba6be147b60930432889980c10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:717-725 | Claude Usage/Views/SetupWizardView.swift:790-798 \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 \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:717\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a3ed9f58425f9d92527160f3ccc53052a87dcc28a277a15cbf234883d6d40e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Claude Usage/Views/SetupWizardView.swift:993-1001 | Claude Usage/Views/SetupWizardView.swift:1159-1166 \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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"938bfa52223c94ed969fd926279a333feee9fa7cd87cc92c5f85204190b6505c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Claude Usage/MenuBar/MenuBarIconRenderer.swift:1045-1052 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1143-1150 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1345-1352 \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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"882b96236138394826407753b54e2a2277bae53db5f8b28bbe423b7439817cbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Claude Usage/Views/Settings/App/SupportView.swift:45-52 | Claude Usage/Views/Settings/App/SupportView.swift:60-67 | Claude Usage/Views/Settings/App/SupportView.swift:75-82 \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 \u0060Claude Usage/Views/Settings/App/SupportView.swift:45\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":"Claude Usage/Views/Settings/App/SupportView.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"a65b3e492b7e1c2519cff490d338ffd86253095b864599ce6c3604bd40dcc6e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Claude Usage/Views/SettingsView.swift:869-876 | Claude Usage/Views/SettingsView.swift:982-989 | Claude Usage/Views/SettingsView.swift:1017-1024 \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 \u0060Claude Usage/Views/SettingsView.swift:869\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, \u0060Claude Usage/Views/SettingsView.swift:877\u0060 calls \u0060contentShape\u0060, \u0060Rectangle\u0060, \u0060buttonStyle\u0060 and \u0060Claude Usage/Views/SettingsView.swift:990\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":"Claude Usage/Views/SettingsView.swift"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0dd8bfa1a8ab05cc25c9410584b8a9cf46afb48c6cf8a919555086775349894"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): ClaudeUsageWidget/UsageWidgetViews.swift:310-317 | ClaudeUsageWidget/UsageWidgetViews.swift:816-823 | ClaudeUsageWidget/UsageWidgetViews.swift:950-957 \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":"ClaudeUsageWidget/UsageWidgetViews.swift"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6178fea8f642e710219492a9987a472b75944d8be92af0721c1b7e4a68f032c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:1086-1093 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:1179-1186 \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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"052f9201bc22f3a3a8f60bef407255dfbcf87b7742e4fd89ec70cf8b1a269f5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/Shared/Models/UsageHistory.swift:127-134 | Claude Usage/Shared/Services/UsageHistoryService.swift:287-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":"Claude Usage/Shared/Models/UsageHistory.swift"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cbd7a6dfc55ab2d1a0422a4c216bbdaff88ea8439416b2516e7dfa9136c005b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:55-62 | Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:73-80 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift:55\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":"Claude Usage/Shared/Services/ClaudeAPIService\u002BConsoleAPI.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb33a9d434cc3e1430bee12f2f976287aa406d66f6ff09b736b81ef3b1dad5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/Views/Settings/App/ManageProfilesView.swift:393-400 | Claude Usage/Views/Settings/Components/ProfileSelectionRow.swift:33-40 \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 \u0060Claude Usage/Views/Settings/App/ManageProfilesView.swift:393\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":"Claude Usage/Views/Settings/App/ManageProfilesView.swift"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"b294ee648debf6db8e9ad98243eb36a714773ec5c7b4e9517e7d7e5b48ebea19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/Views/Settings/App/SupportView.swift:54-61 | Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:147-154 \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 \u0060Claude Usage/Views/Settings/App/SupportView.swift:54\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 \u006012\u0060 in one and \u00608\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, \u0060Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:155\u0060 calls \u0060foregroundColor\u0060 and \u0060Claude Usage/Views/Settings/App/SupportView.swift:62\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":"Claude Usage/Views/Settings/App/SupportView.swift"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c4e49da353d4a351a43173bc20568043b9c0c42ba1614e11dc15d22b72799f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Claude Usage/Views/Settings/Components/IconStylePicker.swift:85-92 | Claude Usage/Views/Settings/Components/IconStylePicker.swift:102-109 \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 \u0060Claude Usage/Views/Settings/Components/IconStylePicker.swift:85\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, \u0060Claude Usage/Views/Settings/Components/IconStylePicker.swift:93\u0060 calls \u0060padding\u0060 and \u0060Claude Usage/Views/Settings/Components/IconStylePicker.swift:110\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":"Claude Usage/Views/Settings/Components/IconStylePicker.swift"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"d71a06e8283598234101a87bceb61db146d277c1d59e89d0b39522c1cb5a5b57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): ClaudeUsageWidget/UsageWidgetViews.swift:331-338 | ClaudeUsageWidget/UsageWidgetViews.swift:897-904 \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 \u0060ClaudeUsageWidget/UsageWidgetViews.swift:331\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, \u0060ClaudeUsageWidget/UsageWidgetViews.swift:330\u0060 calls \u0060foregroundStyle\u0060 and \u0060ClaudeUsageWidget/UsageWidgetViews.swift:896\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":"ClaudeUsageWidget/UsageWidgetViews.swift"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd24206f9fb0c21833931b2384b36c63aad0d5d1ceff86633b4ce41ca487ca29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Claude Usage/Views/Settings/Components/MetricIconCard.swift:117-123 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:447-453 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:576-582 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:462-468 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:593-599 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060spacing\u0060 to \u00602\u0060 in one and \u00604\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":"Claude Usage/Views/Settings/Components/MetricIconCard.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"966f10819218fd7cf0d9d14b2348885bab2e9832176fafa0e1a9c18df3b701dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:404-410 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:442-448 | Claude Usage/Views/SetupWizardView.swift:522-528 | Claude Usage/Views/SetupWizardView.swift:560-566 | Claude Usage/Views/SetupWizardView.swift:821-827 \u2014 there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:404\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4077ac66582566a35773df2ee7b323f58bb6d4a7cfe0b27aac55a391b3aa849"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:49-55 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:70-76 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:100-106 | Claude Usage/Views/Settings/Credentials/CodexAccountView.swift:191-197 \u2014 there are 4 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 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 \u0060Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:49\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":"Claude Usage/Views/Settings/App/UpdatesSettingsView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4d3b581fececf5d09d514716e1c3236a0ea74488da7b9cabc490030beb5e05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Claude Usage/MenuBar/PopoverContentView.swift:107-114 | Claude Usage/MenuBar/PopoverContentView.swift:495-502 | Claude Usage/MenuBar/PopoverContentView.swift:537-544 \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 \u0060Claude Usage/MenuBar/PopoverContentView.swift:495\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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"c83eca0d5fb3bc52629b915b1e04dd4b4431ec70e9dffa812549ae26a1ff416c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20137 lines \u00D7 4): Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:882-888 | Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:892-898 | Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:915-917 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:430-436 \u2014 there are 4 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 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 \u0060Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:882\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. 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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":882}}}],"partialFingerprints":{"codehealthFindingId/v1":"454bf0fb6551a4d58cab54c1be125e6367c7af86959329af5c916ba643d68111"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:287-293 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:261-267 | Claude Usage/Views/SetupWizardView.swift:358-364 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:287\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"5733ef089db234cfa599ed12565cd947cdd882824ad7a6d1a57b1bb970e06193"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Claude Usage/Views/FeedbackPromptView.swift:195-201 | Claude Usage/Views/GitHubStarPromptView.swift:41-47 \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 \u0060Claude Usage/Views/FeedbackPromptView.swift:195\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":"Claude Usage/Views/FeedbackPromptView.swift"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d898160cca32c14d7457168db6f710ea863afe428fdb75c4c60570a6a4eedb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Claude Usage/Views/Settings/App/SupportView.swift:70-76 | Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:290-296 \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 \u0060Claude Usage/Views/Settings/App/SupportView.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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060systemName\u0060 to \u0060\u0022hand.raised.fill\u0022) .font(.system(size: 18)) .foregroundColor(.orange) VStack(alignment: .leading\u0060 in one and \u0060\u0022lock.fill\u0022) .font(.system(size: 16)) .foregroundColor(.orange) VStack(alignment: .leading\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, \u0060Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift:297\u0060 calls \u0060foregroundColor\u0060 and \u0060Claude Usage/Views/Settings/App/SupportView.swift:77\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":"Claude Usage/Views/Settings/App/SupportView.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca080e176baad5eec8e232cd74c6754e69029093f974c2c6b6c86d3be30c889a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Claude Usage/Views/Settings/Components/MetricIconCard.swift:144-150 | Claude Usage/Views/Settings/Components/MetricIconCard.swift:188-194 \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 \u0060Claude Usage/Views/Settings/Components/MetricIconCard.swift:144\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":"Claude Usage/Views/Settings/Components/MetricIconCard.swift"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae0d9024e87e402d7518f05fed0ec5db27d978c16c365fa22eafd40280d6937f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:336-342 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:310-316 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift:336\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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf056e18fde2f90d3beb49187472575260e5346b0720c8bb8e1012cfd9422d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:96-102 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:466-472 \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 \u0060Claude Usage/Views/Settings/Profile/UsageHistoryView.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":"Claude Usage/Views/Settings/Profile/UsageHistoryView.swift"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"714ba104c863e3b3af7f16acaf86e20839567735eca50d0567da5bd2dfb6acf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): Claude Usage/Views/Settings/Components/MetricIconCard.swift:117-122 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:447-452 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:576-581 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:462-467 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:593-598 | Claude Usage/Views/SetupWizardView.swift:193-198 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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 \u0060Claude Usage/Views/Settings/Components/MetricIconCard.swift:117\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 \u00602\u0060 in one and \u00604\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":"Claude Usage/Views/Settings/Components/MetricIconCard.swift"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"722fc47b01d71ce2598c0054a9aca4aa048dce46f11ec6c97e12b9d8c2eb9664"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): Claude Usage/Views/FeedbackPromptView.swift:99-104 | Claude Usage/Views/Settings/App/SupportView.swift:44-49 | Claude Usage/Views/Settings/App/SupportView.swift:59-64 | Claude Usage/Views/Settings/App/SupportView.swift:74-79 | Claude Usage/Views/Settings/Profile/UsageHistoryView.swift:39-44 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Claude Usage/Views/FeedbackPromptView.swift:99\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 \u00603\u0060 in one and \u00604\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":"Claude Usage/Views/FeedbackPromptView.swift"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"86654155b0b8dc382d38ce552f5853316af78b1461b74b5d485ae16e3c97d219"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): Claude Usage/Views/Settings/App/LanguageSettingsView.swift:47-53 | Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:70-75 | Claude Usage/Views/Settings/App/UpdatesSettingsView.swift:139-144 \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 \u0060Claude Usage/Views/Settings/App/LanguageSettingsView.swift:47\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, \u0060Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift:77\u0060 calls \u0060Text\u0060, \u0060font\u0060 and \u0060Claude Usage/Views/Settings/App/LanguageSettingsView.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":"Claude Usage/Views/Settings/App/LanguageSettingsView.swift"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c0c2a29ce9b51bacb0e0ad1357ed3c4af4ca24b82f23a34f1d9a6baaa066d4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Claude Usage/Shared/Services/ClaudeAPIService.swift:1252-1257 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1300-1305 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:1252\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"80f1a00551e7fd143a4e7b19db2465cb250e0658a8dd2b9c00d6b46a9cd99bd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Claude Usage/Views/Settings/Components/UsageCharts.swift:55-60 | Claude Usage/Views/Settings/Components/UsageCharts.swift:178-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Claude Usage/Views/Settings/Components/UsageCharts.swift:55\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":"Claude Usage/Views/Settings/Components/UsageCharts.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"468721b8b4c57e5575798a0e5c19fe1b815b87ecdce7e087b5a1252aa4e3912a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:609-614 | Claude Usage/Views/SetupWizardView.swift:685-690 \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 \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:609\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 \u00603\u0060 in one and \u00606\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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"63fa743f714aea2ad46e25039b479d2e8cbbc8e0749fb580e06d6f39d4047718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): ClaudeUsageWidget/UsageWidgetViews.swift:323-328 | ClaudeUsageWidget/UsageWidgetViews.swift:831-836 \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 \u0060ClaudeUsageWidget/UsageWidgetViews.swift:323\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":"ClaudeUsageWidget/UsageWidgetViews.swift"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"2498d60e6a82d71e3eb0ce36a2cfd49dfbcee4338e7e7493b8480ec9c3d6ea75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): Claude Usage/MenuBar/PopoverContentView.swift:49-54 | Claude Usage/MenuBar/PopoverContentView.swift:80-85 | Claude Usage/Views/SettingsView.swift:26-31 | Claude Usage/Views/SettingsView.swift:56-61 | Claude Usage/Views/SettingsView.swift:83-88 | Claude Usage/Views/SettingsView.swift:113-118 \u2014 there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b2baaa4edec6cd9cccee0d0ad0ad6993bcb78662366fd261382720c1dc0cb69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:241-245 | Claude Usage/Views/Settings/Credentials/APIBillingView.swift:752-756 | Claude Usage/Views/Settings/Credentials/CLIAccountView.swift:440-444 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:212-216 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:769-773 | Claude Usage/Views/SetupWizardView.swift:840-844 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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. 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"894db8bb97624e17cf9dfe328e8c53bab8d319600864e137783d254de513b472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): Claude Usage/Shared/Services/ClaudeAPIService.swift:962-966 | Claude Usage/Shared/Services/ClaudeAPIService.swift:982-987 | Claude Usage/Shared/Services/ClaudeAPIService.swift:994-999 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1006-1011 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:962\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"85de3aed5e830a2d6b09161bb28608ec51f5e4211ad7c0253c0da01ab8cca251"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Claude Usage/Shared/Services/ClaudeAPIService.swift:1246-1250 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1294-1298 | Claude Usage/Shared/Services/ClaudeAPIService.swift:1337-1341 \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 \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:1246\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":1246}}}],"partialFingerprints":{"codehealthFindingId/v1":"762577accae47260077c8c7e062b947a3e19374e1fd92d64393211283c4abd93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Claude Usage/MenuBar/MenuBarIconRenderer.swift:365-369 | Claude Usage/MenuBar/MenuBarIconRenderer.swift:484-488 \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 \u0060Claude Usage/MenuBar/MenuBarIconRenderer.swift:365\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":"Claude Usage/MenuBar/MenuBarIconRenderer.swift"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ace111e264a0ab4fe964b248bc2d7d51aa592ee1c87566eeea43391528dd7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Claude Usage/MenuBar/PopoverContentView.swift:856-861 | Claude Usage/Views/Settings/App/KeepAwakeSettingsView.swift:285-290 \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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"684b2538032cd42466890b916b4cf7c89b09ac4786d3e47d1c311aa5d4e8721b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:112-122 | Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift:209-213 \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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0bdb092195d80a09b45b5a4e77555ba0e34b3315e518a67442fed3ee5383ae5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): Claude Usage/Shared/Services/ClaudeAPIService.swift:205-207 | Claude Usage/Shared/Services/ClaudeAPIService.swift:317-321 | Claude Usage/Shared/Services/ClaudeAPIService.swift:737-741 \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. 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, \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:743\u0060 calls \u0060logAPIRequest\u0060 and \u0060Claude Usage/Shared/Services/ClaudeAPIService.swift:323\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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"dabb96d929b72d2771d1bec3efd89c2c8ed324e5b58caa17c5655510aa44ffd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Claude Usage/Shared/Models/UsageHistory.swift:175-180 | Claude Usage/Views/Settings/Components/UsageCharts.swift:23-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. 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":"Claude Usage/Shared/Models/UsageHistory.swift"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fb73b61646065654a8ccec7d183c3365a632305c1d66f658fdf5f4d0cdccd32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Claude Usage/Shared/Models/UsageHistory.swift:183-187 | Claude Usage/Views/Settings/Components/UsageCharts.swift:17-21 \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":"Claude Usage/Shared/Models/UsageHistory.swift"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d3d0f4de73b3ce15fab858fda07cd9b6c5a8488a1568c8855680d107078ca2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Claude Usage/Views/Settings/Credentials/APIBillingView.swift:225-233 | Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift:196-204 \u2014 before extracting anything, compare \u0060Claude Usage/Views/Settings/Credentials/APIBillingView.swift\u0060 and \u0060Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift\u0060 as WHOLE FILES: this scan already matched 24 separate duplicated blocks between them, totalling at least 430 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":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2a5c0b207a4fdb2caed755bbdb855cc9f52f847bf49d824629bfe5762114e4"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: NotificationManager (LCOM4 6): NotificationManager\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":"Claude Usage/Shared/Services/NotificationManager.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d52369544d29f941760b18e1a14241dca928ffb956c7baeeae69a418c94b791"}},{"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":"Claude Usage/App/AppDelegate.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad51c22d61924c3d1a9dbc11e175a0e09011107446b14c3e20d5062d89459ad8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: ClaudeCodeSyncService (LCOM4 5): ClaudeCodeSyncService\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":"Claude Usage/Shared/Services/ClaudeCodeSyncService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"831093ccbc78dbe4547b2c71ae0680a6a15e9bbc9e665a3d044ff993271c011f"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: KeychainService (LCOM4 5): KeychainService\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":"Claude Usage/Shared/Services/KeychainService.swift"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e1cc92ac771d6e6fd2cf69213e715cb4382a2bed84ecb87c3e4af5ca51de347"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: LoggingService (LCOM4 5): LoggingService\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":"Claude Usage/Shared/Services/LoggingService.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"7883a4194ab5e018eb8b2b283a98cd3c248fd9c69b7b3ac6f86624da1b2e156d"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: StatuslineService (LCOM4 5): StatuslineService\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":"Claude Usage/Shared/Services/StatuslineService.swift"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a495037d76b23c56eee51bb0aac2e847f2b8a797843168331980406ef7f8aff"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MenuBarManager (LCOM4 4): MenuBarManager\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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"465cea8f0d3a56f1772ac87eafdd896c6f6355c7a211f555533e6ec38cc0393a"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: UpdateUserDriver (LCOM4 4): UpdateUserDriver\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":"Claude Usage/Shared/Services/UpdateManager.swift"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd9e0d823840fc3ee4960077eb6d81b9b30b10ae8f92aba67ded9962c1894b5"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testProfileSecretRoundTrip: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/ProfileKeychainMigrationTests.swift"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d769b113fca235a207f61e74553a4beb085df9b2467ba04929a12770b2b9dd4f"}},{"ruleId":"D10","level":"warning","message":{"text":"Skipped test: testFieldsAreIsolatedPerProfileAndField: Skipped \u2014 throws XCTSkip"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/ProfileKeychainMigrationTests.swift"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"05804678a5a84e0214c6b6748a9c61fbeadb48d342b4f630eb2658e52179f422"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_autoStartRemainsBlocked_whenResetDatePassesButWeeklyUsageIsStillFull: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/AutoStartSessionServiceTests.swift"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd07582d9303614cc78d75ad206d38e8060bd99d8e5307749d58d5e9b48072b"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: test_expiredFiveHourWindowDoesNotBypassWeeklyGuard: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/AutoStartSessionServiceTests.swift"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e84611036119559e7867653f4018ca4ee6cb80e67e600bc7f5a421a617fb439"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testValidationPerformance: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/SessionKeyValidatorTests.swift"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ee69e8bbeb9c3c1401dd5337032245d85cc76d4dd2471cfa6b6ec6a83f95be"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testSanitizationPerformance: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/SessionKeyValidatorTests.swift"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c2979b5dfbf306c4b07dbc9bfcb783e1b58724044e63b05c23df408c57cc9ce"}},{"ruleId":"D10","level":"warning","message":{"text":"No assertions: testBuilderPerformance: 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*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) \u2014 so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as \u0027no assertion this check knows how to see\u0027, and if that is right, add one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude UsageTests/URLBuilderTests.swift"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2c6d2a76c8d3d2a4d9e739212ffa9f3766fa8d2312563e1c94d5e262b3e372"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/MenuBar/PopoverContentView.swift: Claude Usage/MenuBar/PopoverContentView.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SmartUsageDashboard.body at line 935. 11 of those changes were fix/bug commits, and the other 12 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/MenuBar/PopoverContentView.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":"Claude Usage/MenuBar/PopoverContentView.swift"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4dffdf6a828870cd4e148d8b1ea59be4ec139a2af0016da11d23757d1f2446"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/MenuBar/StatusBarUIManager.swift: Claude Usage/MenuBar/StatusBarUIManager.swift changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in StatusBarUIManager.updateMultiProfileButtons at line 357. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/MenuBar/StatusBarUIManager.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":"Claude Usage/MenuBar/StatusBarUIManager.swift"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"775e9d76fd763d3847aae8c6c0b743905b837793f1ed626b08adc4cbd761772e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/MenuBar/MenuBarManager.swift: Claude Usage/MenuBar/MenuBarManager.swift changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in MenuBarManager.refreshUsage at line 1201. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/MenuBar/MenuBarManager.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":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1201}}}],"partialFingerprints":{"codehealthFindingId/v1":"88131eedd4489d616e9af3651531f76c5ce5355f39de93c46a9baf74680a3f28"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Shared/Services/KeepAwakeService.swift: Claude Usage/Shared/Services/KeepAwakeService.swift changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in KeepAwakeService.reconcile at line 253. 4 of those changes were fix/bug commits, and the other 5 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/KeepAwakeService.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":"Claude Usage/Shared/Services/KeepAwakeService.swift"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"98595a536a7ba4a9af63bc2f0396f11e6d46483662abc99a1ea72900e6a8aba2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Shared/Services/ClaudeAPIService.swift: Claude Usage/Shared/Services/ClaudeAPIService.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ClaudeAPIService.parseUsageResponse at line 937. 4 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/ClaudeAPIService.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":"Claude Usage/Shared/Services/ClaudeAPIService.swift"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"de88506186618a545654d0c3a861dd6851d68220aaa208eaaa155c8a2ea5425f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Shared/Services/StatuslineService.swift: Claude Usage/Shared/Services/StatuslineService.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in StatuslineService.updateConfiguration at line 1109. 3 of those changes were fix/bug commits, 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/StatuslineService.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":"Claude Usage/Shared/Services/StatuslineService.swift"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c6a776fd92a5b12eb892b2e72715f9ee480000649559a417a5519471a8e307b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Shared/Services/ProfileManager.swift: Claude Usage/Shared/Services/ProfileManager.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ProfileManager.activateProfile at line 197. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/ProfileManager.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":"Claude Usage/Shared/Services/ProfileManager.swift"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"96bd0a46da13923181231d019cd24d1da872844c6361681d9033f10286d7916c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.swift: Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.swift changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in NotchSessionStore.apply at line 41. 2 of those changes were fix/bug commits, and the other 2 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.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":"Claude Usage/Shared/Services/NotchHUD/NotchSessionStore.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f845bb619ef0b7a8c488cdb2850ee97dd9c93872631211c998f80fc6d460748a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift: Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in AppearanceSettingsView.body at line 26. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Views/Settings/Profile/AppearanceSettingsView.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":"Claude Usage/Views/Settings/Profile/AppearanceSettingsView.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a69c7a687d6e8999858b53b41d21dbec7e0508fb08a74d59b4f364f1ca38a0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Claude Usage/Views/Settings/App/ClaudeCodeView.swift: Claude Usage/Views/Settings/App/ClaudeCodeView.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ClaudeCodeView.body at line 49. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Views/Settings/App/ClaudeCodeView.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":"Claude Usage/Views/Settings/App/ClaudeCodeView.swift"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"efd395fa969fd4f746bcb51333f0ced220e023d7c508c849179fc03278d95974"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Claude Usage/Shared/Services/AutoStartSessionService.swift: Claude Usage/Shared/Services/AutoStartSessionService.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 13 (its worst body is AutoStartSessionService.checkProfile at line 174), AT OR 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(auto-start): wait 30 minutes after a start that reported no open window (#334)\u201D; \u201Cfix(auto-start): back off after a failed start instead of retrying every 5 minutes (#334)\u201D; \u201Cfix(autostart): skip auto-start when the plan has no session limit\u201D; \u201Cfix(auto-start): respect weekly limits before creating sessions\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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:42:39 \u002B02:00\u0027 --until=\u00272026-11-13 19:42:39 \u002B02:00\u0027 --full-history --no-merges -- Claude Usage/Shared/Services/AutoStartSessionService.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":"Claude Usage/Shared/Services/AutoStartSessionService.swift"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4474c210af134e341d55e7a9dcc7c208b6430bdb7e81b4a810c53799384cbdc"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 9 significant file(s) lose their only recent owner: Claude Usage/Views/Settings/App/AboutView.swift, Claude Usage/Shared/ErrorHandling/AppError.swift, Claude Usage/Shared/Storage/ProfileStore.swift, Claude Usage/Shared/Services/Providers/Codex/CodexAPIService.swift, Claude Usage/MenuBar/WindowCoordinator.swift, Claude Usage/Views/Settings/Components/SettingsButton.swift, Claude Usage/Views/Settings/App/ShortcutsSettingsView.swift, Claude Usage/Shared/Services/Providers/Codex/CodexUsageProvider.swift (\u002B1 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"12c14fa706a828ee97d53cfe535bb328b1260cdf2bb2f795ae3107159bcdd428"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 3 significant file(s) lose their only recent owner: Claude Usage/Shared/Services/KeepAwakeService.swift, Claude Usage/MenuBar/KeepAwakeAmbientLayerView.swift, Claude Usage/Shared/Services/NotchHUD/NotchHookEvent.swift. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7a1bce775784863346a1c54062375ffb4d91469aa18debb26edfb867a5ea9136"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (13 single-owned of 113 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 113 of the 145 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: Claude Usage/Shared/Utilities/PaceStatus.swift."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"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. ADRs are expected here because \u0060Claude Usage.xcodeproj/project.pbxproj\u0060 makes this repository a deployable product (line 1)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage.xcodeproj/project.pbxproj"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"511941a9cd4531d4ac3aa1bfb0d7b5767072ac8dbc1758f1fc34a33fbbb078b1"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060formattedApiSpend\u0060 spells \u0060Api\u0060 where 45 names in the project spell it \u0060API\u0060: 45 of 47 names in project repository spell the token \u0060API\u0060 (45 of 47; unit: names in project repository containing \u0060API\u0060). Peers: MenuBarIconRenderer.createAPITextStyle (Claude Usage/MenuBar/MenuBarIconRenderer.swift:729); MenuBarManager.clickedProfileAPIUsage (Claude Usage/MenuBar/MenuBarManager.swift:23); MenuBarManager.lastKnownAPIResetTime (Claude Usage/MenuBar/MenuBarManager.swift:31); PopoverContentView.displayAPIUsage (Claude Usage/MenuBar/PopoverContentView.swift:121); APIUsage.formattedAPICost (Claude Usage/Shared/Models/APIUsage.swift:130). Rename to \u0060formattedAPISpend\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Models/UsageHistory.swift"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"df62118c5b464fb8ab56c671040edbf92c239845b8b89a57c4a0fce42f06bc5d"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060avatarUrl\u0060 spells \u0060Url\u0060 where 32 names in the project spell it \u0060URL\u0060: 32 of 34 names in project repository spell the token \u0060URL\u0060 (32 of 34; unit: names in project repository containing \u0060URL\u0060). Peers: AppError.fromURLBuilderError (Claude Usage/Shared/ErrorHandling/AppError.swift:394); ProviderDescriptor.statusPageURL (Claude Usage/Shared/Models/ProviderDescriptor.swift:27); ClaudeAPIService.baseURL (Claude Usage/Shared/Services/ClaudeAPIService.swift:18); ClaudeAPIService.consoleBaseURL (Claude Usage/Shared/Services/ClaudeAPIService.swift:19); ClaudeCodeSyncService.oauthRefreshURL (Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:940). Rename to \u0060avatarURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/GitHubService.swift"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"38f56ba0df57bb7d43117bc24c0529ca13e1701316a2de88f4290e0fd06295ff"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060htmlUrl\u0060 spells \u0060Url\u0060 where 32 names in the project spell it \u0060URL\u0060: 32 of 34 names in project repository spell the token \u0060URL\u0060 (32 of 34; unit: names in project repository containing \u0060URL\u0060). Peers: AppError.fromURLBuilderError (Claude Usage/Shared/ErrorHandling/AppError.swift:394); ProviderDescriptor.statusPageURL (Claude Usage/Shared/Models/ProviderDescriptor.swift:27); ClaudeAPIService.baseURL (Claude Usage/Shared/Services/ClaudeAPIService.swift:18); ClaudeAPIService.consoleBaseURL (Claude Usage/Shared/Services/ClaudeAPIService.swift:19); ClaudeCodeSyncService.oauthRefreshURL (Claude Usage/Shared/Services/ClaudeCodeSyncService.swift:940). Rename to \u0060htmlURL\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Services/GitHubService.swift"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc164aaf26a20282bf94f98039b1ffdc5db3af318d0df33196fdea8b34241ca"}},{"ruleId":"D21","level":"note","message":{"text":"\u0060originalApiSessionKey\u0060 spells \u0060Api\u0060 where 45 names in the project spell it \u0060API\u0060: 45 of 47 names in project repository spell the token \u0060API\u0060 (45 of 47; unit: names in project repository containing \u0060API\u0060). Peers: MenuBarIconRenderer.createAPITextStyle (Claude Usage/MenuBar/MenuBarIconRenderer.swift:729); MenuBarManager.clickedProfileAPIUsage (Claude Usage/MenuBar/MenuBarManager.swift:23); MenuBarManager.lastKnownAPIResetTime (Claude Usage/MenuBar/MenuBarManager.swift:31); PopoverContentView.displayAPIUsage (Claude Usage/MenuBar/PopoverContentView.swift:121); APIUsage.formattedAPICost (Claude Usage/Shared/Models/APIUsage.swift:130). Rename to \u0060originalAPISessionKey\u0060. [rule N6]"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Views/Settings/Credentials/APIBillingView.swift"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"185803ef294c534bb35f38d3a7995d01f9d8a796a2797e092c8d7e4e45116d39"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1542ac657294a7960a3ca68607ef7a17d9ed3d2457fb06dcd777067445c6a3cf"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3b20c9e3f5f07cd9ed7d38e1ad9e3677b956fa28fa72534ce39bdba4769b42e6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ddc49ef52c93f5d89390c80bf8f0444bb97743496eeea781d1b7fcf904a3ea48"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"565cb0a25235d1502010c8d34a025c6ae5aeb826c7d5e305b97bb45399050c67"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fdd80ff4efa055538dc59aafc5e380459b7d05030fbc7ee936f19fa678b3e896"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8170ff464688d25cae321927ca7e4f0330c087a3e668c57f722eb0e0e3f251ff"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dedcf7e1cc94825336cd4d0324322b608a1048c0cdbc8a5a0341243042ea4156"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e7a832c0dd961e6baf1150ccfe2b91205897c228ecda921e827e7244f9ff642f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9020eb6bb74fbbadb8e3e4adde9f6c86f1f8505a7798a2b5f6af54917a9eae8f"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8d82acfee1f6df25d03d244e6ecd3711a4e69d3aab78e5ce3c49f9b70582a03d"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a33f6509c891ef38fd8a01f307ef48f7db8d3336123b3ac7e55b18baeba5f033"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"314b8634948d0c532bb8dbb190efd070f49ad0280bca09ec0af9a421178ea59b"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f47fd6749f31d0f3d4dd9b81fd8b1494a95e4d8437395afb0eed8f0f240b2d5b"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"31e15292ee7781495cff3025f3779e23aded0d07be93120b45c65e1d6518c389"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"957b150e90b8de065e3fab913d6db8aa84cc38085b4826b482eaabde0c4cf347"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"865c1256b0af6cac7fabd52ec1703a6840a81e82c2cc09619e5e78e47af02756"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6baff434c3b124cf81a6ca2e085936a203bdc62e6e4c726fa0e6a07a3f48b996"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c16ee8905d23c31920ed690c39c6e8c7a0fcf64d92048a977cd9dc1dac78b096"},"properties":{"dependency":{"package":"github.com/sparkle-project/Sparkle","version":"2.8.1","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned files with no living knowledge: 2 of 113 analysed file(s) have no living knowledge left \u2014 their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 113 of the 145 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each \u2014 most significant first: Claude Usage/Shared/Extensions/Color\u002BExtensions.swift, Claude Usage/Shared/Utilities/PaceStatus.swift. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Extensions/Color\u002BExtensions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"026f7aef3e8e3b6afd405a7dd02a6dcb20a270ffe382ac3a3d2361c1dbd5788d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Utilities/PaceStatus.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"711cb75c656943e60a5410eca3c7596de7b359f6cb10bc20130fa2d3165d67cb"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: MenuBarManager.swift \u2194 SetupWizardView.swift: \u0060Claude Usage/MenuBar/MenuBarManager.swift\u0060 and \u0060Claude Usage/Views/SetupWizardView.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 \u0060008da818\u0060 perf(polish): port perf/history improvements from PR #271; \u0060606f090d\u0060 refactor(wizard, notifications): Rework setup wizard to be multi-step; \u006078586e7c\u0060 refactor(menubar): Improve session key refresh and setup flow \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/MenuBar/MenuBarManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d51cdcf6c775e0b2ba82bd768ece0d509ad4bac8118f6b7b2e33fa09b51375"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"48ab05c0458ed0c526ad888890311fb2842bb0aa5ea2472c5bb3979391d2c7b6"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2c9dc2422b74a6ec84807518ad68871d0d87bde9de31e4a3777263b7321d53a"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4b92425e12e87d950defc94f5f82fcc1ba11d3a1edb3cb2a1e25ae3029b02fd4"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3d9450c1e9a738f2d810b3eef41d9babb54722911a7ca830a4cd182d6263d27e"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AX9","level":"error","message":{"text":"Query writes persistent state on the read path: DataStore.loadAPISessionKey: \u0060DataStore.loadAPISessionKey\u0060 is a read-named query yet it performs a durable write on the read path (a persist to a store/client). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Claude Usage/Shared/Storage/DataStore.swift"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9bfe34bde2d45f9784495bd6813442997ecb1bd000c0f24e3b8ec41460cf1a8"}},{"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":"M4","level":"note","message":{"text":"README/code drift: CONTRIBUTING.md links to \u0060.github/README.md\u0060, but \u0060.github/README.md\u0060 does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents\u0027 own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"CONTRIBUTING.md"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe09df08deb1303dbbfb3a87897a46c166913935825a84c8d72a962d801d8cb"}},{"ruleId":"P3","level":"warning","message":{"text":"SAST runs, but gates no merge: \u0060codeql.yml\u0060 run(s) a static-analysis scan, but no workflow that runs one is triggered by a pull request (or a merge queue, or an unfiltered push) \u2014 the scan fires on a schedule or a manual dispatch only. A vulnerable change therefore merges clean and is reported on the next scheduled run, by which time it is on the default branch and the only remedy is a follow-up fix. Add the pull-request trigger to the workflow that runs the scan so the finding arrives before the merge rather than after it."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"73211886541038635ced0208da9cedd27ed1caa9132fd6aa5e44d2976a4de6d6"}},{"ruleId":"P4","level":"note","message":{"text":"No release approval gate: The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY\u0027S PIPELINE FILES. What was read: every file under \u0060.github/workflows/\u0060, \u0060.forgejo/workflows/\u0060, \u0060.gitea/workflows/\u0060, \u0060.azuredevops/\u0060 and \u0060.azure-pipelines/\u0060, plus \u0060.gitlab-ci*\u0060 and \u0060azure-pipelines*\u0060 \u2014 with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab\u0027s \u0060when: manual\u0060, CircleCI\u0027s \u0060type: approval\u0060, an Azure \u0060ManualValidation@\u0060 task or an \u0060approvals:\u0060 block, a Jenkins \u0060input\u0060 step, a \u0060uses:\u0060 step naming an approval action, an \u0060environment:\u0060 paired with \u0060reviewers\u0060 / \u0060required_reviewers\u0060 / \u0060protection\u0060 / \u0060wait-timer\u0060 / \u0060deployment_branch_policy\u0060, a draft-release step, a \u0060workflow_dispatch\u0060 promotion, or a release-event gate. \u2605 What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy \u2014 all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6c11e2dbd483b4b423b95ac61bfcc7af1d55351b28a20d2b1105b31cfe38cc60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060httpResponse.statusCode == 200 || httpResponse.statusCode == 201\u0060 appears character-identically in 2 files \u2014 Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift, Claude Usage/Shared/Services/ClaudeAPIService.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":"Claude Usage/Shared/Services/AutoStartSessionService\u002BRequests.swift"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef3f05cf46ff6c7c740bea18985540eea53ba57d83131c975f01d6049ea92ce5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060wizardState.sessionKey.isEmpty || wizardState.validationState == .validating\u0060 appears character-identically in 2 files \u2014 Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift, Claude Usage/Views/SetupWizardView.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":"Claude Usage/Views/Settings/Credentials/PersonalUsageView.swift"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d255f0cef8513e609513ea09fb6b9d985cf43c98712c24a78c94d22d3adabb9"}},{"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":"Claude Usage/Views/SetupWizardView.swift"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a43bf6f3d5b2608e4967e76c956090e796468afe7ae26240f542c369c2c824"}},{"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":"Claude Usage/Shared/Utilities/SessionKeyValidator.swift"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"22cc5c53525ac68b25964c202c680dcd96d1e46bc2d6860ea20332bf117307da"}},{"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":"Claude Usage/Shared/Services/KeychainService.swift"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"f93cae8c4357c00c4d21a959a15052393e94a992823d7bab5e6a7f3283631eae"}},{"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":"Claude Usage/Shared/Services/TerminalLauncherService.swift"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"6690f8f00b3b90f4f35bb01e8590598a1f318be9ef8a5fd871b6316d79b16cdf"}}],"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-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"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-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.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-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.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-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.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":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"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":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"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/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"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":26,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}